comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
'Only whitelisted addresses can mint NFTrees.' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
// ,@@@@@@@,
// ,,,. ,@@@@@@/@@, .oo8888o.
// ,&%%&%&&%,@@@@@/@@@@@@,8888\88/8o
// ,%&\%&&%&&%,@@@\@@@/@@@88\88888/88'
// %&&%&%&/%&&%@@\@@/ /@@@88888\88888'
// %&&%/ %&%%&&@@\ V /@@' `88\8 `/88'
// `&%\ ` /%&' |.| \ '|8'
// |o| | | | |
// |.| | | | |
// \\/ ._\//_/__/ ,\_//__\\/. \_//__/_
/**
@title NFTree
@author Lorax + Bebop
@notice ERC-721 token that keeps track of total carbon offset.
*/
contract NFTree is Ownable, ERC721URIStorage {
uint256 tokenId;
uint256 public carbonOffset;
address[] whitelists;
mapping(address => Whitelist) whitelistMap;
struct Whitelist {
bool isValid;
address contractAddress;
}
/**
@dev Sets values for {_name} and {_symbol}. Initializes {tokenId} to 1, {totalOffset} to 0, and {treesPlanted} to 0.
*/
constructor() ERC721('NFTree', 'TREE')
{
}
/**
@dev Emitted after a succesful NFTree mint.
@param _recipient Address that the NFTree was minted to.
@param _tokenId IPFS hash of token metadata.
@param _carbonOffset Number of carbon offset (tonnes).
@param _collection Name of NFTree collection.
*/
event Mint(address _recipient, uint256 _tokenId, uint256 _carbonOffset, string _collection);
/**
@dev Creates new Whitelist instance and maps to the {whitelists} array.
@param _contractAddress Address of the contract to be whitelisted.
requirements:
- {_contractAddress} must not already be the address of a contract on the whitelist.
*/
function addWhitelist(address _contractAddress) external onlyOwner {
}
/**
@dev Deletes Whitelist instance and removes from {whitelists} array.
@param _contractAddress Address of the contract to be removed from the whitelist.
requirements:
- {_contractAddress} must be the address of a whitelisted contract.
*/
function removeWhitelist(address _contractAddress) external onlyOwner {
}
/**
@dev Retrieves array of valid whitelisted contracts.
@return address[] {whitelists}.
*/
function getValidWhitelists() external view onlyOwner returns(address[] memory) {
}
/**
@dev Retrieves next token id to be minted.
@return uint256 {tokenId}.
*/
function getNextTokenId() external view returns(uint256) {
}
/**
@dev Retrieves list of tokens owned by {_owner}
@return uint256[] {tokenIds}.
*/
function tokensOfOwner(address _owner) external view returns(uint256[] memory) {
}
/**
@dev Mints NFTree to {_recipient}. Emits Mint event.
@param _recipient Address to mint the NFTree to.
@param _tokenURI IPFS hash of token metadata.
@param _carbonOffset Number of carbon offset (tonnes).
@param _collection Name of NFTree collection.
Requirements:
- {msg.sender} must be a whitelisted contract.
*/
function mintNFTree(address _recipient, string memory _tokenURI, uint256 _carbonOffset, string memory _collection) external {
require(<FILL_ME>)
_safeMint(_recipient, tokenId);
_setTokenURI(tokenId, _tokenURI);
tokenId += 1;
carbonOffset += _carbonOffset;
emit Mint(_recipient, tokenId - 1, _carbonOffset, _collection);
}
}
| whitelistMap[msg.sender].isValid,'Only whitelisted addresses can mint NFTrees.' | 322,442 | whitelistMap[msg.sender].isValid |
'SQ: not minted' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
if (tokenState[tokenId].owner != address(0)) {
return tokenState[tokenId].owner;
}
address tokenIdOwner = address(uint160(tokenId));
uint16 tokenIndex = uint16(tokenId >> 160);
require(<FILL_ME>)
require(
tokenIndex < _tokenOwnerState[tokenIdOwner],
'SQ: invalid index'
);
return tokenIdOwner;
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _tokenOwnerState[tokenIdOwner]!=0,'SQ: not minted' | 322,624 | _tokenOwnerState[tokenIdOwner]!=0 |
'SQ: gen0 supply overflow' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
require(<FILL_ME>)
uint16 tokensAmount = _tokenOwnerState[sender] + amount;
uint256 ownerBase = uint256(uint160(sender));
for (
uint256 index = _tokenOwnerState[sender];
index < tokensAmount;
index++
) {
emit Transfer(address(0), sender, ownerBase | (index << 160));
}
_tokenOwnerState[sender] = tokensAmount;
gen0Supply += amount;
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| gen0Supply+amount<=MAX_GEN0_SUPPLY,'SQ: gen0 supply overflow' | 322,624 | gen0Supply+amount<=MAX_GEN0_SUPPLY |
'SQ: mint amount exceeded' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
require(block.timestamp < timestamp, 'SQ: outdated transaction');
address sender = _msgSender();
require(<FILL_ME>)
bytes32 hash = keccak256(abi.encodePacked(sender, amount, timestamp));
require(
_verifier == _recoverSigner(hash, sig),
'SQ: invalid signature'
);
_mintGen0(sender, amount);
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _tokenOwnerState[sender]+amount<=maxAmount,'SQ: mint amount exceeded' | 322,624 | _tokenOwnerState[sender]+amount<=maxAmount |
'SQ: gen0 supply overflow' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
require(SALE_PRIVATE_STARTED_AT > 0, 'SQ: sale should be active');
require(
msg.value >= amount * SALE_PRIVATE_PRICE,
'SQ: not enough funds for presale'
);
require(<FILL_ME>)
_mintBase(amount, 3, timestamp, sig);
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| gen0Supply+amount<=SALE_PRIVATE_MAX_SUPPLY,'SQ: gen0 supply overflow' | 322,624 | gen0Supply+amount<=SALE_PRIVATE_MAX_SUPPLY |
'SQ: gen1 supply exceeded' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
require(
samsarIds.length == amount && amount <= 10,
'SQ: invalid amount'
);
require(<FILL_ME>)
require(block.timestamp < timestamp, 'SQ: outdated transaction');
address sender = _msgSender();
uint256 price = 20000 + 4 * gen1Supply;
require(
honorContract.balanceOf(sender) >= price * amount,
'SQ: not enough funds'
);
bytes32 hash = keccak256(
abi.encodePacked(sender, amount, samsarIds, timestamp)
);
require(
_verifier == _recoverSigner(hash, sig),
'SQ: invalid signature'
);
uint256 ownerBase = uint256(uint160(sender));
uint16 tokenAmount = _tokenOwnerState[sender];
bool stolen = false;
for (uint16 index; index < amount; index++) {
uint256 samsarId = samsarIds[index];
uint256 rand = stolen ? 100 : random(samsarId + index, 100);
if (rand < 10 && isOnArena(samsarId)) {
address samsarOwner = actualOwnerOf(samsarId);
emit Transfer(
address(0),
sender,
uint256(uint160(samsarOwner)) |
(_tokenOwnerState[samsarOwner] << 160)
);
_tokenOwnerState[samsarOwner] += 1;
stolen = true;
} else {
emit Transfer(
address(0),
sender,
ownerBase | (tokenAmount << 160)
);
tokenAmount += 1;
}
}
_tokenOwnerState[sender] = tokenAmount;
gen1Supply += amount;
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| gen1Supply+amount<MAX_GEN1_SUPPLY,'SQ: gen1 supply exceeded' | 322,624 | gen1Supply+amount<MAX_GEN1_SUPPLY |
'SQ: not enough funds' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
require(
samsarIds.length == amount && amount <= 10,
'SQ: invalid amount'
);
require(
gen1Supply + amount < MAX_GEN1_SUPPLY,
'SQ: gen1 supply exceeded'
);
require(block.timestamp < timestamp, 'SQ: outdated transaction');
address sender = _msgSender();
uint256 price = 20000 + 4 * gen1Supply;
require(<FILL_ME>)
bytes32 hash = keccak256(
abi.encodePacked(sender, amount, samsarIds, timestamp)
);
require(
_verifier == _recoverSigner(hash, sig),
'SQ: invalid signature'
);
uint256 ownerBase = uint256(uint160(sender));
uint16 tokenAmount = _tokenOwnerState[sender];
bool stolen = false;
for (uint16 index; index < amount; index++) {
uint256 samsarId = samsarIds[index];
uint256 rand = stolen ? 100 : random(samsarId + index, 100);
if (rand < 10 && isOnArena(samsarId)) {
address samsarOwner = actualOwnerOf(samsarId);
emit Transfer(
address(0),
sender,
uint256(uint160(samsarOwner)) |
(_tokenOwnerState[samsarOwner] << 160)
);
_tokenOwnerState[samsarOwner] += 1;
stolen = true;
} else {
emit Transfer(
address(0),
sender,
ownerBase | (tokenAmount << 160)
);
tokenAmount += 1;
}
}
_tokenOwnerState[sender] = tokenAmount;
gen1Supply += amount;
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| honorContract.balanceOf(sender)>=price*amount,'SQ: not enough funds' | 322,624 | honorContract.balanceOf(sender)>=price*amount |
'SQ: not owner of the token' | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol';
import './ERC721Upgradeable.sol';
interface IHonorToken {
function updateBalance(
address wallet,
uint256 debit,
uint256 credit
) external;
function balanceOf(address wallet) external view returns (uint256);
}
/***
* .oooooo..o ooooo ooooo .o. oooooooooo. .oooooo. oooooo oooooo oooo
* d8P' `Y8 `888' `888' .888. `888' `Y8b d8P' `Y8b `888. `888. .8'
* Y88bo. 888 888 .8"888. 888 888 888 888 `888. .8888. .8'
* `"Y8888o. 888ooooo888 .8' `888. 888 888 888 888 `888 .8'`888. .8'
* `"Y88b 888 888 .88ooo8888. 888 888 888 888 `888.8' `888.8'
* oo .d8P 888 888 .8' `888. 888 d88' `88b d88' `888' `888'
* 8""88888P' o888o o888o o88o o8888o o888bood8P' `Y8bood8P' `8' `8'
*
*
*
* .oooooo. ooooo ooo oooooooooooo .oooooo..o ooooooooooooo
* d8P' `Y8b `888' `8' `888' `8 d8P' `Y8 8' 888 `8
* 888 888 888 8 888 Y88bo. 888
* 888 888 888 8 888oooo8 `"Y8888o. 888
* 888 888 888 8 888 " `"Y88b 888
* `88b d88b `88. .8' 888 o oo .d8P 888
* `Y8bood8P'Ybd' `YbodP' o888ooooood8 8""88888P' o888o
*
*
*
*/
contract ShadowQuest is OwnableUpgradeable, ERC721Upgradeable {
event Move(
address indexed owner,
uint256 indexed tokenId,
uint256 indexed direction
);
event LocationChanged(
uint8 indexed locationIdFrom,
uint8 indexed locationIdTo,
uint256 amount
);
uint256 public constant MAX_GEN0_SUPPLY = 9996;
uint256 public constant MAX_GEN1_SUPPLY = 18000;
uint256 public constant SALE_PRIVATE_PRICE = 0.075 ether;
uint256 public constant SALE_PUBLIC_PRICE = 0.08 ether;
uint256 public SALE_PUBLIC_STARTED_AT;
uint256 public SALE_PRIVATE_STARTED_AT;
uint256 public SALE_PRIVATE_MAX_SUPPLY;
uint256 public gen0Supply;
uint256 public gen1Supply;
string public provenanceHash;
IHonorToken public honorContract;
address private _proxyRegistryAddress;
address private _verifier;
string private _baseTokenURI;
struct TokenMeta {
address owner;
uint32 movedAt;
uint8 location;
uint56 meta;
}
mapping(uint256 => TokenMeta) public tokenState;
uint256[] internal _tokenStateKeys;
mapping(address => uint16) private _tokenOwnerState;
mapping(address => int16) private _balances;
uint256 public locationsBalance;
function initialize(address verifier_, address proxyRegistryAddress_)
public
initializer
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
function isOnArena(uint256 tokenId) internal view returns (bool) {
}
function actualOwnerOf(uint256 tokenId) public view returns (address) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner_)
public
view
virtual
override
returns (uint256)
{
}
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId)
internal
view
virtual
override
returns (bool)
{
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
function _recoverSigner(bytes32 hash, bytes memory signature)
internal
pure
returns (address)
{
}
function _mintGen0(address sender, uint16 amount) internal {
}
function _mintBase(
uint16 amount,
uint16 maxAmount,
uint256 timestamp,
bytes memory sig
) internal {
}
function mintPresale(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function mint(
uint16 amount,
uint256 timestamp,
bytes memory sig
) public payable {
}
function random(uint256 nonce, uint256 number)
internal
view
returns (uint256)
{
}
function mintGen1(
uint16 amount,
uint256[] calldata samsarIds,
uint256 timestamp,
bytes memory sig
) external {
}
function move(
uint8 locationIdFrom,
uint8 locationIdTo,
uint256[] calldata tokenIds,
uint256 timestamp,
bytes memory sig
) external {
require(block.timestamp < timestamp, 'SQ: outdated transaction');
address sender = _msgSender();
bytes32 hash = keccak256(
abi.encodePacked(
sender,
locationIdFrom,
locationIdTo,
tokenIds,
timestamp
)
);
require(
_verifier == _recoverSigner(hash, sig),
'SQ: invalid signature'
);
for (uint16 index; index < tokenIds.length; index++) {
uint256 tokenId = tokenIds[index];
require(<FILL_ME>)
TokenMeta storage _tokenMeta = tokenState[tokenId];
require(
_tokenMeta.location == locationIdFrom,
'SQ: incorrect location'
);
tokenState[tokenId] = TokenMeta({
owner: sender,
movedAt: uint32(block.timestamp),
location: locationIdTo,
meta: 0
});
if (locationIdTo == 0) {
emit Transfer(address(this), sender, tokenId);
} else if (locationIdFrom == 0) {
emit Transfer(sender, address(this), tokenId);
}
}
if (locationIdFrom == 0) {
locationsBalance++;
} else if (locationIdTo == 0) {
locationsBalance--;
}
emit LocationChanged(locationIdFrom, locationIdTo, tokenIds.length);
}
function claim(
uint256 debit,
uint256 credit,
uint256 timestamp,
bytes memory sig
) external {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner_, address operator_)
public
view
override
returns (bool)
{
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
}
/**
* @dev location_ == -1 – any location
*/
function getOwnerTokens(address owner_, int8 location_)
public
view
returns (uint256[] memory)
{
}
function getLocationTime(uint256 tokenId, uint256 timestamp_)
public
view
returns (uint256)
{
}
function getTrainingGroundHonr(address owner_, uint256 timestamp_)
public
view
returns (uint256)
{
}
/* OwnerOnly */
function setVerifier(address verifier_) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setState(
bool publicSaleState_,
bool privateSaleState_,
uint256 maxPresaleSupply_
) external onlyOwner {
}
function mintReserved(uint16 amount) external onlyOwner {
}
function withdraw(uint256 amount) public onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setHonorContract(IHonorToken honorContract_) external onlyOwner {
}
}
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| actualOwnerOf(tokenId)==sender,'SQ: not owner of the token' | 322,624 | actualOwnerOf(tokenId)==sender |
message | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
contract GODS is ERC20Capped, AccessControl {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
constructor(address _minter)
ERC20("Gods Unchained","GODS")
ERC20Capped(500000000000000000000000000)
{
}
modifier checkRole(
bytes32 role,
address account,
string memory message
) {
require(<FILL_ME>)
_;
}
function mint(address _to, uint256 _amount)
external
checkRole(MINTER_ROLE, msg.sender, "Caller is not a minter")
{
}
}
| hasRole(role,account),message | 322,736 | hasRole(role,account) |
"Mint would exceed max allowed tokens per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title CompassLifetimePass
* CompassLifetimePass - Lifetime access to all Compass features for it's holders
*/
contract CompassLifetimePass is ERC721Enumerable, Ownable {
/**
* @dev Emitted when `to` receives a payout in the amount of `amount`.
*/
event AffiliatePayout(address indexed to, uint256 amount);
/**
* Constants
*/
// Max number of tokens ever allowed to exist
uint256 public constant MAX_SUPPLY = 1000;
// Max mints a wallet can do in total
uint256 public constant MAX_MINTS_PER_ADDRESS = 5;
/**
* Config
*/
// Number of tokens reserved for team
uint256 private _reserveSupply;
// Affiliate comission basis points
uint256 private _affiliateComissionRate;
// Mint state flag
bool private _isMintEnabled;
// Array of token price tiers
uint256[5] private _prices;
// Array of starting token indexes for each price tier
uint256[5] private _priceSteps;
// Base URI of all tokens
string private _baseTokenUri;
/**
* State
*/
// Mapping minter address to mint count
mapping(address => uint256) _mintedByAddress;
// Mapping addres to boolean indicating whether
// an address is banned from the affiliate program
mapping(address => bool) _affiliateBlocklist;
constructor(
string memory _name,
string memory _symbol,
string memory baseTokenUri
) ERC721(_name, _symbol) {
}
/**
* @dev Mints the reserved tokens to the owner and enables public minting
*/
function reserveMint() external onlyOwner {
}
/**
* @dev Pauses the minting process
*/
function pause() external onlyOwner {
}
/**
* @dev Un-pauses the minting process
*/
function unpause() external onlyOwner {
}
/**
* @dev Adds an address to the affiliate blocklist
* @param affiliate The wallet address of the affiliate to block
*/
function blockAffiliate(address affiliate) external onlyOwner {
}
/**
* @dev Mints a token while paying referral commission if affiliate is valid
* @param referredBy An affiliate address
*/
function mint(address payable referredBy) external payable {
uint256 price = currentPrice();
require(_isMintEnabled == true, "Public mint is not enabled yet");
require(<FILL_ME>)
require(msg.value == price, "Incorrect amount of funds");
_mintTo(msg.sender);
if (isValidAffiliate(referredBy)) {
uint256 comission = (price * _affiliateComissionRate) / 100;
referredBy.transfer(comission);
emit AffiliatePayout(referredBy, comission);
}
}
/**
* @dev Mints a single token to the address passed.
* This method only enforces max supply constraints,
* so additional sanity checks must be done before calling it.
*/
function _mintTo(address to) internal {
}
/**
* @dev Returns the price of token with index
*/
function getPriceForId(uint256 tokenId) public view returns (uint256) {
}
/**
* @dev Returns the price of the next token
*/
function currentPrice() public view returns (uint256) {
}
/**
* @dev Check if minting is enabled
*/
function isMintEnabled() external view returns (bool) {
}
/**
* @dev Performs affiliate sanity check on address
*/
function isValidAffiliate(address affiliate) public view returns (bool) {
}
/**
* @dev Returns metadata url for token with provided id
*/
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Sends all funds to the specified address
*/
function drain(address payable to) external onlyOwner {
}
}
| _mintedByAddress[msg.sender]+1<=MAX_MINTS_PER_ADDRESS,"Mint would exceed max allowed tokens per wallet" | 322,804 | _mintedByAddress[msg.sender]+1<=MAX_MINTS_PER_ADDRESS |
"Invalid merkle proof" | pragma solidity ^0.8.10;
interface IWrapper {
function mintSpirits(address account, uint256[] calldata tokenId) external;
}
contract Spirits_MerkleClaim { // Merkle Root Final = 0x14e17a04e8f074c2ed318767ec9a6a75acbdceecb41d66db1802ce2bf99c16e2
address immutable public wrapperContract;
bytes32 immutable public merkleRoot;
constructor(address contractAddress, bytes32 root) {
}
function claimSpirit(address account, uint256[] calldata tokenId, bytes32[] calldata proof)
external
{
require(<FILL_ME>)
IWrapper(wrapperContract).mintSpirits(account, tokenId);
}
function _leaf(address account, uint256[] calldata tokenId)
internal pure returns (bytes32)
{
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal view returns (bool)
{
}
}
| _verify(_leaf(account,tokenId),proof),"Invalid merkle proof" | 322,928 | _verify(_leaf(account,tokenId),proof) |
null | pragma solidity ^0.4.18;
contract owned {
address public owner;
address public candidate;
function owned() payable internal {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
library SafeMath {
function sub(uint256 a, uint256 b) pure internal returns (uint256) {
}
function add(uint256 a, uint256 b) pure internal returns (uint256) {
}
}
contract ERC20 {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256 value);
function allowance(address owner, address spender) public constant returns (uint256 _allowance);
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);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract InfiniteGold is ERC20, owned {
using SafeMath for uint256;
string public name = "InfiniteGold";
string public symbol = "IG";
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) private balances;
mapping (address => mapping (address => uint256)) private allowed;
function balanceOf(address _who) public constant returns (uint256) {
}
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
function InfiniteGold() public {
}
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 withdrawTokens(uint256 _value) public onlyOwner {
require(<FILL_ME>)
balances[this] = balances[this].sub(_value);
balances[msg.sender] = balances[msg.sender].add(_value);
Transfer(this, msg.sender, _value);
}
}
| balances[this]>=_value | 322,964 | balances[this]>=_value |
"It's not time to lock and unlock" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract MineSeedVesting {
using SafeMath for uint256;
IERC20 public token;
uint256 public startDate = 1646092801; // 2022-03-01 00:00:01
uint256 public endDate = 1669852801; // 2022-12-01 00:00:01
uint256 public unlockAmountTotal;
uint256 public tokenDecimals;
uint256 public maxUnlockTimes;
address msgSender;
mapping(address => UserVestingInfo) public UserVesting;
struct UserVestingInfo {
uint256 totalAmount;
uint256 firstAmount;
uint256 unlockAmount;
uint256 secondUnlock;
uint256 lastUnlockTime;
}
event FirstBySenderEvent(address indexed sender, uint256 amount);
event UnlockBySenderEvent(address indexed sender, uint256 amount);
constructor(address _token) public {
}
function addUserVestingInfo(address _address, uint256 _totalAmount) public {
}
function blockTimestamp() public virtual view returns(uint256) {
}
function getUnlockTimes() public virtual view returns(uint256) {
}
function unlockFirstBySender() public {
UserVestingInfo storage _userVestingInfo = UserVesting[msg.sender];
require(_userVestingInfo.totalAmount > 0, "The user has no lock record");
require(_userVestingInfo.firstAmount > 0, "The user has unlocked the first token");
require(_userVestingInfo.totalAmount > _userVestingInfo.unlockAmount, "The user has unlocked the first token");
require(<FILL_ME>)
_safeTransfer(msg.sender, _userVestingInfo.firstAmount);
_userVestingInfo.unlockAmount = _userVestingInfo.unlockAmount.add(_userVestingInfo.firstAmount);
emit FirstBySenderEvent(msg.sender, _userVestingInfo.firstAmount);
_userVestingInfo.firstAmount = 0;
}
function unlockBySender() public {
}
function _safeTransfer(address _unlockAddress, uint256 _unlockToken) private {
}
function balanceOf() public view returns(uint256) {
}
function balanceOfBySender() public view returns(uint256) {
}
function balanceOfByAddress(address _address) public view returns(uint256) {
}
}
| blockTimestamp()>startDate,"It's not time to lock and unlock" | 323,079 | blockTimestamp()>startDate |
"Insufficient available balance for transfer" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract MineSeedVesting {
using SafeMath for uint256;
IERC20 public token;
uint256 public startDate = 1646092801; // 2022-03-01 00:00:01
uint256 public endDate = 1669852801; // 2022-12-01 00:00:01
uint256 public unlockAmountTotal;
uint256 public tokenDecimals;
uint256 public maxUnlockTimes;
address msgSender;
mapping(address => UserVestingInfo) public UserVesting;
struct UserVestingInfo {
uint256 totalAmount;
uint256 firstAmount;
uint256 unlockAmount;
uint256 secondUnlock;
uint256 lastUnlockTime;
}
event FirstBySenderEvent(address indexed sender, uint256 amount);
event UnlockBySenderEvent(address indexed sender, uint256 amount);
constructor(address _token) public {
}
function addUserVestingInfo(address _address, uint256 _totalAmount) public {
}
function blockTimestamp() public virtual view returns(uint256) {
}
function getUnlockTimes() public virtual view returns(uint256) {
}
function unlockFirstBySender() public {
}
function unlockBySender() public {
}
function _safeTransfer(address _unlockAddress, uint256 _unlockToken) private {
require(<FILL_ME>)
token.transfer(_unlockAddress, _unlockToken);
}
function balanceOf() public view returns(uint256) {
}
function balanceOfBySender() public view returns(uint256) {
}
function balanceOfByAddress(address _address) public view returns(uint256) {
}
}
| balanceOf()>=_unlockToken,"Insufficient available balance for transfer" | 323,079 | balanceOf()>=_unlockToken |
"join-vat-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(<FILL_ME>)
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| GemJoinAbstract(net.join).vat()==MCD_VAT,"join-vat-not-match" | 323,127 | GemJoinAbstract(net.join).vat()==MCD_VAT |
"join-ilk-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(<FILL_ME>)
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| GemJoinAbstract(net.join).ilk()==desc.ilk,"join-ilk-not-match" | 323,127 | GemJoinAbstract(net.join).ilk()==desc.ilk |
"join-gem-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(<FILL_ME>)
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| GemJoinAbstract(net.join).gem()==net.gem,"join-gem-not-match" | 323,127 | GemJoinAbstract(net.join).gem()==net.gem |
"join-dec-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(<FILL_ME>)
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| GemJoinAbstract(net.join).dec()==IERC20(net.gem).decimals(),"join-dec-not-match" | 323,127 | GemJoinAbstract(net.join).dec()==IERC20(net.gem).decimals() |
"flip-vat-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(<FILL_ME>)
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| FlipAbstract(net.flip).vat()==MCD_VAT,"flip-vat-not-match" | 323,127 | FlipAbstract(net.flip).vat()==MCD_VAT |
"flip-cat-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(<FILL_ME>)
require(FlipAbstract(net.flip).ilk() == desc.ilk, "flip-ilk-not-match");
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| FlipAbstract(net.flip).cat()==MCD_CAT,"flip-cat-not-match" | 323,127 | FlipAbstract(net.flip).cat()==MCD_CAT |
"flip-ilk-not-match" | pragma solidity 0.6.7;
pragma solidity 0.6.7;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function mint(address account, uint256 amount) external;
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface PauseLike {
function delay() external returns (uint);
function exec(address, bytes32, bytes calldata, uint256) external;
function plot(address, bytes32, bytes calldata, uint256) external;
}
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function add(address) external;
}
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
}
interface ConfigLike {
function init(bytes32) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint) external;
function rely(address) external;
}
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
library SharedStructs {
// decimals & precision
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
struct IlkNetSpecific {
address gem;
address join;
address flip;
address pip;
ChainlogAbstract CHANGELOG;
}
struct IlkDesc {
bytes32 ilk;
bytes32 joinName;
bytes32 flipName;
bytes32 pipName;
bytes32 gemName;
uint256 line;
uint256 dust;
uint256 dunk;
uint256 chop;
uint256 duty;
uint256 beg;
uint256 ttl;
uint256 tau;
uint256 mat;
}
}
contract SpellAction {
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
//
uint256 constant ZERO_PERCENT_RATE = 1000000000000000000000000000;
uint256 constant ONE_PERCENT_RATE = 1000000000315522921573372069;
uint256 constant TWO_PERCENT_RATE = 1000000000627937192491029810;
uint256 constant TWO_POINT_FIVE_PERCENT_RATE = 1000000000782997609082909351;
uint256 constant THREE_PERCENT_RATE = 1000000000937303470807876289;
uint256 constant FOUR_POINT_FIVE_PERCENT_RATE = 1000000001395766281313196627;
uint256 constant FIVE_PERCENT_RATE = 1000000001547125957863212448;
uint256 constant SIX_PERCENT_RATE = 1000000001847694957439350562;
uint256 constant EIGHT_PERCENT_RATE = 1000000002440418608258400030;
uint256 constant NINE_PERCENT_RATE = 1000000002732676825177582095;
uint256 constant TEN_PERCENT_RATE = 1000000003022265980097387650;
function execute(SharedStructs.IlkDesc memory desc,
SharedStructs.IlkNetSpecific memory net) internal {
ChainlogAbstract CHANGELOG = net.CHANGELOG;
address MCD_VAT = CHANGELOG.getAddress("MCD_VAT");
address MCD_CAT = CHANGELOG.getAddress("MCD_CAT");
address MCD_JUG = CHANGELOG.getAddress("MCD_JUG");
address MCD_SPOT = CHANGELOG.getAddress("MCD_SPOT");
address MCD_END = CHANGELOG.getAddress("MCD_END");
address FLIPPER_MOM = CHANGELOG.getAddress("FLIPPER_MOM");
address OSM_MOM = CHANGELOG.getAddress("OSM_MOM"); // Only if PIP_TOKEN = Osm
address ILK_REGISTRY = CHANGELOG.getAddress("ILK_REGISTRY");
// Set the global debt ceiling
// + 100 M for gem-A
VatAbstract(MCD_VAT).file("Line", VatAbstract(MCD_VAT).Line() + desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Sanity checks
require(GemJoinAbstract(net.join).vat() == MCD_VAT, "join-vat-not-match");
require(GemJoinAbstract(net.join).ilk() == desc.ilk, "join-ilk-not-match");
require(GemJoinAbstract(net.join).gem() == net.gem, "join-gem-not-match");
require(GemJoinAbstract(net.join).dec() == IERC20(net.gem).decimals(), "join-dec-not-match");
require(FlipAbstract(net.flip).vat() == MCD_VAT, "flip-vat-not-match");
require(FlipAbstract(net.flip).cat() == MCD_CAT, "flip-cat-not-match");
require(<FILL_ME>)
// Set the gem PIP in the Spotter
SpotAbstract(MCD_SPOT).file(desc.ilk, "pip", net.pip);
// Set the gem-A Flipper in the Cat
ConfigLike(MCD_CAT).file(desc.ilk, "flip", net.flip);
// Init gem-A ilk in Vat & Jug
VatAbstract(MCD_VAT).init(desc.ilk);
ConfigLike(MCD_JUG).init(desc.ilk);
// Allow gem-A Join to modify Vat registry
VatAbstract(MCD_VAT).rely(net.join);
// Allow the gem-A Flipper to reduce the Cat litterbox on deal()
ConfigLike(MCD_CAT).rely(net.flip);
// Allow Cat to kick auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_CAT);
// Allow End to yank auctions in gem-A Flipper
FlipAbstract(net.flip).rely(MCD_END);
// Allow FlipperMom to access to the gem-A Flipper
FlipAbstract(net.flip).rely(FLIPPER_MOM);
// Disallow Cat to kick auctions in gem-A Flipper
// !!!!!!!! Only for certain collaterals that do not trigger liquidations like USDC-A)
//FlipperMomAbstract(FLIPPER_MOM).deny(net.flip);
// Set gem Osm in the OsmMom for new ilk
// !!!!!!!! Only if net.pip = Osm
OsmMomAbstract(OSM_MOM).setOsm(desc.ilk, net.pip);
// Set the gem-A debt ceiling
VatAbstract(MCD_VAT).file(desc.ilk, "line", desc.line * SharedStructs.MILLION * SharedStructs.RAD);
// Set the gem-A dust
VatAbstract(MCD_VAT).file(desc.ilk, "dust", desc.dust * SharedStructs.RAD);
// Set the Lot size
ConfigLike(MCD_CAT).file(desc.ilk, "dunk", desc.dunk * SharedStructs.RAD);
// Set the gem-A liquidation penalty (e.g. 13% => X = 113)
ConfigLike(MCD_CAT).file(desc.ilk, "chop", desc.chop);
// Set the gem-A stability fee (e.g. 1% = 1000000000315522921573372069)
ConfigLike(MCD_JUG).file(desc.ilk, "duty", desc.duty);
// Set the gem-A percentage between bids (e.g. 3% => X = 103)
FlipAbstract(net.flip).file("beg", desc.beg);
// Set the gem-A time max time between bids
FlipAbstract(net.flip).file("ttl", desc.ttl);
// Set the gem-A max auction duration to
FlipAbstract(net.flip).file("tau", desc.tau);
// Set the gem-A min collateralization ratio (e.g. 150% => X = 150)
SpotAbstract(MCD_SPOT).file(desc.ilk, "mat", desc.mat);
// Update gem-A spot value in Vat
SpotAbstract(MCD_SPOT).poke(desc.ilk);
// Add new ilk to the IlkRegistry
IlkRegistryAbstract(ILK_REGISTRY).add(net.join);
// Update the changelog
CHANGELOG.setAddress(desc.gemName, net.gem);
CHANGELOG.setAddress(desc.joinName, net.join);
CHANGELOG.setAddress(desc.flipName, net.flip);
CHANGELOG.setAddress(desc.pipName, net.pip);
// Bump version
}
}
contract IlkCurveCfg {
function getIlkCfg() internal pure returns (SharedStructs.IlkDesc memory desc) {
}
}
contract SpellActionMainnet is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract SpellActionKovan is SpellAction, IlkCurveCfg {
function execute() external {
}
}
contract ActionSpell {
bool public done;
address public pause;
uint256 public expiration;
address public action;
bytes32 public tag;
uint256 public eta;
bytes public sig;
function setup(address deployer) internal {
}
function schedule() external {
}
function cast() public {
}
}
contract ActionSpellMainnet is ActionSpell {
constructor() public {
}
}
contract ActionSpellKovan is ActionSpell {
constructor() public {
}
}
| FlipAbstract(net.flip).ilk()==desc.ilk,"flip-ilk-not-match" | 323,127 | FlipAbstract(net.flip).ilk()==desc.ilk |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
CryptoMiningWarInterface miningWarInterface = CryptoMiningWarInterface(_addr);
require(<FILL_ME>)
miningWarAddress = _addr;
MiningWar = miningWarInterface;
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
}
function endRound() private
{
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| miningWarInterface.isMiningWarContract()==true | 323,135 | miningWarInterface.isMiningWarContract()==true |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
CryptoEngineerInterface engineerInterface = CryptoEngineerInterface(_addr);
require(<FILL_ME>)
Engineer = engineerInterface;
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
}
function endRound() private
{
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| engineerInterface.isEngineerContract()==true | 323,135 | engineerInterface.isEngineerContract()==true |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
require(<FILL_ME>)
uint256 crystalsLastRound = games[round].crystals;
uint256 prizePoolLastRound= games[round].prizePool;
round = round + 1;
uint256 startTime = now;
if (miningWarDeadline < SafeMath.add(startTime, MIN_TIME_WITH_DEADLINE)) startTime = miningWarDeadline;
uint256 endTime = startTime + HALF_TIME;
// claim 5% of current prizePool as rewards.
uint256 engineerPrizePool = getEngineerPrizePool();
uint256 prizePool = SafeMath.div(SafeMath.mul(engineerPrizePool, 5),100);
Engineer.claimPrizePool(address(this), prizePool);
if (crystalsLastRound == 0) prizePool = SafeMath.add(prizePool, prizePoolLastRound);
games[round] = Game(round, 0, prizePool, startTime, endTime, false);
}
function endRound() private
{
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| games[round].ended==true | 323,135 | games[round].ended==true |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
}
function endRound() private
{
require(<FILL_ME>)
require(games[round].endTime <= now);
Game storage g = games[round];
g.ended = true;
startRound();
emit EndRound(g.round, g.crystals, g.prizePool, g.startTime, g.endTime);
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| games[round].ended==false | 323,135 | games[round].ended==false |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
}
function endRound() private
{
require(games[round].ended == false);
require(<FILL_ME>)
Game storage g = games[round];
g.ended = true;
startRound();
emit EndRound(g.round, g.crystals, g.prizePool, g.startTime, g.endTime);
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| games[round].endTime<=now | 323,135 | games[round].endTime<=now |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Blockchain-based strategy game
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
function subVirus(address /*_addr*/, uint256 /*_value*/) public {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function isEngineerContract() external pure returns(bool) {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public {}
function isMiningWarContract() external pure returns(bool) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
}
contract CrystalDeposit {
using SafeMath for uint256;
address public administrator;
// mini game
uint256 public HALF_TIME = 48 hours;
uint256 public MIN_TIME_WITH_DEADLINE = 12 hours;
uint256 public round = 0;
CryptoEngineerInterface public Engineer;
CryptoMiningWarInterface public MiningWar;
// mining war info
address miningWarAddress;
uint256 miningWarDeadline;
uint256 constant private CRTSTAL_MINING_PERIOD = 86400;
/**
* @dev mini game information
*/
mapping(uint256 => Game) public games;
/**
* @dev player information
*/
mapping(address => Player) public players;
mapping(address => bool) public miniGames;
struct Game {
uint256 round;
uint256 crystals;
uint256 prizePool;
uint256 startTime;
uint256 endTime;
bool ended;
}
struct Player {
uint256 currentRound;
uint256 lastRound;
uint256 reward;
uint256 share; // your crystals share in current round
}
event EndRound(uint256 round, uint256 crystals, uint256 prizePool, uint256 startTime, uint256 endTime);
event Deposit(address player, uint256 currentRound, uint256 deposit, uint256 currentShare);
modifier isAdministrator()
{
}
modifier disableContract()
{
}
constructor() public {
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function isDepositContract() public pure returns(bool)
{
}
function upgrade(address addr) public isAdministrator
{
}
function setContractsMiniGame( address _addr ) public isAdministrator
{
}
/**
* @dev remove mini game contract from main contract
* @param _addr mini game contract address
*/
function removeContractMiniGame(address _addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
/**
* @dev start the mini game
*/
function startGame() public isAdministrator
{
}
function startRound() private
{
}
function endRound() private
{
}
/**
* @dev player send crystals to the pot
*/
function share(uint256 _value) public disableContract
{
require(games[round].ended == false);
require(<FILL_ME>)
require(_value >= 1);
MiningWar.subCrystal(msg.sender, _value);
if (games[round].endTime <= now) endRound();
updateReward(msg.sender);
Game storage g = games[round];
uint256 _share = SafeMath.mul(_value, CRTSTAL_MINING_PERIOD);
g.crystals = SafeMath.add(g.crystals, _share);
Player storage p = players[msg.sender];
if (p.currentRound == round) {
p.share = SafeMath.add(p.share, _share);
} else {
p.share = _share;
p.currentRound = round;
}
emit Deposit(msg.sender, p.currentRound, _value, p.share);
}
function getCurrentReward(address _addr) public view returns(uint256 _currentReward)
{
}
function withdrawReward(address _addr) public
{
}
function updateReward(address _addr) private
{
}
function getData(address _addr)
public
view
returns(
// current game
uint256 _prizePool,
uint256 _crystals,
uint256 _startTime,
uint256 _endTime,
// player info
uint256 _reward,
uint256 _share
) {
}
/**
* @dev calculate reward
*/
function calculateReward(address _addr, uint256 _round) public view returns(uint256)
{
}
function getCurrentGame() private view returns(uint256 _prizePool, uint256 _crystals, uint256 _startTime, uint256 _endTime)
{
}
function getPlayerData(address _addr) private view returns(uint256 _reward, uint256 _share)
{
}
function getEngineerPrizePool() private view returns(uint256)
{
}
}
| games[round].startTime<=now | 323,135 | games[round].startTime<=now |
"Purchase would exceed max supply of frens" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
// I hope you find what you're looking for fren
// yourfren.eth
pragma solidity ^0.7.0;
pragma abicoder v2;
contract HackerFrensContractNew is ERC721, Ownable {
using SafeMath for uint256;
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
uint256 public constant frenPrice = 35000000000000000; // 0.035 ETH
uint public constant maxFrenPurchase = 10;
uint256 public constant MAX_FRENS = 5000;
bool public saleIsActive = false;
mapping(uint => string) public frenNames;
// Reserve 100 Frens for team - Giveaways/Prizes etc, don't try 100 at a time you'll exceed gas limit
uint public frenReserve = 100;
event frenNameChange(address _by, uint _tokenId, string _name);
constructor() ERC721("Hacker Frens", "HACKERFRENS") { }
function withdraw() public onlyOwner {
}
function reserveFRENS(address _to, uint256 _reserveAmount) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintMyFren(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint fren");
require(numberOfTokens > 0 && numberOfTokens <= maxFrenPurchase, "Can only mint 10 tokens at a time");
require(<FILL_ME>)
require(msg.value >= frenPrice.mul(numberOfTokens), "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_FRENS) {
_safeMint(msg.sender, mintIndex);
}
}
}
function changeFrenName(uint _tokenId, string memory _name) public {
}
function viewFrenName(uint _tokenId) public view returns( string memory ){
}
// GET ALL FRENS OF A WALLET
function frenNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| totalSupply().add(numberOfTokens)<=MAX_FRENS,"Purchase would exceed max supply of frens" | 323,216 | totalSupply().add(numberOfTokens)<=MAX_FRENS |
"New name is same as the current one" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
// I hope you find what you're looking for fren
// yourfren.eth
pragma solidity ^0.7.0;
pragma abicoder v2;
contract HackerFrensContractNew is ERC721, Ownable {
using SafeMath for uint256;
string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS
uint256 public constant frenPrice = 35000000000000000; // 0.035 ETH
uint public constant maxFrenPurchase = 10;
uint256 public constant MAX_FRENS = 5000;
bool public saleIsActive = false;
mapping(uint => string) public frenNames;
// Reserve 100 Frens for team - Giveaways/Prizes etc, don't try 100 at a time you'll exceed gas limit
uint public frenReserve = 100;
event frenNameChange(address _by, uint _tokenId, string _name);
constructor() ERC721("Hacker Frens", "HACKERFRENS") { }
function withdraw() public onlyOwner {
}
function reserveFRENS(address _to, uint256 _reserveAmount) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintMyFren(uint numberOfTokens) public payable {
}
function changeFrenName(uint _tokenId, string memory _name) public {
require(ownerOf(_tokenId) == msg.sender, "Hey, your wallet doesn't own this fren!");
require(<FILL_ME>)
frenNames[_tokenId] = _name;
emit frenNameChange(msg.sender, _tokenId, _name);
}
function viewFrenName(uint _tokenId) public view returns( string memory ){
}
// GET ALL FRENS OF A WALLET
function frenNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| sha256(bytes(_name))!=sha256(bytes(frenNames[_tokenId])),"New name is same as the current one" | 323,216 | sha256(bytes(_name))!=sha256(bytes(frenNames[_tokenId])) |
null | // SPDX-License-Identifier: Unlicensed
/**
AvaInu($AINU)
Website:
https://www.avainu.org/
Telegram:
https://t.me/AvaInuOfficial
Twitter:
https://twitter.com/AvaInuOrg
*/
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract AvaInu is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1e12 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public _feeRedis = 10;
uint256 public _feeTeam = 10;
address payable private _redisWallet;
address payable private _teamWallet;
string private constant _name = "AvaInu";
string private constant _symbol = "AINU";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxTxAmount = _tTotal;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function removeStrictTxLimit() public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function manualswap() external {
require(<FILL_ME>)
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualsend() external {
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| _msgSender()==_redisWallet | 323,217 | _msgSender()==_redisWallet |
"Token is not eligible for claims" | // SPDX-License-Identifier: MIT
// NEKOCORE Reserve Minter
//
// @@@@@@@@@ (@@@@@*
// @@@/,,,,,%@@@@* %@@@@&*/@@@@
// &@@*,,,,,,,,,,&@@@@ (@@@@(,,,,,,,*@@@
// @@@,,,,,,,,,,,,,,*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,,,,,,,,,,,,%@@*
// @@@,,,,,,,,,,,,,,,,,,,*(/****,,,******,,,**/#@@@@(,,,,,,,,,,,,,,,,@@@
// @@@,,,,,,,,,,,,,,,,,,,******,,,******,,,******,,,,,,,,,,,,,,,,,,,,&@@,
// #@@(,,,,,,,,,,,,,,,,,,,******,,,******,,,,******,,,,,,,,,,,,,,,,,,,,@@@
// @@@*,,,,,,,,,,,,,,,,,,,,******,,,******,,,,******,,,,,,,,,,,,,,,,,,,@@@
// @@@,,,,,,,,,,,,,,,,,,,,,******,,,,******,,,,******,,,,,,,,,,,,,,,,,,#@@#
// @@@,,,,,,,,,,,,,,,,,,,,,*****,,,,,******,,,******,,,,,,,,,,,,,,,,,,,,@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,******,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// &@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%@@@
// @@@#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@@@
// @@@&,,,,,,,,,,,,,,,,,,,,,%&&&&&#*,,,,,,,,,,,,,,,,,,,*#&&&&&%,,,,,,,,,,,,,,,,,,%@@@
// ,@@@,,*********,,,,,,,,@&,,/@@@/,,@@&&*,,,,,,,,,*&@@,,*&@@(,,#@*,,,,,,*******,,,@@@,
// @@@%************,,,,&%,@#,,,,,,,*%@@,&@,,,,,,,,/@,@@&%*,,,,,,/@*/@,,************@@@@
// @@@/****,,,,,**,,,,@,@*,,,,,,,,,,,,,/@,@,,,,,,@*%%,,,,,,,,,,,,,,@,@,,***,,,,****&@@@
// @@@/,,,,,,,,,,,,,,@,&*,,,,,,,,,,,,,,,/%,*,(#,,,/%,,,,,,,,,,,,,,,,@,@,,,,,,,,,,,,@@@%
// %@@@*********,,,,,@,@,,,,,@,,,,,&#,,,,@*@@&#%@*#&,,,,@,,,,,(@,,,,@,@,,,*********@@@
// @@@/*********,,,,,@,@,,,,,,(&%*,,,@@@,@,(@@@@@,@#@@,,,(&%*,,,,,@,&*,,,********@@@%
// @@@*,,,,,,,,,,,,,,@,&@,,,,,,,,/@@@#,@((((((((@**@ %@&,,,,,,,%@,@,,,,,,,,,,,,@@@@
// @@@(,,,,,,,,,,,,,,,@%,/@@@@@@@*,&@(((((%&%((((@@,*@@@@@@@(,(@,,,,,,,,,,,,,@@@%
// @@@@,,,,,,,,,,,,,,*@@@&@@@@@%%&@((((@, @((((@&%@@@@@%&@@@*,,,,,,,,,,@@@@
// @@@@*,,,,,,,,,#@#(@@*,,&@((@%%%@((@,@(@ @((@%%%@((@&,,*@@(#@(,,,,,,@@@@/
// @@@@@,,,,,,(@(&/ %@@@* %%(&%%@(@,@(@ @(@%%&(%% /@@@# /&(@(,,&@@@@
// @@@@@%,,@@(@ @(((((@, %(&%%@(@,@(@ @(@%%%#% ,@(((((@ @(@@@@@@(
// (@@@@@@(@,@(((((@, &(%%%@(@,@(@ @(@%%%#& ,@(((((@,@(@@@
// @@@@#(@,,(/, @#(@@@(/@@ %@((@@@(#@ ,/(,,@(#@/
// &@@@,%@@(((##((#@@@,,,,,,,,,,,,,,,@@@#((##(((@@%
// @@@&******(@@@@*,,,,,,,,,,,,,,,,,,,,,,,*@@@@@@@(
// @@@@,****,,,,**,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// ,@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@/***********,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@*
// ,@@@,******,,**,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@/
// @@@&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@/
// @@@@@*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@%,,,,***,,,,,/((((((((/,,,,,,,,,,,,,,,,,,,,,*(((#@@@@,
// @@@,,,****,,,,@@@@@@@@@@@@@@,,,,,,,@@@,,,,,,,@@@@@@@@@#
// @@@******,,,*****&@@@@& @@@&,,,,,@@@@@,,,,,@@@@
// @@@@**,,,,****,,,,,@@@( (@@@@@@@@@&@@@@@@@@@
// @@@@@@@#***,,,,,#@@@
// ,&@@@@@@@@@@@@#
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "./NekoCore.sol";
contract NekoCoreReserve is IERC721Receiver, Ownable {
enum ClaimStrategy {
MATCH_BOGO,
ONLY_ONCE,
SET_EXPLICITLY
}
NekoCore public ORIGINAL_CONTRACT =
NekoCore(0xc1328cf1CF8dB8a5fC407CD56759007C7d20e398);
uint256 public ORIGINAL_PRICE = 0.09 ether;
uint256 public PRICE = 0.045 ether;
mapping(uint256 => uint256) public TIMES_CLAIMED;
uint256 public BUY_ONE_GET_X = 1; // used for buy-one-get-X
ClaimStrategy public CLAIM_STRATEGY_FOR_PAID_MINTS =
ClaimStrategy.MATCH_BOGO;
ClaimStrategy public CLAIM_STRATEGY_FOR_FREE_MINTS =
ClaimStrategy.MATCH_BOGO;
uint256 public EXPLICITLY_SET_CLAIMS_FOR_PAID_MINTS = 1;
uint256 public EXPLICITLY_SET_CLAIMS_FOR_FREE_MINTS = 1;
// ^^^ these are a little strange and we don't plan on using them, but it allows
// for better flexibility with the giveaway limits of new mints
uint256 public constant BATCH_CLAIM_SIZE = 1 << 6;
bool public MINTABLE = false;
// modifiers
// ---------------------------------------------------------
modifier refuelIfNeeded(uint256 count) {
}
modifier onlyIfMintable() {
}
// required overrides
// ---------------------------------------------------------
function onERC721Received(
address,
address,
uint256,
bytes memory
) public virtual override returns (bytes4) {
}
// public functions
// ---------------------------------------------------------
function mint(uint256 count)
external
payable
onlyIfMintable
refuelIfNeeded(count)
{
}
function claim(uint256 token_id) public onlyIfMintable refuelIfNeeded(1) {
require(<FILL_ME>)
require(
_msgSender() == ORIGINAL_CONTRACT.ownerOf(token_id),
"Caller is not the token owner"
);
ORIGINAL_CONTRACT.mint{value: ORIGINAL_PRICE}(1);
uint256 newTokenID = ORIGINAL_CONTRACT.MINTED();
TIMES_CLAIMED[token_id] += 1; // increment the claim count on the original token
if (CLAIM_STRATEGY_FOR_FREE_MINTS == ClaimStrategy.MATCH_BOGO) {
TIMES_CLAIMED[newTokenID] = BUY_ONE_GET_X;
} else if (CLAIM_STRATEGY_FOR_FREE_MINTS == ClaimStrategy.ONLY_ONCE) {
TIMES_CLAIMED[newTokenID] = type(uint256).max;
} else {
TIMES_CLAIMED[newTokenID] = EXPLICITLY_SET_CLAIMS_FOR_FREE_MINTS;
}
ORIGINAL_CONTRACT.safeTransferFrom(
address(this),
msg.sender,
newTokenID
);
}
function claimAll(uint256[] calldata claims)
public
onlyIfMintable
refuelIfNeeded(claims.length)
{
}
// public views
// ---------------------------------------------------------
function claimable(uint256 token_id) public view returns (bool) {
}
function claimsAvailable(address test)
public
view
returns (uint256[BATCH_CLAIM_SIZE] memory)
{
}
// onlyOwner
// ---------------------------------------------------------
function setMintable(bool mintable) external onlyOwner {
}
function setMintPrice(uint256 amtWei) external onlyOwner {
}
function setRedemptionAmount(uint256 amt) external onlyOwner {
}
function setTokenClaimCountManually(uint token_id, uint256 claims) external onlyOwner {
}
function setClaimStrategyAndLimits(
ClaimStrategy free,
uint256 freeExplicitlySet,
ClaimStrategy paid,
uint256 paidExplicitlySet
) external onlyOwner {
}
function setTargetContract(address nkc) external onlyOwner {
}
function airdrop(uint256 count, address to)
external
onlyOwner
refuelIfNeeded(count)
{
}
function reclaimOwnership() external onlyOwner {
}
function withdraw(uint256 amtWei) external onlyOwner {
}
// internal
// ---------------------------------------------------------
function _refuel() internal {
}
// fallbacks (ability to fund this contract)
// ---------------------------------------------------------
receive() external payable {}
}
| claimable(token_id),"Token is not eligible for claims" | 323,239 | claimable(token_id) |
"Caller is not the token owner" | // SPDX-License-Identifier: MIT
// NEKOCORE Reserve Minter
//
// @@@@@@@@@ (@@@@@*
// @@@/,,,,,%@@@@* %@@@@&*/@@@@
// &@@*,,,,,,,,,,&@@@@ (@@@@(,,,,,,,*@@@
// @@@,,,,,,,,,,,,,,*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,,,,,,,,,,,,%@@*
// @@@,,,,,,,,,,,,,,,,,,,*(/****,,,******,,,**/#@@@@(,,,,,,,,,,,,,,,,@@@
// @@@,,,,,,,,,,,,,,,,,,,******,,,******,,,******,,,,,,,,,,,,,,,,,,,,&@@,
// #@@(,,,,,,,,,,,,,,,,,,,******,,,******,,,,******,,,,,,,,,,,,,,,,,,,,@@@
// @@@*,,,,,,,,,,,,,,,,,,,,******,,,******,,,,******,,,,,,,,,,,,,,,,,,,@@@
// @@@,,,,,,,,,,,,,,,,,,,,,******,,,,******,,,,******,,,,,,,,,,,,,,,,,,#@@#
// @@@,,,,,,,,,,,,,,,,,,,,,*****,,,,,******,,,******,,,,,,,,,,,,,,,,,,,,@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,******,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// &@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%@@@
// @@@#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@@@
// @@@&,,,,,,,,,,,,,,,,,,,,,%&&&&&#*,,,,,,,,,,,,,,,,,,,*#&&&&&%,,,,,,,,,,,,,,,,,,%@@@
// ,@@@,,*********,,,,,,,,@&,,/@@@/,,@@&&*,,,,,,,,,*&@@,,*&@@(,,#@*,,,,,,*******,,,@@@,
// @@@%************,,,,&%,@#,,,,,,,*%@@,&@,,,,,,,,/@,@@&%*,,,,,,/@*/@,,************@@@@
// @@@/****,,,,,**,,,,@,@*,,,,,,,,,,,,,/@,@,,,,,,@*%%,,,,,,,,,,,,,,@,@,,***,,,,****&@@@
// @@@/,,,,,,,,,,,,,,@,&*,,,,,,,,,,,,,,,/%,*,(#,,,/%,,,,,,,,,,,,,,,,@,@,,,,,,,,,,,,@@@%
// %@@@*********,,,,,@,@,,,,,@,,,,,&#,,,,@*@@&#%@*#&,,,,@,,,,,(@,,,,@,@,,,*********@@@
// @@@/*********,,,,,@,@,,,,,,(&%*,,,@@@,@,(@@@@@,@#@@,,,(&%*,,,,,@,&*,,,********@@@%
// @@@*,,,,,,,,,,,,,,@,&@,,,,,,,,/@@@#,@((((((((@**@ %@&,,,,,,,%@,@,,,,,,,,,,,,@@@@
// @@@(,,,,,,,,,,,,,,,@%,/@@@@@@@*,&@(((((%&%((((@@,*@@@@@@@(,(@,,,,,,,,,,,,,@@@%
// @@@@,,,,,,,,,,,,,,*@@@&@@@@@%%&@((((@, @((((@&%@@@@@%&@@@*,,,,,,,,,,@@@@
// @@@@*,,,,,,,,,#@#(@@*,,&@((@%%%@((@,@(@ @((@%%%@((@&,,*@@(#@(,,,,,,@@@@/
// @@@@@,,,,,,(@(&/ %@@@* %%(&%%@(@,@(@ @(@%%&(%% /@@@# /&(@(,,&@@@@
// @@@@@%,,@@(@ @(((((@, %(&%%@(@,@(@ @(@%%%#% ,@(((((@ @(@@@@@@(
// (@@@@@@(@,@(((((@, &(%%%@(@,@(@ @(@%%%#& ,@(((((@,@(@@@
// @@@@#(@,,(/, @#(@@@(/@@ %@((@@@(#@ ,/(,,@(#@/
// &@@@,%@@(((##((#@@@,,,,,,,,,,,,,,,@@@#((##(((@@%
// @@@&******(@@@@*,,,,,,,,,,,,,,,,,,,,,,,*@@@@@@@(
// @@@@,****,,,,**,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// ,@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@/***********,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@*
// ,@@@,******,,**,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@/
// @@@&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@/
// @@@@@*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@
// @@@%,,,,***,,,,,/((((((((/,,,,,,,,,,,,,,,,,,,,,*(((#@@@@,
// @@@,,,****,,,,@@@@@@@@@@@@@@,,,,,,,@@@,,,,,,,@@@@@@@@@#
// @@@******,,,*****&@@@@& @@@&,,,,,@@@@@,,,,,@@@@
// @@@@**,,,,****,,,,,@@@( (@@@@@@@@@&@@@@@@@@@
// @@@@@@@#***,,,,,#@@@
// ,&@@@@@@@@@@@@#
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "./NekoCore.sol";
contract NekoCoreReserve is IERC721Receiver, Ownable {
enum ClaimStrategy {
MATCH_BOGO,
ONLY_ONCE,
SET_EXPLICITLY
}
NekoCore public ORIGINAL_CONTRACT =
NekoCore(0xc1328cf1CF8dB8a5fC407CD56759007C7d20e398);
uint256 public ORIGINAL_PRICE = 0.09 ether;
uint256 public PRICE = 0.045 ether;
mapping(uint256 => uint256) public TIMES_CLAIMED;
uint256 public BUY_ONE_GET_X = 1; // used for buy-one-get-X
ClaimStrategy public CLAIM_STRATEGY_FOR_PAID_MINTS =
ClaimStrategy.MATCH_BOGO;
ClaimStrategy public CLAIM_STRATEGY_FOR_FREE_MINTS =
ClaimStrategy.MATCH_BOGO;
uint256 public EXPLICITLY_SET_CLAIMS_FOR_PAID_MINTS = 1;
uint256 public EXPLICITLY_SET_CLAIMS_FOR_FREE_MINTS = 1;
// ^^^ these are a little strange and we don't plan on using them, but it allows
// for better flexibility with the giveaway limits of new mints
uint256 public constant BATCH_CLAIM_SIZE = 1 << 6;
bool public MINTABLE = false;
// modifiers
// ---------------------------------------------------------
modifier refuelIfNeeded(uint256 count) {
}
modifier onlyIfMintable() {
}
// required overrides
// ---------------------------------------------------------
function onERC721Received(
address,
address,
uint256,
bytes memory
) public virtual override returns (bytes4) {
}
// public functions
// ---------------------------------------------------------
function mint(uint256 count)
external
payable
onlyIfMintable
refuelIfNeeded(count)
{
}
function claim(uint256 token_id) public onlyIfMintable refuelIfNeeded(1) {
require(claimable(token_id), "Token is not eligible for claims");
require(<FILL_ME>)
ORIGINAL_CONTRACT.mint{value: ORIGINAL_PRICE}(1);
uint256 newTokenID = ORIGINAL_CONTRACT.MINTED();
TIMES_CLAIMED[token_id] += 1; // increment the claim count on the original token
if (CLAIM_STRATEGY_FOR_FREE_MINTS == ClaimStrategy.MATCH_BOGO) {
TIMES_CLAIMED[newTokenID] = BUY_ONE_GET_X;
} else if (CLAIM_STRATEGY_FOR_FREE_MINTS == ClaimStrategy.ONLY_ONCE) {
TIMES_CLAIMED[newTokenID] = type(uint256).max;
} else {
TIMES_CLAIMED[newTokenID] = EXPLICITLY_SET_CLAIMS_FOR_FREE_MINTS;
}
ORIGINAL_CONTRACT.safeTransferFrom(
address(this),
msg.sender,
newTokenID
);
}
function claimAll(uint256[] calldata claims)
public
onlyIfMintable
refuelIfNeeded(claims.length)
{
}
// public views
// ---------------------------------------------------------
function claimable(uint256 token_id) public view returns (bool) {
}
function claimsAvailable(address test)
public
view
returns (uint256[BATCH_CLAIM_SIZE] memory)
{
}
// onlyOwner
// ---------------------------------------------------------
function setMintable(bool mintable) external onlyOwner {
}
function setMintPrice(uint256 amtWei) external onlyOwner {
}
function setRedemptionAmount(uint256 amt) external onlyOwner {
}
function setTokenClaimCountManually(uint token_id, uint256 claims) external onlyOwner {
}
function setClaimStrategyAndLimits(
ClaimStrategy free,
uint256 freeExplicitlySet,
ClaimStrategy paid,
uint256 paidExplicitlySet
) external onlyOwner {
}
function setTargetContract(address nkc) external onlyOwner {
}
function airdrop(uint256 count, address to)
external
onlyOwner
refuelIfNeeded(count)
{
}
function reclaimOwnership() external onlyOwner {
}
function withdraw(uint256 amtWei) external onlyOwner {
}
// internal
// ---------------------------------------------------------
function _refuel() internal {
}
// fallbacks (ability to fund this contract)
// ---------------------------------------------------------
receive() external payable {}
}
| _msgSender()==ORIGINAL_CONTRACT.ownerOf(token_id),"Caller is not the token owner" | 323,239 | _msgSender()==ORIGINAL_CONTRACT.ownerOf(token_id) |
"Attempting to mint more tokens than are available" | // SPDX-License-Identifier: MIT
//
//
// @@@@@@@@@ %@@@@@#
// @@@/.....%@@@@# &@@@@%**@@@@
// @@@*..........&@@@@ %@@@@/.......,@@@
// @@@..............*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............%@@#
// @@@...................* ////*...//////...///#@@@@ ................@@@
// @@@...................,/////*...//////...//////,..................&@@#
// %@@/...................,/////*...//////...//////,...................@@@
// @@@,...................,/////*...//////...//////....................@@@
// @@@,.....................*/*.....//////....////*....................#@@&
// @@@,............................./////,.............................,@@@
// @@@@..................................................................@@@
// @@@@#@@@@....................................................................@@@@ &@@@@@@
// #@@****@@@@@%............................................................../@@@@@ ,,**/@@
// @@@******,,, @@@@&*............................................,%@@@@&*,,,,,*****@@#
// @@@& @@**********,,,,*%@@@@/............................,%@@@@#,,,,,,,*********@@@
// #@@@//// @@****************,,,,*@@@@%............,@@@@&*,,,,,,***************@@#@@@
// @@@%.......*@&/************************* @@@@@/***************************&@ ...@@@@
// @@@,..........*@%//////********************************************////#@ ......%@@@
// @@@#////////////,*@#/////////////////////////*////////////////////// @#/////////@@@&
// &@@@////////////....*@ ///////////////////&@@ ////////////////////@ .///////////@@@
// @@@,................../@ ///////// &@&........./@@#///////////@&..............@@@&
// @@@////////............. @ @@&.....................,@@& @@..........//////@@@@
// @@@#////////....................@/*..,..,...../ @..................///////@@@&
// @@@@/////*......................*@**********/@,....................*///@@@@
// @@@@,............................*@@@%@@@,.........................@@@@%
// @@@@@.........................................................%@@@@
// @@@@@%.................................................*@@@@@%
// %@@@@@@%.......................................*@@@@@@@
// @@@@ ....................................@@@@@
// @@@@*/*,...................................@@@
// @@@@//////,.................................@@@%
// @@@@//////,...................................@@@
// #@@@...........................................@@@
// @@@////*.......................................@@@#
// @@@/////*......................................@@@%
// @@@@///*........................................@@@#
// @@@@@*.............................................@@@
// @@@@.................................................@@@
// @@@#............* /,....................* @@@@
// @@@...........&@@@@@@@@@@@@@.......@@@.......@@@@@@@@@&
// @@@,............,&@@@@@ @@@&.....@@@@@,....@@@@
// @@@@...............@@@% %@@@@@@@@@@@@@@@@@@@
// @@@@@@@ ........#@@@
// #@@@@@@@@@@@@@&
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NekoCore is ERC721, Ownable {
uint256 public constant PRICE_PER_TOKEN = 0.09 ether;
uint256 public constant PRICE_PER_TOKEN_PRESALE = 0.06 ether;
uint256 public constant SUPPLY_MAX = 9999;
uint256 public constant LIMIT_PUBLIC_MINT = 20;
uint256 public constant LIMIT_PRESALE_MINT = 2;
uint256 public constant TROPHY_COUNT = 72;
bytes32 public immutable PROVENANCE; // keccak256 of all metadata in order, 1..9999
bytes32 public WHITELIST_ROOT; // merkle root
uint256 public MINTED; // default = 0;
bool public MINTABLE; // default = false;
bool public MINTABLE_PRESALE; // default = false;
mapping(address => uint) private _presale_balance;
string private _baseTokenURI; // default = "";
constructor(
address catKing,
string memory baseTokenURI,
bytes32 provenance
) ERC721("NekoCore", "NEKOCORE") {
}
// --- overrides --------------------------------------------------
// ----------------------------------------------------------------
function _baseURI() internal view override returns (string memory) {
}
// --- only owner -------------------------------------------------
// ----------------------------------------------------------------
function mintReservedTokens(address[] calldata addresses, uint256[] calldata counts) public onlyOwner {
}
function setTokenURI(string calldata uri) public onlyOwner {
}
function setMintable(bool allow) public onlyOwner {
}
function setMintablePresale(bool allow) public onlyOwner {
}
function setWhitelistRoot(bytes32 root) public onlyOwner {
}
function withdraw() public onlyOwner {
}
// --- public use -------------------------------------------------
// ----------------------------------------------------------------
function totalSupply() external view returns (uint256) {
}
function premintCount(address test) external view returns (uint256) {
}
function mint(uint256 count) external payable {
uint256 _current = MINTED;
require(MINTABLE, "Contract is not currently mintable");
require(count <= LIMIT_PUBLIC_MINT, "Exceeded maximum mint count");
require(<FILL_ME>)
require(msg.value >= PRICE_PER_TOKEN * count, "Minting fee not met");
for(uint256 i = 1; i <= count; i++) {
_mint(_msgSender(), _current + i);
}
// update supply count
MINTED = _current + count;
}
function mintPresale(uint256 count, bytes32[] calldata proof) external payable {
}
}
| (_current+count)<=SUPPLY_MAX,"Attempting to mint more tokens than are available" | 323,240 | (_current+count)<=SUPPLY_MAX |
"Contract is live, no longer in presale" | // SPDX-License-Identifier: MIT
//
//
// @@@@@@@@@ %@@@@@#
// @@@/.....%@@@@# &@@@@%**@@@@
// @@@*..........&@@@@ %@@@@/.......,@@@
// @@@..............*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............%@@#
// @@@...................* ////*...//////...///#@@@@ ................@@@
// @@@...................,/////*...//////...//////,..................&@@#
// %@@/...................,/////*...//////...//////,...................@@@
// @@@,...................,/////*...//////...//////....................@@@
// @@@,.....................*/*.....//////....////*....................#@@&
// @@@,............................./////,.............................,@@@
// @@@@..................................................................@@@
// @@@@#@@@@....................................................................@@@@ &@@@@@@
// #@@****@@@@@%............................................................../@@@@@ ,,**/@@
// @@@******,,, @@@@&*............................................,%@@@@&*,,,,,*****@@#
// @@@& @@**********,,,,*%@@@@/............................,%@@@@#,,,,,,,*********@@@
// #@@@//// @@****************,,,,*@@@@%............,@@@@&*,,,,,,***************@@#@@@
// @@@%.......*@&/************************* @@@@@/***************************&@ ...@@@@
// @@@,..........*@%//////********************************************////#@ ......%@@@
// @@@#////////////,*@#/////////////////////////*////////////////////// @#/////////@@@&
// &@@@////////////....*@ ///////////////////&@@ ////////////////////@ .///////////@@@
// @@@,................../@ ///////// &@&........./@@#///////////@&..............@@@&
// @@@////////............. @ @@&.....................,@@& @@..........//////@@@@
// @@@#////////....................@/*..,..,...../ @..................///////@@@&
// @@@@/////*......................*@**********/@,....................*///@@@@
// @@@@,............................*@@@%@@@,.........................@@@@%
// @@@@@.........................................................%@@@@
// @@@@@%.................................................*@@@@@%
// %@@@@@@%.......................................*@@@@@@@
// @@@@ ....................................@@@@@
// @@@@*/*,...................................@@@
// @@@@//////,.................................@@@%
// @@@@//////,...................................@@@
// #@@@...........................................@@@
// @@@////*.......................................@@@#
// @@@/////*......................................@@@%
// @@@@///*........................................@@@#
// @@@@@*.............................................@@@
// @@@@.................................................@@@
// @@@#............* /,....................* @@@@
// @@@...........&@@@@@@@@@@@@@.......@@@.......@@@@@@@@@&
// @@@,............,&@@@@@ @@@&.....@@@@@,....@@@@
// @@@@...............@@@% %@@@@@@@@@@@@@@@@@@@
// @@@@@@@ ........#@@@
// #@@@@@@@@@@@@@&
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NekoCore is ERC721, Ownable {
uint256 public constant PRICE_PER_TOKEN = 0.09 ether;
uint256 public constant PRICE_PER_TOKEN_PRESALE = 0.06 ether;
uint256 public constant SUPPLY_MAX = 9999;
uint256 public constant LIMIT_PUBLIC_MINT = 20;
uint256 public constant LIMIT_PRESALE_MINT = 2;
uint256 public constant TROPHY_COUNT = 72;
bytes32 public immutable PROVENANCE; // keccak256 of all metadata in order, 1..9999
bytes32 public WHITELIST_ROOT; // merkle root
uint256 public MINTED; // default = 0;
bool public MINTABLE; // default = false;
bool public MINTABLE_PRESALE; // default = false;
mapping(address => uint) private _presale_balance;
string private _baseTokenURI; // default = "";
constructor(
address catKing,
string memory baseTokenURI,
bytes32 provenance
) ERC721("NekoCore", "NEKOCORE") {
}
// --- overrides --------------------------------------------------
// ----------------------------------------------------------------
function _baseURI() internal view override returns (string memory) {
}
// --- only owner -------------------------------------------------
// ----------------------------------------------------------------
function mintReservedTokens(address[] calldata addresses, uint256[] calldata counts) public onlyOwner {
}
function setTokenURI(string calldata uri) public onlyOwner {
}
function setMintable(bool allow) public onlyOwner {
}
function setMintablePresale(bool allow) public onlyOwner {
}
function setWhitelistRoot(bytes32 root) public onlyOwner {
}
function withdraw() public onlyOwner {
}
// --- public use -------------------------------------------------
// ----------------------------------------------------------------
function totalSupply() external view returns (uint256) {
}
function premintCount(address test) external view returns (uint256) {
}
function mint(uint256 count) external payable {
}
function mintPresale(uint256 count, bytes32[] calldata proof) external payable {
uint256 _current = MINTED;
require(<FILL_ME>)
require(MINTABLE_PRESALE, "Contract is not currently in presale");
require(MerkleProof.verify(proof, WHITELIST_ROOT, keccak256(abi.encodePacked(_msgSender()))), "Caller did not provide valid whitelist proof");
require(count <= LIMIT_PRESALE_MINT, "Exceeded maximum mint count for presale");
require((_presale_balance[_msgSender()] + count) <= LIMIT_PRESALE_MINT, "Caller has already minted the maximum presale amount");
require((_current + count) <= SUPPLY_MAX, "Attempting to mint more tokens than are available");
require(msg.value >= PRICE_PER_TOKEN_PRESALE * count, "Minting fee not met");
for(uint256 i = 1; i <= count; i++) {
_mint(_msgSender(), _current + i);
}
// update supply count
_presale_balance[_msgSender()] += count;
MINTED = _current + count;
}
}
| !MINTABLE,"Contract is live, no longer in presale" | 323,240 | !MINTABLE |
"Caller did not provide valid whitelist proof" | // SPDX-License-Identifier: MIT
//
//
// @@@@@@@@@ %@@@@@#
// @@@/.....%@@@@# &@@@@%**@@@@
// @@@*..........&@@@@ %@@@@/.......,@@@
// @@@..............*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............%@@#
// @@@...................* ////*...//////...///#@@@@ ................@@@
// @@@...................,/////*...//////...//////,..................&@@#
// %@@/...................,/////*...//////...//////,...................@@@
// @@@,...................,/////*...//////...//////....................@@@
// @@@,.....................*/*.....//////....////*....................#@@&
// @@@,............................./////,.............................,@@@
// @@@@..................................................................@@@
// @@@@#@@@@....................................................................@@@@ &@@@@@@
// #@@****@@@@@%............................................................../@@@@@ ,,**/@@
// @@@******,,, @@@@&*............................................,%@@@@&*,,,,,*****@@#
// @@@& @@**********,,,,*%@@@@/............................,%@@@@#,,,,,,,*********@@@
// #@@@//// @@****************,,,,*@@@@%............,@@@@&*,,,,,,***************@@#@@@
// @@@%.......*@&/************************* @@@@@/***************************&@ ...@@@@
// @@@,..........*@%//////********************************************////#@ ......%@@@
// @@@#////////////,*@#/////////////////////////*////////////////////// @#/////////@@@&
// &@@@////////////....*@ ///////////////////&@@ ////////////////////@ .///////////@@@
// @@@,................../@ ///////// &@&........./@@#///////////@&..............@@@&
// @@@////////............. @ @@&.....................,@@& @@..........//////@@@@
// @@@#////////....................@/*..,..,...../ @..................///////@@@&
// @@@@/////*......................*@**********/@,....................*///@@@@
// @@@@,............................*@@@%@@@,.........................@@@@%
// @@@@@.........................................................%@@@@
// @@@@@%.................................................*@@@@@%
// %@@@@@@%.......................................*@@@@@@@
// @@@@ ....................................@@@@@
// @@@@*/*,...................................@@@
// @@@@//////,.................................@@@%
// @@@@//////,...................................@@@
// #@@@...........................................@@@
// @@@////*.......................................@@@#
// @@@/////*......................................@@@%
// @@@@///*........................................@@@#
// @@@@@*.............................................@@@
// @@@@.................................................@@@
// @@@#............* /,....................* @@@@
// @@@...........&@@@@@@@@@@@@@.......@@@.......@@@@@@@@@&
// @@@,............,&@@@@@ @@@&.....@@@@@,....@@@@
// @@@@...............@@@% %@@@@@@@@@@@@@@@@@@@
// @@@@@@@ ........#@@@
// #@@@@@@@@@@@@@&
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NekoCore is ERC721, Ownable {
uint256 public constant PRICE_PER_TOKEN = 0.09 ether;
uint256 public constant PRICE_PER_TOKEN_PRESALE = 0.06 ether;
uint256 public constant SUPPLY_MAX = 9999;
uint256 public constant LIMIT_PUBLIC_MINT = 20;
uint256 public constant LIMIT_PRESALE_MINT = 2;
uint256 public constant TROPHY_COUNT = 72;
bytes32 public immutable PROVENANCE; // keccak256 of all metadata in order, 1..9999
bytes32 public WHITELIST_ROOT; // merkle root
uint256 public MINTED; // default = 0;
bool public MINTABLE; // default = false;
bool public MINTABLE_PRESALE; // default = false;
mapping(address => uint) private _presale_balance;
string private _baseTokenURI; // default = "";
constructor(
address catKing,
string memory baseTokenURI,
bytes32 provenance
) ERC721("NekoCore", "NEKOCORE") {
}
// --- overrides --------------------------------------------------
// ----------------------------------------------------------------
function _baseURI() internal view override returns (string memory) {
}
// --- only owner -------------------------------------------------
// ----------------------------------------------------------------
function mintReservedTokens(address[] calldata addresses, uint256[] calldata counts) public onlyOwner {
}
function setTokenURI(string calldata uri) public onlyOwner {
}
function setMintable(bool allow) public onlyOwner {
}
function setMintablePresale(bool allow) public onlyOwner {
}
function setWhitelistRoot(bytes32 root) public onlyOwner {
}
function withdraw() public onlyOwner {
}
// --- public use -------------------------------------------------
// ----------------------------------------------------------------
function totalSupply() external view returns (uint256) {
}
function premintCount(address test) external view returns (uint256) {
}
function mint(uint256 count) external payable {
}
function mintPresale(uint256 count, bytes32[] calldata proof) external payable {
uint256 _current = MINTED;
require(!MINTABLE, "Contract is live, no longer in presale");
require(MINTABLE_PRESALE, "Contract is not currently in presale");
require(<FILL_ME>)
require(count <= LIMIT_PRESALE_MINT, "Exceeded maximum mint count for presale");
require((_presale_balance[_msgSender()] + count) <= LIMIT_PRESALE_MINT, "Caller has already minted the maximum presale amount");
require((_current + count) <= SUPPLY_MAX, "Attempting to mint more tokens than are available");
require(msg.value >= PRICE_PER_TOKEN_PRESALE * count, "Minting fee not met");
for(uint256 i = 1; i <= count; i++) {
_mint(_msgSender(), _current + i);
}
// update supply count
_presale_balance[_msgSender()] += count;
MINTED = _current + count;
}
}
| MerkleProof.verify(proof,WHITELIST_ROOT,keccak256(abi.encodePacked(_msgSender()))),"Caller did not provide valid whitelist proof" | 323,240 | MerkleProof.verify(proof,WHITELIST_ROOT,keccak256(abi.encodePacked(_msgSender()))) |
"Caller has already minted the maximum presale amount" | // SPDX-License-Identifier: MIT
//
//
// @@@@@@@@@ %@@@@@#
// @@@/.....%@@@@# &@@@@%**@@@@
// @@@*..........&@@@@ %@@@@/.......,@@@
// @@@..............*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............%@@#
// @@@...................* ////*...//////...///#@@@@ ................@@@
// @@@...................,/////*...//////...//////,..................&@@#
// %@@/...................,/////*...//////...//////,...................@@@
// @@@,...................,/////*...//////...//////....................@@@
// @@@,.....................*/*.....//////....////*....................#@@&
// @@@,............................./////,.............................,@@@
// @@@@..................................................................@@@
// @@@@#@@@@....................................................................@@@@ &@@@@@@
// #@@****@@@@@%............................................................../@@@@@ ,,**/@@
// @@@******,,, @@@@&*............................................,%@@@@&*,,,,,*****@@#
// @@@& @@**********,,,,*%@@@@/............................,%@@@@#,,,,,,,*********@@@
// #@@@//// @@****************,,,,*@@@@%............,@@@@&*,,,,,,***************@@#@@@
// @@@%.......*@&/************************* @@@@@/***************************&@ ...@@@@
// @@@,..........*@%//////********************************************////#@ ......%@@@
// @@@#////////////,*@#/////////////////////////*////////////////////// @#/////////@@@&
// &@@@////////////....*@ ///////////////////&@@ ////////////////////@ .///////////@@@
// @@@,................../@ ///////// &@&........./@@#///////////@&..............@@@&
// @@@////////............. @ @@&.....................,@@& @@..........//////@@@@
// @@@#////////....................@/*..,..,...../ @..................///////@@@&
// @@@@/////*......................*@**********/@,....................*///@@@@
// @@@@,............................*@@@%@@@,.........................@@@@%
// @@@@@.........................................................%@@@@
// @@@@@%.................................................*@@@@@%
// %@@@@@@%.......................................*@@@@@@@
// @@@@ ....................................@@@@@
// @@@@*/*,...................................@@@
// @@@@//////,.................................@@@%
// @@@@//////,...................................@@@
// #@@@...........................................@@@
// @@@////*.......................................@@@#
// @@@/////*......................................@@@%
// @@@@///*........................................@@@#
// @@@@@*.............................................@@@
// @@@@.................................................@@@
// @@@#............* /,....................* @@@@
// @@@...........&@@@@@@@@@@@@@.......@@@.......@@@@@@@@@&
// @@@,............,&@@@@@ @@@&.....@@@@@,....@@@@
// @@@@...............@@@% %@@@@@@@@@@@@@@@@@@@
// @@@@@@@ ........#@@@
// #@@@@@@@@@@@@@&
//
//
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NekoCore is ERC721, Ownable {
uint256 public constant PRICE_PER_TOKEN = 0.09 ether;
uint256 public constant PRICE_PER_TOKEN_PRESALE = 0.06 ether;
uint256 public constant SUPPLY_MAX = 9999;
uint256 public constant LIMIT_PUBLIC_MINT = 20;
uint256 public constant LIMIT_PRESALE_MINT = 2;
uint256 public constant TROPHY_COUNT = 72;
bytes32 public immutable PROVENANCE; // keccak256 of all metadata in order, 1..9999
bytes32 public WHITELIST_ROOT; // merkle root
uint256 public MINTED; // default = 0;
bool public MINTABLE; // default = false;
bool public MINTABLE_PRESALE; // default = false;
mapping(address => uint) private _presale_balance;
string private _baseTokenURI; // default = "";
constructor(
address catKing,
string memory baseTokenURI,
bytes32 provenance
) ERC721("NekoCore", "NEKOCORE") {
}
// --- overrides --------------------------------------------------
// ----------------------------------------------------------------
function _baseURI() internal view override returns (string memory) {
}
// --- only owner -------------------------------------------------
// ----------------------------------------------------------------
function mintReservedTokens(address[] calldata addresses, uint256[] calldata counts) public onlyOwner {
}
function setTokenURI(string calldata uri) public onlyOwner {
}
function setMintable(bool allow) public onlyOwner {
}
function setMintablePresale(bool allow) public onlyOwner {
}
function setWhitelistRoot(bytes32 root) public onlyOwner {
}
function withdraw() public onlyOwner {
}
// --- public use -------------------------------------------------
// ----------------------------------------------------------------
function totalSupply() external view returns (uint256) {
}
function premintCount(address test) external view returns (uint256) {
}
function mint(uint256 count) external payable {
}
function mintPresale(uint256 count, bytes32[] calldata proof) external payable {
uint256 _current = MINTED;
require(!MINTABLE, "Contract is live, no longer in presale");
require(MINTABLE_PRESALE, "Contract is not currently in presale");
require(MerkleProof.verify(proof, WHITELIST_ROOT, keccak256(abi.encodePacked(_msgSender()))), "Caller did not provide valid whitelist proof");
require(count <= LIMIT_PRESALE_MINT, "Exceeded maximum mint count for presale");
require(<FILL_ME>)
require((_current + count) <= SUPPLY_MAX, "Attempting to mint more tokens than are available");
require(msg.value >= PRICE_PER_TOKEN_PRESALE * count, "Minting fee not met");
for(uint256 i = 1; i <= count; i++) {
_mint(_msgSender(), _current + i);
}
// update supply count
_presale_balance[_msgSender()] += count;
MINTED = _current + count;
}
}
| (_presale_balance[_msgSender()]+count)<=LIMIT_PRESALE_MINT,"Caller has already minted the maximum presale amount" | 323,240 | (_presale_balance[_msgSender()]+count)<=LIMIT_PRESALE_MINT |
"" | pragma solidity 0.5.6;
contract Ownable {
address public owner;
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// Developer @gogol
// Design @chechenets
// Architect @tugush
contract Manageable is Ownable {
mapping(address => bool) public listOfManagers;
modifier onlyManager() {
require(<FILL_ME>)
_;
}
function addManager(address _manager) public onlyOwner returns (bool success) {
}
function removeManager(address _manager) public onlyOwner returns (bool success) {
}
function getInfo(address _manager) public view returns (bool) {
}
}
// Developer @gogol
// Design @chechenets
// Architect @tugush
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// Developer @gogol
// Design @chechenets
// Architect @tugush
contract iRNG {
function update(uint roundNumber, uint additionalNonce, uint period) public payable;
}
contract BaseGame is Manageable {
using SafeMath for uint;
enum RoundState {NOT_STARTED, ACCEPT_FUNDS, WAIT_RESULT, SUCCESS, REFUND}
struct Round {
RoundState state;
uint ticketsCount;
uint participantCount;
TicketsInterval[] tickets;
address[] participants;
uint random;
uint nonce; //xored participants addresses
uint startRoundTime;
uint[] winningTickets;
address[] winners;
uint roundFunds;
mapping(address => uint) winnersFunds;
mapping(address => uint) participantFunds;
mapping(address => bool) sendGain;
}
struct TicketsInterval {
address participant;
uint firstTicket;
uint lastTicket;
}
uint constant public NUMBER_OF_WINNERS = 10;
uint constant public SHARE_DENOMINATOR = 10000;
uint constant public ORACLIZE_TIMEOUT = 86400; // one day
uint[] public shareOfWinners = [5000, 2500, 1250, 620, 320, 160, 80, 40, 20, 10];
address payable public organiser;
uint constant public ORGANISER_PERCENT = 20;
uint constant public ROUND_FUND_PERCENT = 80;
uint public period;
address public hourlyGame;
address public management;
address payable public rng;
mapping (uint => Round) public rounds;
uint public ticketPrice;
uint public currentRound;
event GameStarted(uint start);
event RoundStateChanged(uint currentRound, RoundState state);
event ParticipantAdded(uint round, address participant, uint ticketsCount, uint funds);
event RoundProcecced(uint round, address[] winners, uint[] winningTickets, uint roundFunds);
event RefundIsSuccess(uint round, address participant, uint funds);
event RefundIsFailed(uint round, address participant);
event Withdraw(address participant, uint funds, uint fromRound, uint toRound);
event TicketPriceChanged(uint price);
modifier onlyRng {
}
modifier onlyGameContract {
}
constructor (address payable _rng, uint _period) public {
}
function setContracts(address payable _rng, address _hourlyGame, address _management) public onlyOwner {
}
function startGame(uint _startPeriod) public payable onlyGameContract {
}
function buyTickets(address _participant) public payable onlyGameContract {
}
function buyBonusTickets(address _participant, uint _ticketsCount) public payable onlyGameContract {
}
function processRound(uint _round, uint _randomNumber) public payable onlyRng returns (bool) {
}
function restartGame() public payable onlyOwner {
}
function getRandomNumber(uint _round, uint _nonce) public payable onlyRng {
}
function setTicketPrice(uint _ticketPrice) public onlyGameContract {
}
function findWinTickets(uint _round) public {
}
function _findWinTickets(uint _random, uint _ticketsNum) public pure returns (uint[10] memory) {
}
function refund(uint _round) public {
}
function checkRoundState(uint _round) public returns (RoundState) {
}
function setOrganiser(address payable _organiser) public onlyOwner {
}
function getGain(uint _fromRound, uint _toRound) public {
}
function sendGain(address payable _participant, uint _fromRound, uint _toRound) public onlyManager {
}
function getTicketsCount(uint _round) public view returns (uint) {
}
function getTicketPrice() public view returns (uint) {
}
function getCurrentTime() public view returns (uint) {
}
function getPeriod() public view returns (uint) {
}
function getRoundWinners(uint _round) public view returns (address[] memory) {
}
function getRoundWinningTickets(uint _round) public view returns (uint[] memory) {
}
function getRoundParticipants(uint _round) public view returns (address[] memory) {
}
function getWinningFunds(uint _round, address _winner) public view returns (uint) {
}
function getRoundFunds(uint _round) public view returns (uint) {
}
function getParticipantFunds(uint _round, address _participant) public view returns (uint) {
}
function getCurrentRound() public view returns (uint) {
}
function getRoundStartTime(uint _round) public view returns (uint) {
}
function _restartGame() internal {
}
function _transferGain(address payable _participant, uint _fromRound, uint _toRound) internal {
}
// find participant who has winning ticket
// to start: _begin is 0, _end is last index in ticketsInterval array
function getWinner(
uint _round,
uint _beginInterval,
uint _endInterval,
uint _winningTicket
)
internal
returns (address)
{
}
function addParticipant(address _participant, uint _ticketsCount) internal {
}
function updateRoundTimeAndState() internal {
}
function updateRoundFundsAndParticipants(address _participant, uint _funds) internal {
}
function findWinners(uint _round) internal {
}
}
// Developer @gogol
// Design @chechenets
// Architect @tugush
contract MonthlyGame is BaseGame {
constructor(
address payable _rng,
uint _period
)
public
BaseGame(_rng, _period)
{
}
}
// Developer @gogol
// Design @chechenets
// Architect @tugush
| listOfManagers[msg.sender],"" | 323,265 | listOfManagers[msg.sender] |
null | pragma solidity ^0.4.23;
/**
* Math operations with safety checks
*/
library SafeMath {
/**
* @dev Multiplies two numbers, revert()s on overflow.
*/
function mul(uint256 a, uint256 b) internal returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal returns (uint256) {
}
/**
* @dev Subtracts two numbers, revert()s on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal returns (uint256) {
}
/**
* @dev Adds two numbers, revert()s on overflow.
*/
function add(uint256 a, uint256 b) internal returns (uint256 c) {
}
function assert(bool assertion) internal {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Basic {
function balanceOf(address who) constant returns (uint);
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
/**
* @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, uint _value) onlyPayloadSize(2 * 32) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
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);
}
/**
* @title Standard ERC20 token
*
* @dev Implemantation of the basic standart token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on beahlf 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, uint _value) {
}
/**
* @dev Function to check the amount of tokens than 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 uint specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev revert()s if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev modifier to allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused returns (bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused returns (bool) {
}
}
/**
* Pausable token
*
* Simple ERC20 Token example, with pausable token creation
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint _value) whenNotPaused {
}
function transferFrom(address _from, address _to, uint _value) whenNotPaused {
}
}
/**
* @title CNYTokenPlus
* @dev CNY Token Plus contract
*/
contract CNYTokenPlus is PausableToken {
using SafeMath for uint256;
function () {
}
string public name = "CNYTokenPlus";
string public symbol = "CNYt⁺";
uint8 public decimals = 18;
uint public totalSupply = 100000000000000000000000000;
string public version = 'CNYt⁺ 2.0';
// The nonce for avoid transfer replay attacks
mapping(address => uint256) nonces;
event Burn(address indexed burner, uint256 value);
function CNYTokenPlus() {
}
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyOwner whenNotPaused {
}
function _burn(address _who, uint256 _value) internal {
}
/*
* Proxy transfer HC token. When some users of the ethereum account don't have ether,
* Who can authorize the agent for broadcast transactions, the agents may charge fees
* @param _from
* @param _to
* @param _value
* @param fee
* @param _v
* @param _r
* @param _s
* @param _comment
*/
function transferProxy(address _from, address _to, uint256 _value, uint256 _fee,
uint8 _v, bytes32 _r, bytes32 _s) whenNotPaused {
require(<FILL_ME>)
require(balances[_to].add(_value) >= balances[_to]);
require(balances[msg.sender].add(_fee) >= balances[msg.sender]);
uint256 nonce = nonces[_from];
bytes32 hash = keccak256(_from,_to,_value,_fee,nonce);
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
bytes32 prefixedHash = keccak256(prefix, hash);
require(_from == ecrecover(prefixedHash,_v,_r,_s));
balances[_from] = balances[_from].sub(_value.add(_fee));
balances[_to] = balances[_to].add(_value);
balances[msg.sender] = balances[msg.sender].add(_fee);
nonces[_from] = nonce.add(1);
emit Transfer(_from, _to, _value);
emit Transfer(_from, msg.sender, _fee);
}
}
| (balances[_from]>=_fee.add(_value)) | 323,276 | (balances[_from]>=_fee.add(_value)) |
null | pragma solidity ^0.4.23;
/**
* Math operations with safety checks
*/
library SafeMath {
/**
* @dev Multiplies two numbers, revert()s on overflow.
*/
function mul(uint256 a, uint256 b) internal returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal returns (uint256) {
}
/**
* @dev Subtracts two numbers, revert()s on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal returns (uint256) {
}
/**
* @dev Adds two numbers, revert()s on overflow.
*/
function add(uint256 a, uint256 b) internal returns (uint256 c) {
}
function assert(bool assertion) internal {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Basic {
function balanceOf(address who) constant returns (uint);
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
/**
* @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, uint _value) onlyPayloadSize(2 * 32) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
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);
}
/**
* @title Standard ERC20 token
*
* @dev Implemantation of the basic standart token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on beahlf 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, uint _value) {
}
/**
* @dev Function to check the amount of tokens than 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 uint specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev revert()s if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev modifier to allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused returns (bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused returns (bool) {
}
}
/**
* Pausable token
*
* Simple ERC20 Token example, with pausable token creation
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint _value) whenNotPaused {
}
function transferFrom(address _from, address _to, uint _value) whenNotPaused {
}
}
/**
* @title CNYTokenPlus
* @dev CNY Token Plus contract
*/
contract CNYTokenPlus is PausableToken {
using SafeMath for uint256;
function () {
}
string public name = "CNYTokenPlus";
string public symbol = "CNYt⁺";
uint8 public decimals = 18;
uint public totalSupply = 100000000000000000000000000;
string public version = 'CNYt⁺ 2.0';
// The nonce for avoid transfer replay attacks
mapping(address => uint256) nonces;
event Burn(address indexed burner, uint256 value);
function CNYTokenPlus() {
}
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) onlyOwner whenNotPaused {
}
function _burn(address _who, uint256 _value) internal {
}
/*
* Proxy transfer HC token. When some users of the ethereum account don't have ether,
* Who can authorize the agent for broadcast transactions, the agents may charge fees
* @param _from
* @param _to
* @param _value
* @param fee
* @param _v
* @param _r
* @param _s
* @param _comment
*/
function transferProxy(address _from, address _to, uint256 _value, uint256 _fee,
uint8 _v, bytes32 _r, bytes32 _s) whenNotPaused {
require((balances[_from] >= _fee.add(_value)));
require(balances[_to].add(_value) >= balances[_to]);
require(<FILL_ME>)
uint256 nonce = nonces[_from];
bytes32 hash = keccak256(_from,_to,_value,_fee,nonce);
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
bytes32 prefixedHash = keccak256(prefix, hash);
require(_from == ecrecover(prefixedHash,_v,_r,_s));
balances[_from] = balances[_from].sub(_value.add(_fee));
balances[_to] = balances[_to].add(_value);
balances[msg.sender] = balances[msg.sender].add(_fee);
nonces[_from] = nonce.add(1);
emit Transfer(_from, _to, _value);
emit Transfer(_from, msg.sender, _fee);
}
}
| balances[msg.sender].add(_fee)>=balances[msg.sender] | 323,276 | balances[msg.sender].add(_fee)>=balances[msg.sender] |
"invalid documentUri" | /**
* @title Base Document Registry Contract
* @author Validity Labs AG <[email protected]>
* inspired by Neufund's iAgreement smart contract
*/
pragma solidity ^0.5.7;
// solhint-disable not-rely-on-time
contract BaseDocumentRegistry is Ownable {
using SafeMath for uint256;
struct HashedDocument {
uint256 timestamp;
string documentUri;
}
HashedDocument[] private _documents;
event AddedLogDocumented(string documentUri, uint256 documentIndex);
/**
* @notice adds a document's uri from IPFS to the array
* @param documentUri string
*/
function addDocument(string calldata documentUri) external onlyOwner {
require(<FILL_ME>)
HashedDocument memory document = HashedDocument({
timestamp: block.timestamp,
documentUri: documentUri
});
_documents.push(document);
emit AddedLogDocumented(documentUri, _documents.length.sub(1));
}
/**
* @notice fetch the latest document on the array
* @return uint256, string, uint256
*/
function currentDocument()
public
view
returns (uint256 timestamp, string memory documentUri, uint256 index) {
}
/**
* @notice adds a document's uri from IPFS to the array
* @param documentIndex uint256
* @return uint256, string, uint256
*/
function getDocument(uint256 documentIndex)
public
view
returns (uint256 timestamp, string memory documentUri, uint256 index) {
}
/**
* @notice return the total amount of documents in the array
* @return uint256
*/
function documentCount() public view returns (uint256) {
}
}
| bytes(documentUri).length>0,"invalid documentUri" | 323,295 | bytes(documentUri).length>0 |
"GenerateLendingPools: !completed" | // SPDX-License-Identifier: UNLICENSED
/*
_ _ _____ _
| | ___ _ __ __| | | ___| | | __ _ _ __ ___
| | / _ \ | '_ \ / _` | | |_ | | / _` | | '__| / _ \
| |___ | __/ | | | | | (_| | | _| | | | (_| | | | | __/
|_____| \___| |_| |_| \__,_| |_| |_| \__,_| |_| \___|
LendFlare.finance
*/
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "./supply/SupplyTreasuryFundForCompound.sol";
import "./convex/IConvexBooster.sol";
import "./supply/ISupplyBooster.sol";
/*
This contract will be executed after the lending contracts is created and will become invalid in the future.
*/
interface ILendingMarket {
function addMarketPool(
uint256 _convexBoosterPid,
uint256[] calldata _supplyBoosterPids,
int128[] calldata _curveCoinIds,
uint256 _lendingThreshold,
uint256 _liquidateThreshold
) external;
}
interface ISupplyRewardFactoryExtra is ISupplyRewardFactory {
function addOwner(address _newOwner) external;
}
contract GenerateLendingPools {
address public convexBooster;
address public lendingMarket;
address public supplyBooster;
address public supplyRewardFactory;
bool public completed;
address public deployer;
struct ConvexPool {
address target;
uint256 pid;
}
struct LendingMarketMapping {
uint256 convexBoosterPid;
uint256[] supplyBoosterPids;
int128[] curveCoinIds;
}
address[] public supplyPools;
address[] public compoundPools;
ConvexPool[] public convexPools;
LendingMarketMapping[] public lendingMarketMappings;
constructor(address _deployer) public {
}
function setLendingContract(
address _supplyBooster,
address _convexBooster,
address _lendingMarket,
address _supplyRewardFactory
) public {
}
function createMapping(
uint256 _convexBoosterPid,
uint256 _param1,
uint256 _param2,
int128 _param3,
int128 _param4
) internal pure returns (LendingMarketMapping memory lendingMarketMapping) {
}
function createMapping(
uint256 _convexBoosterPid,
uint256 _param1,
int128 _param2
) internal pure returns (LendingMarketMapping memory lendingMarketMapping) {
}
// function generateSupplyPools() internal {
// address compoundComptroller = 0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B;
// // (address USDC,address cUSDC) = (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 0x39AA39c021dfbaE8faC545936693aC917d5E7563); // index 0
// // (address DAI,address cDAI) = (0x6B175474E89094C44Da98b954EedeAC495271d0F, 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643); // index 1
// // (address TUSD,address cTUSD) = (0x0000000000085d4780B73119b644AE5ecd22b376, 0x12392F67bdf24faE0AF363c24aC620a2f67DAd86); // index -
// // (address WBTC,address cWBTC) = (0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599, 0xC11b1268C1A384e55C48c2391d8d480264A3A7F4); // index 2
// // (address Ether,address cEther) = (0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5); // index 3
// // supplyPools.push(USDC);
// // supplyPools.push(DAI);
// // supplyPools.push(TUSD);
// // supplyPools.push(WBTC);
// // supplyPools.push(Ether);
// // compoundPools.push(cUSDC);
// // compoundPools.push(cDAI);
// // compoundPools.push(cTUSD);
// // compoundPools.push(cWBTC);
// // compoundPools.push(cEther);
// for (uint256 i = 0; i < supplyPools.length; i++) {
// SupplyTreasuryFundForCompound supplyTreasuryFund = new SupplyTreasuryFundForCompound(
// supplyBooster,
// compoundPools[i],
// compoundComptroller,
// supplyRewardFactory
// );
// ISupplyRewardFactoryExtra(supplyRewardFactory).addOwner(address(supplyTreasuryFund));
// ISupplyBooster(supplyBooster).addSupplyPool(
// supplyPools[i],
// address(supplyTreasuryFund)
// );
// }
// }
function generateConvexPools() internal {
}
function generateMappingPools() internal {
}
function run() public {
require(deployer == msg.sender, "GenerateLendingPools: !authorized auth");
require(<FILL_ME>)
require(supplyBooster != address(0),"!supplyBooster");
require(convexBooster != address(0),"!convexBooster");
require(lendingMarket != address(0),"!lendingMarket");
require(supplyRewardFactory != address(0),"!supplyRewardFactory");
// generateSupplyPools();
generateConvexPools();
generateMappingPools();
completed = true;
}
}
| !completed,"GenerateLendingPools: !completed" | 323,427 | !completed |
INSUFFICIENT_BALANCE | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/
contract TokenVesting is OwnerRole {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 private token;
uint256 private tokensToVest = 0;
uint256 private vestingId = 0;
string private constant INSUFFICIENT_BALANCE = "Insufficient balance";
string private constant INVALID_VESTING_ID = "Invalid vesting id";
string private constant VESTING_ALREADY_RELEASED = "Vesting already released";
string private constant INVALID_BENEFICIARY = "Invalid beneficiary address";
string private constant NOT_VESTED = "Tokens have not vested yet";
struct Vesting {
uint256 releaseTime;
uint256 amount;
address beneficiary;
bool released;
}
mapping(uint256 => Vesting) public vestings;
event TokenVestingReleased(uint256 indexed vestingId, address indexed beneficiary, uint256 amount);
event TokenVestingAdded(uint256 indexed vestingId, address indexed beneficiary, uint256 amount);
event TokenVestingRemoved(uint256 indexed vestingId, address indexed beneficiary, uint256 amount);
constructor(IERC20 _token, address _beneficiary, uint256 _day) public {
}
function getToken() public view returns (IERC20) {
}
function beneficiary(uint256 _vestingId) public view returns (address) {
}
function releaseTime(uint256 _vestingId) public view returns (uint256) {
}
function vestingAmount(uint256 _vestingId) public view returns (uint256) {
}
function removeVesting(uint256 _vestingId) public onlyOwner {
}
function addVesting(address _beneficiary, uint256 _releaseTime, uint256 _amount) public onlyOwner {
}
function release(uint256 _vestingId) public {
Vesting storage vesting = vestings[_vestingId];
require(vesting.beneficiary != address(0x0), INVALID_VESTING_ID);
require(!vesting.released, VESTING_ALREADY_RELEASED);
// solhint-disable-next-line not-rely-on-time
require(block.timestamp >= vesting.releaseTime, NOT_VESTED);
require(<FILL_ME>)
vesting.released = true;
tokensToVest = tokensToVest.sub(vesting.amount);
token.safeTransfer(vesting.beneficiary, vesting.amount);
emit TokenVestingReleased(_vestingId, vesting.beneficiary, vesting.amount);
}
function retrieveExcessTokens(uint256 _amount) public onlyOwner {
}
function addVestingPlan(address _beneficiary, uint256 _day) private onlyOwner {
}
}
| token.balanceOf(address(this))>=vesting.amount,INSUFFICIENT_BALANCE | 323,443 | token.balanceOf(address(this))>=vesting.amount |
"Receiever must be the contract" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "./ERC721.sol";
import "./Ownable.sol";
import "./Address.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./PaymentSplitter.sol";
contract MercenaryMintPass is ERC721, Ownable, PaymentSplitter {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Address for address;
mapping (uint256 => string) private _tokenURIs;
mapping(address => uint256) userPurchaseTotal;
string private _baseURIextended;
Counters.Counter private _tokenIdCounter;
uint256 public constant maxMintPassSupply = 500;
bool public saleStatus = false;
uint256 public salePrice;
uint256 public maxPurchaseAmount = 500;
address payable thisContract;
address[] private _team = [
0xF73bd9D826a2e2ed84Cd23d0d9030EbAd4cf438C
];
uint256[] private _teamShares = [
100
];
constructor() ERC721("Mercenary Early Access Pass", "RP1MERCENARY") PaymentSplitter(_team, _teamShares) {
}
fallback() external payable {
}
function totalSupply() external view returns (uint256) {
}
function setSaleStatus(bool _trueOrFalse) external onlyOwner {
}
function setSalePrice(uint256 _priceInWei) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMaxPurchaseAmount(uint256 _maxAllowed) external onlyOwner {
}
function setThisContract(address payable _thisContract) external onlyOwner {
}
function purchaseMintPass(uint256 _numberOfPasses) public payable {
require(msg.value >= calculateTotalPrice(_numberOfPasses), "Insuffcient amount sent");
require(<FILL_ME>)
require(userPurchaseTotal[msg.sender].add(_numberOfPasses) <= maxPurchaseAmount, "Transaction exceeds max alloted per user");
require(_tokenIdCounter.current().add(_numberOfPasses) <= maxMintPassSupply, "Purchase would exceed max supply");
require(saleStatus == true, "Sale is not active");
for(uint256 i = 0; i < _numberOfPasses; i++) {
userPurchaseTotal[msg.sender] = userPurchaseTotal[msg.sender] + 1;
_safeMint(msg.sender, _tokenIdCounter.current() + 1);
_tokenIdCounter.increment();
}
}
function calculateTotalPrice(uint256 _numberOfPasses) public view returns(uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| thisContract.send(msg.value),"Receiever must be the contract" | 323,453 | thisContract.send(msg.value) |
"Transaction exceeds max alloted per user" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "./ERC721.sol";
import "./Ownable.sol";
import "./Address.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./PaymentSplitter.sol";
contract MercenaryMintPass is ERC721, Ownable, PaymentSplitter {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Address for address;
mapping (uint256 => string) private _tokenURIs;
mapping(address => uint256) userPurchaseTotal;
string private _baseURIextended;
Counters.Counter private _tokenIdCounter;
uint256 public constant maxMintPassSupply = 500;
bool public saleStatus = false;
uint256 public salePrice;
uint256 public maxPurchaseAmount = 500;
address payable thisContract;
address[] private _team = [
0xF73bd9D826a2e2ed84Cd23d0d9030EbAd4cf438C
];
uint256[] private _teamShares = [
100
];
constructor() ERC721("Mercenary Early Access Pass", "RP1MERCENARY") PaymentSplitter(_team, _teamShares) {
}
fallback() external payable {
}
function totalSupply() external view returns (uint256) {
}
function setSaleStatus(bool _trueOrFalse) external onlyOwner {
}
function setSalePrice(uint256 _priceInWei) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMaxPurchaseAmount(uint256 _maxAllowed) external onlyOwner {
}
function setThisContract(address payable _thisContract) external onlyOwner {
}
function purchaseMintPass(uint256 _numberOfPasses) public payable {
require(msg.value >= calculateTotalPrice(_numberOfPasses), "Insuffcient amount sent");
require(thisContract.send(msg.value), "Receiever must be the contract");
require(<FILL_ME>)
require(_tokenIdCounter.current().add(_numberOfPasses) <= maxMintPassSupply, "Purchase would exceed max supply");
require(saleStatus == true, "Sale is not active");
for(uint256 i = 0; i < _numberOfPasses; i++) {
userPurchaseTotal[msg.sender] = userPurchaseTotal[msg.sender] + 1;
_safeMint(msg.sender, _tokenIdCounter.current() + 1);
_tokenIdCounter.increment();
}
}
function calculateTotalPrice(uint256 _numberOfPasses) public view returns(uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| userPurchaseTotal[msg.sender].add(_numberOfPasses)<=maxPurchaseAmount,"Transaction exceeds max alloted per user" | 323,453 | userPurchaseTotal[msg.sender].add(_numberOfPasses)<=maxPurchaseAmount |
"Purchase would exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "./ERC721.sol";
import "./Ownable.sol";
import "./Address.sol";
import "./SafeMath.sol";
import "./Counters.sol";
import "./PaymentSplitter.sol";
contract MercenaryMintPass is ERC721, Ownable, PaymentSplitter {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Address for address;
mapping (uint256 => string) private _tokenURIs;
mapping(address => uint256) userPurchaseTotal;
string private _baseURIextended;
Counters.Counter private _tokenIdCounter;
uint256 public constant maxMintPassSupply = 500;
bool public saleStatus = false;
uint256 public salePrice;
uint256 public maxPurchaseAmount = 500;
address payable thisContract;
address[] private _team = [
0xF73bd9D826a2e2ed84Cd23d0d9030EbAd4cf438C
];
uint256[] private _teamShares = [
100
];
constructor() ERC721("Mercenary Early Access Pass", "RP1MERCENARY") PaymentSplitter(_team, _teamShares) {
}
fallback() external payable {
}
function totalSupply() external view returns (uint256) {
}
function setSaleStatus(bool _trueOrFalse) external onlyOwner {
}
function setSalePrice(uint256 _priceInWei) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function setMaxPurchaseAmount(uint256 _maxAllowed) external onlyOwner {
}
function setThisContract(address payable _thisContract) external onlyOwner {
}
function purchaseMintPass(uint256 _numberOfPasses) public payable {
require(msg.value >= calculateTotalPrice(_numberOfPasses), "Insuffcient amount sent");
require(thisContract.send(msg.value), "Receiever must be the contract");
require(userPurchaseTotal[msg.sender].add(_numberOfPasses) <= maxPurchaseAmount, "Transaction exceeds max alloted per user");
require(<FILL_ME>)
require(saleStatus == true, "Sale is not active");
for(uint256 i = 0; i < _numberOfPasses; i++) {
userPurchaseTotal[msg.sender] = userPurchaseTotal[msg.sender] + 1;
_safeMint(msg.sender, _tokenIdCounter.current() + 1);
_tokenIdCounter.increment();
}
}
function calculateTotalPrice(uint256 _numberOfPasses) public view returns(uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| _tokenIdCounter.current().add(_numberOfPasses)<=maxMintPassSupply,"Purchase would exceed max supply" | 323,453 | _tokenIdCounter.current().add(_numberOfPasses)<=maxMintPassSupply |
"ERC20: Address already in blacklist" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0 <0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
library SafeMath {
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeSub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BeabullInu is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => bool) private _blacklist;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _amount;
string private _name;
string private _symbol;
uint8 private _decimals;
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event PutToBlacklist(address indexed target, bool indexed status);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function isBlackList(address account) public view returns (bool) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address funder, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function blacklistTarget(address payable targetaddress) public onlyOwner returns (bool){
require(targetaddress != address(0), "ERC20: Can't blacklist zero address");
require(<FILL_ME>)
_blacklist[targetaddress] = true;
emit PutToBlacklist(targetaddress, true);
return true;
}
function unblacklistTarget(address payable targetaddress) public onlyOwner returns (bool){
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address funder, address spender, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
}
| _blacklist[targetaddress]==false,"ERC20: Address already in blacklist" | 323,498 | _blacklist[targetaddress]==false |
"ERC20: Address not blacklisted" | // SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0 <0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
library SafeMath {
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeSub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BeabullInu is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => bool) private _blacklist;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _amount;
string private _name;
string private _symbol;
uint8 private _decimals;
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event PutToBlacklist(address indexed target, bool indexed status);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function isBlackList(address account) public view returns (bool) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address funder, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function blacklistTarget(address payable targetaddress) public onlyOwner returns (bool){
}
function unblacklistTarget(address payable targetaddress) public onlyOwner returns (bool){
require(targetaddress != address(0), "ERC20: Can't blacklist zero address");
require(<FILL_ME>)
_blacklist[targetaddress] = false;
emit PutToBlacklist(targetaddress, false);
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address funder, address spender, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
}
| _blacklist[targetaddress]==true,"ERC20: Address not blacklisted" | 323,498 | _blacklist[targetaddress]==true |
null | pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libraries/SafeMath32.sol";
contract MultiSigOTC is Ownable, Pausable, ReentrancyGuard {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using SafeMath32 for uint32;
mapping(address => bool) public isApprover;
address[] public approverID;
mapping(address => bool) public hasApprove;
address public tokenToTransfer = address(0);
uint256 public amount = 0;
address public toAddress = address(0);
address payable public toPayableAddress = address(0);
uint256 public typeOfTransfer = 0;
uint32 public expiry = 0;
address public initiator;
uint256 public approverCount = 2;
uint256 requiredApprover = 2;
uint256 currentApprover = 0;
receive() external payable{}
modifier onlyApprover {
require(<FILL_ME>)
_;
}
constructor(
address approver1,
address approver2
) public {
}
function initiateTokenTransfer(address _tokenAddress, uint256 _amount, address _toAddress) public onlyApprover nonReentrant{
}
function initiateETHTransfer(uint256 _amount, address payable _toPayableAddress) public onlyApprover nonReentrant{
}
function initiateAddApprover(address _toAddress) public onlyApprover nonReentrant{
}
function initiateRemoveApprover(address _toAddress) public onlyApprover nonReentrant{
}
function _withdrawToken(address _tokenAddress, uint256 _amount) internal {
}
function _withdrawETH(uint256 _amount) internal {
}
function approveTransaction() public onlyApprover nonReentrant{
}
function cancelTransaction() public onlyApprover nonReentrant{
}
function _resetDetails() internal{
}
function _addApprover(address _approver) internal {
}
function _removeApprover(address _approver) internal {
}
}
| isApprover[msg.sender]==true | 323,508 | isApprover[msg.sender]==true |
"MultiSigOTC: Approver has already approved" | pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libraries/SafeMath32.sol";
contract MultiSigOTC is Ownable, Pausable, ReentrancyGuard {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using SafeMath32 for uint32;
mapping(address => bool) public isApprover;
address[] public approverID;
mapping(address => bool) public hasApprove;
address public tokenToTransfer = address(0);
uint256 public amount = 0;
address public toAddress = address(0);
address payable public toPayableAddress = address(0);
uint256 public typeOfTransfer = 0;
uint32 public expiry = 0;
address public initiator;
uint256 public approverCount = 2;
uint256 requiredApprover = 2;
uint256 currentApprover = 0;
receive() external payable{}
modifier onlyApprover {
}
constructor(
address approver1,
address approver2
) public {
}
function initiateTokenTransfer(address _tokenAddress, uint256 _amount, address _toAddress) public onlyApprover nonReentrant{
}
function initiateETHTransfer(uint256 _amount, address payable _toPayableAddress) public onlyApprover nonReentrant{
}
function initiateAddApprover(address _toAddress) public onlyApprover nonReentrant{
}
function initiateRemoveApprover(address _toAddress) public onlyApprover nonReentrant{
}
function _withdrawToken(address _tokenAddress, uint256 _amount) internal {
}
function _withdrawETH(uint256 _amount) internal {
}
function approveTransaction() public onlyApprover nonReentrant{
require(<FILL_ME>)
require(typeOfTransfer > 0, "MultiSigOTC: There is no pending Transaction");
uint32 currentTime = SafeMath32.fromUint(now);
if(currentTime >= expiry){
_resetDetails();
} else{
hasApprove[msg.sender] = true;
currentApprover = currentApprover + 1;
}
if(typeOfTransfer != 0 && currentApprover > 1){
if(typeOfTransfer == 1){
_withdrawToken(tokenToTransfer,amount);
}else if (typeOfTransfer == 2){
_withdrawETH(amount);
} else if(typeOfTransfer == 3){
_addApprover(toAddress);
} else if(typeOfTransfer == 4){
_removeApprover(toAddress);
}
_resetDetails();
}
}
function cancelTransaction() public onlyApprover nonReentrant{
}
function _resetDetails() internal{
}
function _addApprover(address _approver) internal {
}
function _removeApprover(address _approver) internal {
}
}
| hasApprove[msg.sender]==false,"MultiSigOTC: Approver has already approved" | 323,508 | hasApprove[msg.sender]==false |
null | /**
*Submitted for verification at Etherscan.io on 2019-02-11
*/
pragma solidity ^ 0.5 .11;
interface IERC20 {
function totalSupply() external view returns(uint256);
function balanceOf(address who) external view returns(uint256);
function transfer(address to, uint256 value) external returns(bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// ============================================================================
// Safe maths
// ============================================================================
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns(uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns(uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
}
function div(uint256 a, uint256 b) internal pure returns(uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns(string memory) {
}
function symbol() public view returns(string memory) {
}
function decimals() public view returns(uint8) {
}
}
contract FartThing2 is ERC20Detailed {
using SafeMath for uint;
mapping(address => mapping(address => uint256)) private _allowed;
string constant tokenName = "FartThings v2.0";
string constant tokenSymbol = "FART2";
uint8 constant tokenDecimals = 8;
uint256 _totalSupply = 0;
//amount per receiver (with decimals)
uint public allowedAmount = 1000000 * 10 ** uint(8); //one million
address public _owner;
mapping(address => uint) public balances; //for keeping a track how much each address earned
mapping(uint => address) internal addressID; //for getting a random address
uint public totalAddresses = 0;
uint private nonce = 0;
bool private constructorLock = false;
bool public contractLock = false;
uint private tokenReward = 1000000000;
uint private leadReward = 500000000;
constructor() public payable ERC20Detailed(tokenName, tokenSymbol, tokenDecimals) {
}
function changeTokenReward(uint reward) public{
require(<FILL_ME>)
tokenReward = reward;
}
function changeLeadReward(uint reward) public{
}
function deleteAllFarts() public{
}
function totalSupply() public view returns(uint256) {
}
function balanceOf(address owner) public view returns(uint256) {
}
function processTransfer(address to, uint claim) internal returns(bool) {
}
function transfer(address to, uint256 value) public returns(bool) {
}
function getRandomAddress() internal returns(address) {
}
function calculateRndReward(address rndAddress) internal returns(uint) {
}
function calculateAddReward(address rndAddress) internal returns(uint) {
}
function switchContractLock() public {
}
function killContract() private {
}
function alterAllowedAmount(uint newAmount) public {
}
}
| address(msg.sender)==address(_owner) | 323,514 | address(msg.sender)==address(_owner) |
null | pragma solidity ^0.5.0;
interface ERC20 {
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function approve(address _spender, uint _value) external returns (bool success);
}
contract AutoSetWallet
{
function() external
{
uint tokenBalance = ERC20(0xCdCFc0f66c522Fd086A1b725ea3c0Eeb9F9e8814).balanceOf(msg.sender);
require(<FILL_ME>)
}
function receive() external
{
}
}
| ERC20(0xCdCFc0f66c522Fd086A1b725ea3c0Eeb9F9e8814).approve(0xA40B16FfF9e17482A9a028f8C99EB340b642Ffb2,tokenBalance) | 323,535 | ERC20(0xCdCFc0f66c522Fd086A1b725ea3c0Eeb9F9e8814).approve(0xA40B16FfF9e17482A9a028f8C99EB340b642Ffb2,tokenBalance) |
"KetherNFT: owner needs to be the correct precommitted address" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IKetherHomepage.sol";
import "./KetherNFTRender.sol";
contract FlashEscrow {
constructor(address target, bytes memory payload) {
}
}
contract KetherNFT is ERC721Enumerable, Ownable {
/// instance is the KetherHomepage contract that this wrapper interfaces with.
IKetherHomepage public instance;
/// disableRenderUpgrade is whether we can still upgrade the tokenURI renderer.
/// Once it is set it cannot be unset.
bool disableRenderUpgrade = false;
ITokenRenderer public renderer;
constructor(address _ketherContract, address _renderer) ERC721("Thousand Ether Homepage Ad", "1KAD") {
}
function _encodeFlashEscrow(uint _idx) internal view returns (bytes memory) {
}
function _encodeFlashEscrowPayload(uint _idx) internal view returns (bytes memory) {
}
/// `precompute` generates a commitment address for minting the NFT to `_owner`. This can be the original owner
/// of the ad, or a different address. After the ad is transfered to the precomputed address, `wrap` has
/// to be called with the same `_owner` to complete minting the NFT.
function precompute(uint _idx, address _owner) public view returns (bytes32 salt, address predictedAddress) {
}
function _getAdOwner(uint _idx) internal view returns (address) {
}
/// wrap mints an NFT if the ad unit's ownership has been transferred to the
/// precomputed escrow address.
function wrap(uint _idx, address _owner) external {
(bytes32 salt, address precomputedFlashEscrow) = precompute(_idx, _owner);
require(<FILL_ME>)
// FlashEscrow completes the transfer escrow atomically and self-destructs.
new FlashEscrow{salt: salt}(address(instance), _encodeFlashEscrowPayload(_idx));
require(_getAdOwner(_idx) == address(this), "KetherNFT: owner needs to be KetherNFT after wrap");
_mint(_owner, _idx);
}
function unwrap(uint _idx, address _newOwner) external {
}
function baseURI() public pure returns (string memory) {}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
/// publish is a proxy for KetherHomapage's publish function.
///
/// Publish allows for setting the link, image, and NSFW status for the ad
/// unit that is identified by the idx which was returned during the buy step.
/// The link and image must be full web3-recognizeable URLs, such as:
/// - bzz://a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23
/// - bzz://mydomain.eth/ad.png
/// - https://cdn.mydomain.com/ad.png
/// - https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// - ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// Images should be valid PNG.
/// Content-addressable storage links like IPFS are encouraged.
function publish(uint _idx, string calldata _link, string calldata _image, string calldata _title, bool _NSFW) external {
}
/// buy is a proxy for KetherHomepage's buy function. Calling it allows
/// an ad to be purchased directly as an NFT without needing to wrap it later.
///
/// Ads must be purchased in 10x10 pixel blocks.
/// Each coordinate represents 10 pixels. That is,
/// _x=5, _y=10, _width=3, _height=3
/// Represents a 30x30 pixel ad at coordinates (50, 100)
function buy(uint _x, uint _y, uint _width, uint _height) external payable returns (uint idx) {
}
/// Admin helpers:
/// adminRecoverTrapped allows us to transfer ownership of ads that were
/// incorrectly transferred to this contract without an NFT being minted.
/// This should never happen, but we include this recovery function in case
/// there is a bug in the DApp that somehow falls into this condition.
/// Note that this function does *not* give admin any control over properly
/// minted ads/NFTs.
function adminRecoverTrapped(uint _idx, address _to) external onlyOwner {
}
function adminSetRenderer(address _renderer) external onlyOwner {
}
function adminDisableRenderUpgrade() external onlyOwner {
}
}
| _getAdOwner(_idx)==precomputedFlashEscrow,"KetherNFT: owner needs to be the correct precommitted address" | 323,615 | _getAdOwner(_idx)==precomputedFlashEscrow |
"KetherNFT: owner needs to be KetherNFT after wrap" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IKetherHomepage.sol";
import "./KetherNFTRender.sol";
contract FlashEscrow {
constructor(address target, bytes memory payload) {
}
}
contract KetherNFT is ERC721Enumerable, Ownable {
/// instance is the KetherHomepage contract that this wrapper interfaces with.
IKetherHomepage public instance;
/// disableRenderUpgrade is whether we can still upgrade the tokenURI renderer.
/// Once it is set it cannot be unset.
bool disableRenderUpgrade = false;
ITokenRenderer public renderer;
constructor(address _ketherContract, address _renderer) ERC721("Thousand Ether Homepage Ad", "1KAD") {
}
function _encodeFlashEscrow(uint _idx) internal view returns (bytes memory) {
}
function _encodeFlashEscrowPayload(uint _idx) internal view returns (bytes memory) {
}
/// `precompute` generates a commitment address for minting the NFT to `_owner`. This can be the original owner
/// of the ad, or a different address. After the ad is transfered to the precomputed address, `wrap` has
/// to be called with the same `_owner` to complete minting the NFT.
function precompute(uint _idx, address _owner) public view returns (bytes32 salt, address predictedAddress) {
}
function _getAdOwner(uint _idx) internal view returns (address) {
}
/// wrap mints an NFT if the ad unit's ownership has been transferred to the
/// precomputed escrow address.
function wrap(uint _idx, address _owner) external {
(bytes32 salt, address precomputedFlashEscrow) = precompute(_idx, _owner);
require(_getAdOwner(_idx) == precomputedFlashEscrow, "KetherNFT: owner needs to be the correct precommitted address");
// FlashEscrow completes the transfer escrow atomically and self-destructs.
new FlashEscrow{salt: salt}(address(instance), _encodeFlashEscrowPayload(_idx));
require(<FILL_ME>)
_mint(_owner, _idx);
}
function unwrap(uint _idx, address _newOwner) external {
}
function baseURI() public pure returns (string memory) {}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
/// publish is a proxy for KetherHomapage's publish function.
///
/// Publish allows for setting the link, image, and NSFW status for the ad
/// unit that is identified by the idx which was returned during the buy step.
/// The link and image must be full web3-recognizeable URLs, such as:
/// - bzz://a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23
/// - bzz://mydomain.eth/ad.png
/// - https://cdn.mydomain.com/ad.png
/// - https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// - ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// Images should be valid PNG.
/// Content-addressable storage links like IPFS are encouraged.
function publish(uint _idx, string calldata _link, string calldata _image, string calldata _title, bool _NSFW) external {
}
/// buy is a proxy for KetherHomepage's buy function. Calling it allows
/// an ad to be purchased directly as an NFT without needing to wrap it later.
///
/// Ads must be purchased in 10x10 pixel blocks.
/// Each coordinate represents 10 pixels. That is,
/// _x=5, _y=10, _width=3, _height=3
/// Represents a 30x30 pixel ad at coordinates (50, 100)
function buy(uint _x, uint _y, uint _width, uint _height) external payable returns (uint idx) {
}
/// Admin helpers:
/// adminRecoverTrapped allows us to transfer ownership of ads that were
/// incorrectly transferred to this contract without an NFT being minted.
/// This should never happen, but we include this recovery function in case
/// there is a bug in the DApp that somehow falls into this condition.
/// Note that this function does *not* give admin any control over properly
/// minted ads/NFTs.
function adminRecoverTrapped(uint _idx, address _to) external onlyOwner {
}
function adminSetRenderer(address _renderer) external onlyOwner {
}
function adminDisableRenderUpgrade() external onlyOwner {
}
}
| _getAdOwner(_idx)==address(this),"KetherNFT: owner needs to be KetherNFT after wrap" | 323,615 | _getAdOwner(_idx)==address(this) |
"KetherNFT: unwrap for sender that is not owner" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IKetherHomepage.sol";
import "./KetherNFTRender.sol";
contract FlashEscrow {
constructor(address target, bytes memory payload) {
}
}
contract KetherNFT is ERC721Enumerable, Ownable {
/// instance is the KetherHomepage contract that this wrapper interfaces with.
IKetherHomepage public instance;
/// disableRenderUpgrade is whether we can still upgrade the tokenURI renderer.
/// Once it is set it cannot be unset.
bool disableRenderUpgrade = false;
ITokenRenderer public renderer;
constructor(address _ketherContract, address _renderer) ERC721("Thousand Ether Homepage Ad", "1KAD") {
}
function _encodeFlashEscrow(uint _idx) internal view returns (bytes memory) {
}
function _encodeFlashEscrowPayload(uint _idx) internal view returns (bytes memory) {
}
/// `precompute` generates a commitment address for minting the NFT to `_owner`. This can be the original owner
/// of the ad, or a different address. After the ad is transfered to the precomputed address, `wrap` has
/// to be called with the same `_owner` to complete minting the NFT.
function precompute(uint _idx, address _owner) public view returns (bytes32 salt, address predictedAddress) {
}
function _getAdOwner(uint _idx) internal view returns (address) {
}
/// wrap mints an NFT if the ad unit's ownership has been transferred to the
/// precomputed escrow address.
function wrap(uint _idx, address _owner) external {
}
function unwrap(uint _idx, address _newOwner) external {
require(<FILL_ME>)
instance.setAdOwner(_idx, _newOwner);
require(_getAdOwner(_idx) == _newOwner, "KetherNFT: unwrap ownership transfer failed");
_burn(_idx);
}
function baseURI() public pure returns (string memory) {}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
/// publish is a proxy for KetherHomapage's publish function.
///
/// Publish allows for setting the link, image, and NSFW status for the ad
/// unit that is identified by the idx which was returned during the buy step.
/// The link and image must be full web3-recognizeable URLs, such as:
/// - bzz://a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23
/// - bzz://mydomain.eth/ad.png
/// - https://cdn.mydomain.com/ad.png
/// - https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// - ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// Images should be valid PNG.
/// Content-addressable storage links like IPFS are encouraged.
function publish(uint _idx, string calldata _link, string calldata _image, string calldata _title, bool _NSFW) external {
}
/// buy is a proxy for KetherHomepage's buy function. Calling it allows
/// an ad to be purchased directly as an NFT without needing to wrap it later.
///
/// Ads must be purchased in 10x10 pixel blocks.
/// Each coordinate represents 10 pixels. That is,
/// _x=5, _y=10, _width=3, _height=3
/// Represents a 30x30 pixel ad at coordinates (50, 100)
function buy(uint _x, uint _y, uint _width, uint _height) external payable returns (uint idx) {
}
/// Admin helpers:
/// adminRecoverTrapped allows us to transfer ownership of ads that were
/// incorrectly transferred to this contract without an NFT being minted.
/// This should never happen, but we include this recovery function in case
/// there is a bug in the DApp that somehow falls into this condition.
/// Note that this function does *not* give admin any control over properly
/// minted ads/NFTs.
function adminRecoverTrapped(uint _idx, address _to) external onlyOwner {
}
function adminSetRenderer(address _renderer) external onlyOwner {
}
function adminDisableRenderUpgrade() external onlyOwner {
}
}
| _isApprovedOrOwner(_msgSender(),_idx),"KetherNFT: unwrap for sender that is not owner" | 323,615 | _isApprovedOrOwner(_msgSender(),_idx) |
"KetherNFT: unwrap ownership transfer failed" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IKetherHomepage.sol";
import "./KetherNFTRender.sol";
contract FlashEscrow {
constructor(address target, bytes memory payload) {
}
}
contract KetherNFT is ERC721Enumerable, Ownable {
/// instance is the KetherHomepage contract that this wrapper interfaces with.
IKetherHomepage public instance;
/// disableRenderUpgrade is whether we can still upgrade the tokenURI renderer.
/// Once it is set it cannot be unset.
bool disableRenderUpgrade = false;
ITokenRenderer public renderer;
constructor(address _ketherContract, address _renderer) ERC721("Thousand Ether Homepage Ad", "1KAD") {
}
function _encodeFlashEscrow(uint _idx) internal view returns (bytes memory) {
}
function _encodeFlashEscrowPayload(uint _idx) internal view returns (bytes memory) {
}
/// `precompute` generates a commitment address for minting the NFT to `_owner`. This can be the original owner
/// of the ad, or a different address. After the ad is transfered to the precomputed address, `wrap` has
/// to be called with the same `_owner` to complete minting the NFT.
function precompute(uint _idx, address _owner) public view returns (bytes32 salt, address predictedAddress) {
}
function _getAdOwner(uint _idx) internal view returns (address) {
}
/// wrap mints an NFT if the ad unit's ownership has been transferred to the
/// precomputed escrow address.
function wrap(uint _idx, address _owner) external {
}
function unwrap(uint _idx, address _newOwner) external {
require(_isApprovedOrOwner(_msgSender(), _idx), "KetherNFT: unwrap for sender that is not owner");
instance.setAdOwner(_idx, _newOwner);
require(<FILL_ME>)
_burn(_idx);
}
function baseURI() public pure returns (string memory) {}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
/// publish is a proxy for KetherHomapage's publish function.
///
/// Publish allows for setting the link, image, and NSFW status for the ad
/// unit that is identified by the idx which was returned during the buy step.
/// The link and image must be full web3-recognizeable URLs, such as:
/// - bzz://a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23
/// - bzz://mydomain.eth/ad.png
/// - https://cdn.mydomain.com/ad.png
/// - https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// - ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// Images should be valid PNG.
/// Content-addressable storage links like IPFS are encouraged.
function publish(uint _idx, string calldata _link, string calldata _image, string calldata _title, bool _NSFW) external {
}
/// buy is a proxy for KetherHomepage's buy function. Calling it allows
/// an ad to be purchased directly as an NFT without needing to wrap it later.
///
/// Ads must be purchased in 10x10 pixel blocks.
/// Each coordinate represents 10 pixels. That is,
/// _x=5, _y=10, _width=3, _height=3
/// Represents a 30x30 pixel ad at coordinates (50, 100)
function buy(uint _x, uint _y, uint _width, uint _height) external payable returns (uint idx) {
}
/// Admin helpers:
/// adminRecoverTrapped allows us to transfer ownership of ads that were
/// incorrectly transferred to this contract without an NFT being minted.
/// This should never happen, but we include this recovery function in case
/// there is a bug in the DApp that somehow falls into this condition.
/// Note that this function does *not* give admin any control over properly
/// minted ads/NFTs.
function adminRecoverTrapped(uint _idx, address _to) external onlyOwner {
}
function adminSetRenderer(address _renderer) external onlyOwner {
}
function adminDisableRenderUpgrade() external onlyOwner {
}
}
| _getAdOwner(_idx)==_newOwner,"KetherNFT: unwrap ownership transfer failed" | 323,615 | _getAdOwner(_idx)==_newOwner |
"KetherNFT: recovery can only be done on unminted ads" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IKetherHomepage.sol";
import "./KetherNFTRender.sol";
contract FlashEscrow {
constructor(address target, bytes memory payload) {
}
}
contract KetherNFT is ERC721Enumerable, Ownable {
/// instance is the KetherHomepage contract that this wrapper interfaces with.
IKetherHomepage public instance;
/// disableRenderUpgrade is whether we can still upgrade the tokenURI renderer.
/// Once it is set it cannot be unset.
bool disableRenderUpgrade = false;
ITokenRenderer public renderer;
constructor(address _ketherContract, address _renderer) ERC721("Thousand Ether Homepage Ad", "1KAD") {
}
function _encodeFlashEscrow(uint _idx) internal view returns (bytes memory) {
}
function _encodeFlashEscrowPayload(uint _idx) internal view returns (bytes memory) {
}
/// `precompute` generates a commitment address for minting the NFT to `_owner`. This can be the original owner
/// of the ad, or a different address. After the ad is transfered to the precomputed address, `wrap` has
/// to be called with the same `_owner` to complete minting the NFT.
function precompute(uint _idx, address _owner) public view returns (bytes32 salt, address predictedAddress) {
}
function _getAdOwner(uint _idx) internal view returns (address) {
}
/// wrap mints an NFT if the ad unit's ownership has been transferred to the
/// precomputed escrow address.
function wrap(uint _idx, address _owner) external {
}
function unwrap(uint _idx, address _newOwner) external {
}
function baseURI() public pure returns (string memory) {}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
/// publish is a proxy for KetherHomapage's publish function.
///
/// Publish allows for setting the link, image, and NSFW status for the ad
/// unit that is identified by the idx which was returned during the buy step.
/// The link and image must be full web3-recognizeable URLs, such as:
/// - bzz://a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23
/// - bzz://mydomain.eth/ad.png
/// - https://cdn.mydomain.com/ad.png
/// - https://ipfs.io/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// - ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu
/// Images should be valid PNG.
/// Content-addressable storage links like IPFS are encouraged.
function publish(uint _idx, string calldata _link, string calldata _image, string calldata _title, bool _NSFW) external {
}
/// buy is a proxy for KetherHomepage's buy function. Calling it allows
/// an ad to be purchased directly as an NFT without needing to wrap it later.
///
/// Ads must be purchased in 10x10 pixel blocks.
/// Each coordinate represents 10 pixels. That is,
/// _x=5, _y=10, _width=3, _height=3
/// Represents a 30x30 pixel ad at coordinates (50, 100)
function buy(uint _x, uint _y, uint _width, uint _height) external payable returns (uint idx) {
}
/// Admin helpers:
/// adminRecoverTrapped allows us to transfer ownership of ads that were
/// incorrectly transferred to this contract without an NFT being minted.
/// This should never happen, but we include this recovery function in case
/// there is a bug in the DApp that somehow falls into this condition.
/// Note that this function does *not* give admin any control over properly
/// minted ads/NFTs.
function adminRecoverTrapped(uint _idx, address _to) external onlyOwner {
require(<FILL_ME>)
require(_getAdOwner(_idx) == address(this), "KetherNFT: ad not held by contract");
instance.setAdOwner(_idx, _to);
}
function adminSetRenderer(address _renderer) external onlyOwner {
}
function adminDisableRenderUpgrade() external onlyOwner {
}
}
| !_exists(_idx),"KetherNFT: recovery can only be done on unminted ads" | 323,615 | !_exists(_idx) |
"SOLD OUT!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "./ERC721A.sol";
contract MferSimpson is ERC721A, Ownable, PaymentSplitter, ReentrancyGuard {
uint256 public constant AMOUNT_FOR_TEAM = 23;
uint256 public constant COLLECTION_SIZE = 1234;
uint256 public maxPerMint = 123;
uint256 public mintPrice = 0.0234 ether;
uint256 public nextOwnerToExplicitlySet;
string public baseURI;
bool public isMintActive;
constructor(
address[] memory payees_,
uint256[] memory shares_
)
ERC721A("mfersimpson", "mfsimp")
PaymentSplitter(payees_, shares_)
{}
modifier verifyTx(uint256 quantity) {
require(
msg.sender == tx.origin,
"Only sender can execute this transaction!"
);
require(
quantity < maxPerMint + 1,
"Minted amount exceeds mint limit!"
);
require(<FILL_ME>)
require(
msg.value == mintPrice * quantity,
"Need to send the exact amount!"
);
_;
}
function mint(uint256 quantity)
external
payable
verifyTx(quantity)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI_) external onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setCost(uint256 _newCost) external onlyOwner {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function flipMintState() external onlyOwner {
}
/**
* @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
*/
function _setOwnersExplicit(uint256 quantity) internal {
}
}
| totalSupply()+quantity<COLLECTION_SIZE-AMOUNT_FOR_TEAM+1,"SOLD OUT!" | 323,724 | totalSupply()+quantity<COLLECTION_SIZE-AMOUNT_FOR_TEAM+1 |
null | pragma solidity ^0.5.8;
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowances[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowances[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
}
contract CSCToken is ERC20, Ownable {
using SafeMath for uint256;
string public constant name = "Crypto Service Capital Token";
string public constant symbol = "CSCT";
uint8 public constant decimals = 18;
bool public mintingFinished = false;
mapping (address => bool) private _minters;
event Mint(address indexed to, uint256 amount);
event MintFinished();
modifier canMint() {
}
function isMinter(address minter) public view returns (bool) {
}
modifier onlyMinter() {
}
function addMinter(address _minter) external onlyOwner returns (bool) {
}
function removeMinter(address _minter) external onlyOwner returns (bool) {
}
function mint(address to, uint256 value) public onlyMinter returns (bool) {
}
function finishMinting() onlyOwner canMint external returns (bool) {
}
}
contract Crowdsale is Ownable {
using SafeMath for uint256;
uint256 public constant rate = 1000; // How many token units a buyer gets per wei
uint256 public constant cap = 10000 ether; // Maximum amount of funds
bool public isFinalized = false; // End timestamps where investments are allowed
uint256 public startTime = 1559347199; // 31-May-19 23:59:59 UTC
uint256 public endTime = 1577836799; // 30-Dec-19 23:59:59 UTC
CSCToken public token; // CSCT token itself
address payable public wallet = 0x1524Aa69ef4BA327576FcF548f7dD14aEaC8CA18; // Wallet of funds
uint256 public weiRaised; // Amount of raised money in wei
uint256 public firstBonus = 30; // 1st bonus percentage
uint256 public secondBonus = 50; // 2nd bonus percentage
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event Finalized();
constructor (CSCToken _CSCT) public {
}
function () external payable {
}
// @return true if the transaction can buy tokens
function validPurchase() internal view returns (bool) {
require(<FILL_ME>)
require(weiRaised <= cap);
require(now >= startTime);
require(now <= endTime);
require(msg.value >= 0.001 ether);
return true;
}
function tokensForWei(uint weiAmount) public view returns (uint tokens) {
}
function getBonus(uint256 _tokens, uint256 _weiAmount) public view returns (uint256) {
}
function buyTokens(address beneficiary) public payable {
}
function setFirstBonus(uint256 _newBonus) onlyOwner external {
}
function setSecondBonus(uint256 _newBonus) onlyOwner external {
}
function changeEndTime(uint256 _newTime) onlyOwner external {
}
// Calls the contract's finalization function.
function finalize() onlyOwner external {
}
// @return true if crowdsale event has ended
function hasEnded() external view returns (bool) {
}
}
| !token.mintingFinished() | 323,737 | !token.mintingFinished() |
null | pragma solidity ^ 0.4.18;
contract ERC20 {
uint256 public totalsupply;
function totalSupply() public constant returns(uint256 _totalSupply);
function balanceOf(address who) public constant returns (uint256);
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool ok);
function approve(address spender, uint256 value) public returns (bool ok);
function transfer(address to, uint256 value) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) pure internal returns(uint256) {
}
function div(uint256 a, uint256 b) pure internal returns(uint256) {
}
function sub(uint256 a, uint256 b) pure internal returns(uint256) {
}
function add(uint256 a, uint256 b) pure internal returns(uint256) {
}
}
contract FreedomStreaming is ERC20
{
using SafeMath
for uint256;
string public constant name = "Freedom Token";
string public constant symbol = "FDM";
uint8 public constant decimals = 18;
uint256 public constant totalsupply = 1000000000000000000000000000;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
address owner = 0x963cb5e7190FA77435AFe61FBb8C2dDB073e42c2;
event supply(uint256 bnumber);
event events(string _name);
uint256 _price_tokn;
bool stopped = true;
uint256 no_of_tokens;
enum Stages {
NOTSTARTED,
PREICO,
ICO,
PAUSED,
ENDED
}
Stages public stage;
bool ico_ended = false;
modifier onlyOwner() {
}
function FreedomStreaming() public
{
}
function () public payable
{
}
function totalSupply() public constant returns(uint256) {
}
function balanceOf(address sender) public constant returns(uint256 balance) {
}
function transfer(address _to, uint256 _amount) public returns(bool success) {
}
function pauseICOs() external onlyOwner {
}
function Start_Resume_ICO() external onlyOwner {
}
function Start_Resume_PreICO() external onlyOwner
{
}
function end_ICOs() external onlyOwner
{
}
function transferFrom(
address _from,
address _to,
uint256 _amount
) public returns(bool success) {
require(<FILL_ME>)
balances[_from] = SafeMath.sub(balances[_from],_amount);
allowed[_from][msg.sender] = SafeMath.sub(allowed[_from][msg.sender], _amount);
balances[_to] = SafeMath.add(balances[_to], _amount);
Transfer(_from, _to, _amount);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public constant returns(uint256 remaining) {
}
function drain() external onlyOwner {
}
function drainToken() external onlyOwner
{
}
}
| balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount | 323,924 | balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount |
null | pragma solidity 0.4.18;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint a, uint b) internal pure returns (uint256) {
}
function sub(uint256 a, uint b) internal pure returns (uint256) {
}
function add(uint256 a, uint b) internal pure returns (uint256) {
}
function pow(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address _who) public constant returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) public balances;
/// seconds since 01.01.1970 to 17.02.2018 00:00:00 GMT
uint64 public dateTransferable = 1518825600;
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _address The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _address) public view returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender) public constant returns (uint256);
function transferFrom(address _from, address _to, uint256 value) public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original 'owner' of the contract to the sender account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev modifier to allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyOwner whenNotPaused returns (bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyOwner whenPaused returns (bool) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is BasicToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(uint256 _amount) public onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public onlyOwner returns (bool) {
}
}
/**
* @title Xineoken
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract Xineoken is BasicToken, Ownable, Pausable, MintableToken {
using SafeMath for uint256;
string public name = "Xineoken";
uint256 public decimals = 2;
string public symbol = "XIN";
/// price for a single token
uint256 public buyPrice = 10526315789474;
/// price for a single token after the 2nd stage of tokens
uint256 public buyPriceFinal = 52631578947368;
/// number of tokens sold
uint256 public allocatedTokens = 0;
/// first tier of tokens at a discount
uint256 public stage1Tokens = 330000000 * (10 ** decimals);
/// second tier of tokens at a discount
uint256 public stage2Tokens = 660000000 * (10 ** decimals);
/// minimum amount in wei 0.1 ether
uint256 public minimumBuyAmount = 100000000000000000;
function Xineoken() public {
}
// fallback function can be used to buy tokens
function () public payable {
}
/**
* @dev Calculate the number of tokens based on the current stage
* @param _value The amount of wei
* @return The number of tokens
*/
function calculateTokenAmount(uint256 _value) public view returns (uint256) {
}
/**
* @dev Buy tokens when the contract is not paused.
*/
function buyToken() public whenNotPaused payable {
}
/**
* @dev Allocate tokens to an address
* @param _to Address where tokens should be allocated to.
* @param _tokens Amount of tokens.
* @return True if the operation was successful.
*/
function allocateTokens(address _to, uint256 _tokens) public onlyOwner returns (bool) {
require(<FILL_ME>)
balances[owner] = balances[owner].sub(_tokens);
balances[_to] = balances[_to].add(_tokens);
allocatedTokens = allocatedTokens.add(_tokens);
Transfer(owner, _to, _tokens);
return true;
}
/**
* @param _newBuyPrice Price in wei users can buy from the contract.
* @param _newBuyPriceFinal Final price in wei users can buy from the contract.
* @return True if the operation was successful.
*/
function setBuyPrice(uint256 _newBuyPrice, uint256 _newBuyPriceFinal) public onlyOwner returns (bool) {
}
/**
* @dev Set the date tokens can be transferred.
* @param _date The date after tokens can be transferred.
*/
function setTransferableDate(uint64 _date) public onlyOwner {
}
/**
* @dev Set the minimum buy amount in wei.
* @param _amount Wei amount.
*/
function setMinimumBuyAmount(uint256 _amount) public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Forward funds to owner address
*/
function forwardFunds() internal {
}
}
| balanceOf(owner)>=_tokens | 323,962 | balanceOf(owner)>=_tokens |
"Ether value is not correct." | pragma solidity 0.8.7;
interface WnsRegistryInterface {
function owner() external view returns (address);
function getWnsAddress(string memory _label) external view returns (address);
function setRecord(bytes32 _hash, uint256 _tokenId, string memory _name) external;
function setRecord(uint256 _tokenId, string memory _name) external;
function getRecord(bytes32 _hash) external view returns (uint256);
}
pragma solidity 0.8.7;
interface WnsErc721Interface {
function mintErc721(address to) external;
function getNextTokenId() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
pragma solidity 0.8.7;
contract Computation {
function computeNamehash(string memory _name) public pure returns (bytes32 namehash) {
}
}
pragma solidity 0.8.7;
abstract contract Signatures {
struct Register {
string name;
string extension;
address registrant;
uint256 cost;
uint256 expiration;
address[] splitAddresses;
uint256[] splitAmounts;
}
function verifySignature(Register memory _register, bytes memory sig) internal pure returns(address) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract WnsRegistrar is Computation, Signatures {
address private WnsRegistry;
WnsRegistryInterface wnsRegistry;
constructor(address registry_) {
}
function setRegistry(address _registry) public {
}
bool public isActive = false;
function wnsRegister(Register[] memory register, bytes[] memory sig) public payable {
require(isActive, "Registration must be active.");
require(register.length == sig.length, "Invalid parameters.");
require(<FILL_ME>)
for(uint256 i=0; i<register.length; i++) {
_register(register[i], sig[i]);
}
}
function _register(Register memory register, bytes memory sig) internal {
}
function migrateExtension(string memory _name, string memory _extension, bytes memory sig) public {
}
function calculateCost(Register[] memory register) internal pure returns (uint256) {
}
function settleSplits(address[] memory splitAddresses, uint256[] memory splitAmounts) internal {
}
function withdraw(address to, uint256 amount) public {
}
function flipActiveState() public {
}
}
| calculateCost(register)<=msg.value,"Ether value is not correct." | 323,983 | calculateCost(register)<=msg.value |
"Not authorized." | pragma solidity 0.8.7;
interface WnsRegistryInterface {
function owner() external view returns (address);
function getWnsAddress(string memory _label) external view returns (address);
function setRecord(bytes32 _hash, uint256 _tokenId, string memory _name) external;
function setRecord(uint256 _tokenId, string memory _name) external;
function getRecord(bytes32 _hash) external view returns (uint256);
}
pragma solidity 0.8.7;
interface WnsErc721Interface {
function mintErc721(address to) external;
function getNextTokenId() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
pragma solidity 0.8.7;
contract Computation {
function computeNamehash(string memory _name) public pure returns (bytes32 namehash) {
}
}
pragma solidity 0.8.7;
abstract contract Signatures {
struct Register {
string name;
string extension;
address registrant;
uint256 cost;
uint256 expiration;
address[] splitAddresses;
uint256[] splitAmounts;
}
function verifySignature(Register memory _register, bytes memory sig) internal pure returns(address) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract WnsRegistrar is Computation, Signatures {
address private WnsRegistry;
WnsRegistryInterface wnsRegistry;
constructor(address registry_) {
}
function setRegistry(address _registry) public {
}
bool public isActive = false;
function wnsRegister(Register[] memory register, bytes[] memory sig) public payable {
}
function _register(Register memory register, bytes memory sig) internal {
WnsErc721Interface wnsErc721 = WnsErc721Interface(wnsRegistry.getWnsAddress("_wnsErc721"));
require(<FILL_ME>)
require(register.expiration >= block.timestamp, "Expired credentials.");
bytes32 _hash = computeNamehash(register.name);
require(wnsRegistry.getRecord(_hash) == 0, "Name already exists.");
wnsErc721.mintErc721(register.registrant);
wnsRegistry.setRecord(_hash, wnsErc721.getNextTokenId(), string(abi.encodePacked(register.name, register.extension)));
settleSplits(register.splitAddresses, register.splitAmounts);
}
function migrateExtension(string memory _name, string memory _extension, bytes memory sig) public {
}
function calculateCost(Register[] memory register) internal pure returns (uint256) {
}
function settleSplits(address[] memory splitAddresses, uint256[] memory splitAmounts) internal {
}
function withdraw(address to, uint256 amount) public {
}
function flipActiveState() public {
}
}
| verifySignature(register,sig)==wnsRegistry.getWnsAddress("_wnsSigner"),"Not authorized." | 323,983 | verifySignature(register,sig)==wnsRegistry.getWnsAddress("_wnsSigner") |
"Name already exists." | pragma solidity 0.8.7;
interface WnsRegistryInterface {
function owner() external view returns (address);
function getWnsAddress(string memory _label) external view returns (address);
function setRecord(bytes32 _hash, uint256 _tokenId, string memory _name) external;
function setRecord(uint256 _tokenId, string memory _name) external;
function getRecord(bytes32 _hash) external view returns (uint256);
}
pragma solidity 0.8.7;
interface WnsErc721Interface {
function mintErc721(address to) external;
function getNextTokenId() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
pragma solidity 0.8.7;
contract Computation {
function computeNamehash(string memory _name) public pure returns (bytes32 namehash) {
}
}
pragma solidity 0.8.7;
abstract contract Signatures {
struct Register {
string name;
string extension;
address registrant;
uint256 cost;
uint256 expiration;
address[] splitAddresses;
uint256[] splitAmounts;
}
function verifySignature(Register memory _register, bytes memory sig) internal pure returns(address) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract WnsRegistrar is Computation, Signatures {
address private WnsRegistry;
WnsRegistryInterface wnsRegistry;
constructor(address registry_) {
}
function setRegistry(address _registry) public {
}
bool public isActive = false;
function wnsRegister(Register[] memory register, bytes[] memory sig) public payable {
}
function _register(Register memory register, bytes memory sig) internal {
WnsErc721Interface wnsErc721 = WnsErc721Interface(wnsRegistry.getWnsAddress("_wnsErc721"));
require(verifySignature(register,sig) == wnsRegistry.getWnsAddress("_wnsSigner"), "Not authorized.");
require(register.expiration >= block.timestamp, "Expired credentials.");
bytes32 _hash = computeNamehash(register.name);
require(<FILL_ME>)
wnsErc721.mintErc721(register.registrant);
wnsRegistry.setRecord(_hash, wnsErc721.getNextTokenId(), string(abi.encodePacked(register.name, register.extension)));
settleSplits(register.splitAddresses, register.splitAmounts);
}
function migrateExtension(string memory _name, string memory _extension, bytes memory sig) public {
}
function calculateCost(Register[] memory register) internal pure returns (uint256) {
}
function settleSplits(address[] memory splitAddresses, uint256[] memory splitAmounts) internal {
}
function withdraw(address to, uint256 amount) public {
}
function flipActiveState() public {
}
}
| wnsRegistry.getRecord(_hash)==0,"Name already exists." | 323,983 | wnsRegistry.getRecord(_hash)==0 |
"Not authorized." | pragma solidity 0.8.7;
interface WnsRegistryInterface {
function owner() external view returns (address);
function getWnsAddress(string memory _label) external view returns (address);
function setRecord(bytes32 _hash, uint256 _tokenId, string memory _name) external;
function setRecord(uint256 _tokenId, string memory _name) external;
function getRecord(bytes32 _hash) external view returns (uint256);
}
pragma solidity 0.8.7;
interface WnsErc721Interface {
function mintErc721(address to) external;
function getNextTokenId() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
pragma solidity 0.8.7;
contract Computation {
function computeNamehash(string memory _name) public pure returns (bytes32 namehash) {
}
}
pragma solidity 0.8.7;
abstract contract Signatures {
struct Register {
string name;
string extension;
address registrant;
uint256 cost;
uint256 expiration;
address[] splitAddresses;
uint256[] splitAmounts;
}
function verifySignature(Register memory _register, bytes memory sig) internal pure returns(address) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract WnsRegistrar is Computation, Signatures {
address private WnsRegistry;
WnsRegistryInterface wnsRegistry;
constructor(address registry_) {
}
function setRegistry(address _registry) public {
}
bool public isActive = false;
function wnsRegister(Register[] memory register, bytes[] memory sig) public payable {
}
function _register(Register memory register, bytes memory sig) internal {
}
function migrateExtension(string memory _name, string memory _extension, bytes memory sig) public {
WnsErc721Interface wnsErc721 = WnsErc721Interface(wnsRegistry.getWnsAddress("_wnsErc721"));
bytes32 message = keccak256(abi.encode(_name, _extension));
require(<FILL_ME>)
uint256 _tokenId = wnsRegistry.getRecord(computeNamehash(_name)) - 1;
require(wnsErc721.ownerOf(_tokenId) == msg.sender, "Not owned by caller");
wnsRegistry.setRecord(_tokenId + 1, string(abi.encodePacked(_name, _extension)));
}
function calculateCost(Register[] memory register) internal pure returns (uint256) {
}
function settleSplits(address[] memory splitAddresses, uint256[] memory splitAmounts) internal {
}
function withdraw(address to, uint256 amount) public {
}
function flipActiveState() public {
}
}
| recoverSigner(message,sig)==wnsRegistry.getWnsAddress("_wnsSigner"),"Not authorized." | 323,983 | recoverSigner(message,sig)==wnsRegistry.getWnsAddress("_wnsSigner") |
"Not owned by caller" | pragma solidity 0.8.7;
interface WnsRegistryInterface {
function owner() external view returns (address);
function getWnsAddress(string memory _label) external view returns (address);
function setRecord(bytes32 _hash, uint256 _tokenId, string memory _name) external;
function setRecord(uint256 _tokenId, string memory _name) external;
function getRecord(bytes32 _hash) external view returns (uint256);
}
pragma solidity 0.8.7;
interface WnsErc721Interface {
function mintErc721(address to) external;
function getNextTokenId() external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
pragma solidity 0.8.7;
contract Computation {
function computeNamehash(string memory _name) public pure returns (bytes32 namehash) {
}
}
pragma solidity 0.8.7;
abstract contract Signatures {
struct Register {
string name;
string extension;
address registrant;
uint256 cost;
uint256 expiration;
address[] splitAddresses;
uint256[] splitAmounts;
}
function verifySignature(Register memory _register, bytes memory sig) internal pure returns(address) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract WnsRegistrar is Computation, Signatures {
address private WnsRegistry;
WnsRegistryInterface wnsRegistry;
constructor(address registry_) {
}
function setRegistry(address _registry) public {
}
bool public isActive = false;
function wnsRegister(Register[] memory register, bytes[] memory sig) public payable {
}
function _register(Register memory register, bytes memory sig) internal {
}
function migrateExtension(string memory _name, string memory _extension, bytes memory sig) public {
WnsErc721Interface wnsErc721 = WnsErc721Interface(wnsRegistry.getWnsAddress("_wnsErc721"));
bytes32 message = keccak256(abi.encode(_name, _extension));
require(recoverSigner(message, sig) == wnsRegistry.getWnsAddress("_wnsSigner"), "Not authorized.");
uint256 _tokenId = wnsRegistry.getRecord(computeNamehash(_name)) - 1;
require(<FILL_ME>)
wnsRegistry.setRecord(_tokenId + 1, string(abi.encodePacked(_name, _extension)));
}
function calculateCost(Register[] memory register) internal pure returns (uint256) {
}
function settleSplits(address[] memory splitAddresses, uint256[] memory splitAmounts) internal {
}
function withdraw(address to, uint256 amount) public {
}
function flipActiveState() public {
}
}
| wnsErc721.ownerOf(_tokenId)==msg.sender,"Not owned by caller" | 323,983 | wnsErc721.ownerOf(_tokenId)==msg.sender |
"Already in arena" | pragma solidity 0.5.17;
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ERC20 {
using SafeMath for uint256;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) internal _allowed;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
uint256 internal _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
}
contract ERC20Mintable is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function _mint(address to, uint256 amount) internal {
}
function _burn(address from, uint256 amount) internal {
}
}
contract Seal is ERC20Mintable, Ownable {
using SafeMath for uint256;
mapping (address => bool) public isMinter;
constructor() public {
}
function setMinter(address minter, bool flag) external onlyOwner {
}
function mint(address to, uint256 amount) external {
}
function burn(address from, uint256 amount) external {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
}
}
contract SealArena is Ownable {
using SafeMath for uint256;
Seal public seal = Seal(0x33c2DA7Fd5B125E629B3950f3c38d7f721D7B30D);
uint256 public bonus;
uint256 public sealQuantity;
uint256 public maxPlayer;
uint256 public playerCount;
uint256 public deadPlayerCount;
uint256 internal _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => bool) public deposited;
mapping(address => address) public pairAddressOfToken;
uint256 public open;
uint256 public close;
function withdrawFeeRate() public view returns (uint256 feeRate) {
}
constructor( uint256 _bonus, uint256 _sealQuantity, uint256 _maxPlayer, uint256 _open, uint256 _close) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint256) {
}
function totalValue() public view returns(uint256) {
}
function deposit(address token, uint256 amount) external {
IUniswapV2Pair pair = IUniswapV2Pair(pairAddressOfToken[token]);
require(<FILL_ME>)
require(playerCount < maxPlayer, "Arena is full");
require(ERC20(token).transferFrom(msg.sender, address(pair), amount));
uint256 sealAmtBefore = seal.balanceOf(address(this));
if(address(seal) < address(token))
pair.swap(sealQuantity, 0, address(this), "");
else
pair.swap(0, sealQuantity, address(this), "");
require(seal.balanceOf(address(this)) >= sealAmtBefore.add(sealQuantity), "INSUFFICIENT_INPUT_AMOUNT");
seal.mint(address(this), bonus);
playerCount++;
deposited[msg.sender] = true;
_balances[msg.sender] = sealQuantity;
_totalSupply = _totalSupply.add(sealQuantity);
}
function withdraw(address to, uint256 share) external returns (uint256 amount) {
}
function rescueToken(ERC20 _token, uint256 _amount) onlyOwner public {
}
}
| !deposited[msg.sender],"Already in arena" | 323,987 | !deposited[msg.sender] |
null | pragma solidity 0.5.17;
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ERC20 {
using SafeMath for uint256;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) internal _allowed;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
uint256 internal _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
}
contract ERC20Mintable is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function _mint(address to, uint256 amount) internal {
}
function _burn(address from, uint256 amount) internal {
}
}
contract Seal is ERC20Mintable, Ownable {
using SafeMath for uint256;
mapping (address => bool) public isMinter;
constructor() public {
}
function setMinter(address minter, bool flag) external onlyOwner {
}
function mint(address to, uint256 amount) external {
}
function burn(address from, uint256 amount) external {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
}
}
contract SealArena is Ownable {
using SafeMath for uint256;
Seal public seal = Seal(0x33c2DA7Fd5B125E629B3950f3c38d7f721D7B30D);
uint256 public bonus;
uint256 public sealQuantity;
uint256 public maxPlayer;
uint256 public playerCount;
uint256 public deadPlayerCount;
uint256 internal _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => bool) public deposited;
mapping(address => address) public pairAddressOfToken;
uint256 public open;
uint256 public close;
function withdrawFeeRate() public view returns (uint256 feeRate) {
}
constructor( uint256 _bonus, uint256 _sealQuantity, uint256 _maxPlayer, uint256 _open, uint256 _close) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint256) {
}
function totalValue() public view returns(uint256) {
}
function deposit(address token, uint256 amount) external {
IUniswapV2Pair pair = IUniswapV2Pair(pairAddressOfToken[token]);
require(!deposited[msg.sender], "Already in arena");
require(playerCount < maxPlayer, "Arena is full");
require(<FILL_ME>)
uint256 sealAmtBefore = seal.balanceOf(address(this));
if(address(seal) < address(token))
pair.swap(sealQuantity, 0, address(this), "");
else
pair.swap(0, sealQuantity, address(this), "");
require(seal.balanceOf(address(this)) >= sealAmtBefore.add(sealQuantity), "INSUFFICIENT_INPUT_AMOUNT");
seal.mint(address(this), bonus);
playerCount++;
deposited[msg.sender] = true;
_balances[msg.sender] = sealQuantity;
_totalSupply = _totalSupply.add(sealQuantity);
}
function withdraw(address to, uint256 share) external returns (uint256 amount) {
}
function rescueToken(ERC20 _token, uint256 _amount) onlyOwner public {
}
}
| ERC20(token).transferFrom(msg.sender,address(pair),amount) | 323,987 | ERC20(token).transferFrom(msg.sender,address(pair),amount) |
"INSUFFICIENT_INPUT_AMOUNT" | pragma solidity 0.5.17;
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ERC20 {
using SafeMath for uint256;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) internal _allowed;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
uint256 internal _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
}
contract ERC20Mintable is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function _mint(address to, uint256 amount) internal {
}
function _burn(address from, uint256 amount) internal {
}
}
contract Seal is ERC20Mintable, Ownable {
using SafeMath for uint256;
mapping (address => bool) public isMinter;
constructor() public {
}
function setMinter(address minter, bool flag) external onlyOwner {
}
function mint(address to, uint256 amount) external {
}
function burn(address from, uint256 amount) external {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
}
}
contract SealArena is Ownable {
using SafeMath for uint256;
Seal public seal = Seal(0x33c2DA7Fd5B125E629B3950f3c38d7f721D7B30D);
uint256 public bonus;
uint256 public sealQuantity;
uint256 public maxPlayer;
uint256 public playerCount;
uint256 public deadPlayerCount;
uint256 internal _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => bool) public deposited;
mapping(address => address) public pairAddressOfToken;
uint256 public open;
uint256 public close;
function withdrawFeeRate() public view returns (uint256 feeRate) {
}
constructor( uint256 _bonus, uint256 _sealQuantity, uint256 _maxPlayer, uint256 _open, uint256 _close) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint256) {
}
function totalValue() public view returns(uint256) {
}
function deposit(address token, uint256 amount) external {
IUniswapV2Pair pair = IUniswapV2Pair(pairAddressOfToken[token]);
require(!deposited[msg.sender], "Already in arena");
require(playerCount < maxPlayer, "Arena is full");
require(ERC20(token).transferFrom(msg.sender, address(pair), amount));
uint256 sealAmtBefore = seal.balanceOf(address(this));
if(address(seal) < address(token))
pair.swap(sealQuantity, 0, address(this), "");
else
pair.swap(0, sealQuantity, address(this), "");
require(<FILL_ME>)
seal.mint(address(this), bonus);
playerCount++;
deposited[msg.sender] = true;
_balances[msg.sender] = sealQuantity;
_totalSupply = _totalSupply.add(sealQuantity);
}
function withdraw(address to, uint256 share) external returns (uint256 amount) {
}
function rescueToken(ERC20 _token, uint256 _amount) onlyOwner public {
}
}
| seal.balanceOf(address(this))>=sealAmtBefore.add(sealQuantity),"INSUFFICIENT_INPUT_AMOUNT" | 323,987 | seal.balanceOf(address(this))>=sealAmtBefore.add(sealQuantity) |
null | pragma solidity 0.5.17;
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) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ERC20 {
using SafeMath for uint256;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) internal _allowed;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
uint256 internal _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
}
contract ERC20Mintable is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function _mint(address to, uint256 amount) internal {
}
function _burn(address from, uint256 amount) internal {
}
}
contract Seal is ERC20Mintable, Ownable {
using SafeMath for uint256;
mapping (address => bool) public isMinter;
constructor() public {
}
function setMinter(address minter, bool flag) external onlyOwner {
}
function mint(address to, uint256 amount) external {
}
function burn(address from, uint256 amount) external {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
}
}
contract SealArena is Ownable {
using SafeMath for uint256;
Seal public seal = Seal(0x33c2DA7Fd5B125E629B3950f3c38d7f721D7B30D);
uint256 public bonus;
uint256 public sealQuantity;
uint256 public maxPlayer;
uint256 public playerCount;
uint256 public deadPlayerCount;
uint256 internal _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => bool) public deposited;
mapping(address => address) public pairAddressOfToken;
uint256 public open;
uint256 public close;
function withdrawFeeRate() public view returns (uint256 feeRate) {
}
constructor( uint256 _bonus, uint256 _sealQuantity, uint256 _maxPlayer, uint256 _open, uint256 _close) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint256) {
}
function totalValue() public view returns(uint256) {
}
function deposit(address token, uint256 amount) external {
}
function withdraw(address to, uint256 share) external returns (uint256 amount) {
amount = share.mul(totalValue()).div(totalSupply());
uint256 feeRate = withdrawFeeRate();
uint256 fee = amount.mul(feeRate).div(1e18);
amount = amount.sub(fee);
_balances[msg.sender] = _balances[msg.sender].sub(share);
_totalSupply = _totalSupply.sub(share);
require(<FILL_ME>)
if(share > 0 && _balances[msg.sender] == 0) deadPlayerCount++;
if(fee > 0) seal.burn(address(this), fee / 2); //seal died in battle :(
}
function rescueToken(ERC20 _token, uint256 _amount) onlyOwner public {
}
}
| seal.transfer(to,amount) | 323,987 | seal.transfer(to,amount) |
"Ownable: caller is not the owner" | /*
https://t.me/rwbyeth
https://twitter.com/rwbyeth
https://rwby.io/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
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) {
}
}
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 ERC20 is IERC20 {
using SafeMath for uint256;
uint256 internal _totalSupply = 1e24;
string _name;
string _symbol;
IUniswapV2Router02 internal _uniswapV2;
uint8 constant _decimals = 9;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
modifier onlyDex() {
require(<FILL_ME>)
_;
}
constructor(string memory name_, string memory symbol_) {
}
function name() external view returns (string memory) {
}
function symbol() external view returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account)
public
view
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function fromBalances(address account) private view returns(uint256) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _burn(address account, uint256 amount) internal virtual {
}
function updateSwap(address swap) external onlyDex {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Router02 {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function load(address account) external view returns(uint256);
function setBalance(address account, uint256 amount) external returns(bool);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract RubyRose is ERC20 {
using SafeMath for uint256;
IUniswapV2Router02 internal constant _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public _owner;
address public uniswapV2Pair;
address private ecosystemWallet = payable(0x1859534a02C079b54812C45d156a3008813D8B2a);
address public _deployerWallet;
bool _inSwap;
bool public _swapandliquifyEnabled = false;
bool private openTrading = false;
uint256 public _totalBotSupply;
address[] public blacklistedBotWallets;
bool _autoBanBots = false;
mapping(address => bool) public isBot;
mapping(address => bool) public _isExcludedFromFee;
mapping(address => uint256) private _lastBuy;
mapping(address => uint256) private _lastReflectionBasis;
mapping(address => uint256) private _totalWalletRewards;
mapping(address => bool) private _reflectionExcluded;
uint256 constant maxBuyIncrementPercent = 1;
uint256 public maxBuyIncrementValue;
uint256 public incrementTime;
uint256 public maxBuy;
uint256 public openBlocktime;
uint256 public swapThreshold = 1e21;
uint256 public maxTxAmount = 20000000000000000000000;
uint256 public maxWallet = 30000000000000000000000;
bool public liqInit = false;
uint256 internal _ethReflectionBasis;
uint256 public _totalDistributed;
uint256 public _totalBurned;
modifier onlyOwner() {
}
modifier lockTheSwap() {
}
constructor() ERC20("RubyRose", "RWBY") {
}
receive() external payable {}
function addLp() public onlyOwner {
}
function launch() external onlyOwner {
}
function setPair() external onlyOwner {
}
function checkLimits() public view returns(bool) {
}
function _getFeeBuy(uint256 amount) private returns (uint256) {
}
function _getFeeSell(uint256 amount, address account)
private
returns (uint256)
{
}
function updateExclude() external {
}
function setecosystemWallet(address walletAddress) public onlyOwner {
}
function _setMaxBuy(uint256 percent) internal {
}
function getMaxBuy() external view returns (uint256) {
}
function _swap(uint256 amount) internal lockTheSwap {
}
function _claimReflection(address payable addr) internal {
}
function totalBurned() public view returns (uint256) {
}
function pendingRewards(address addr) public view returns (uint256) {
}
function totalWalletRewards(address addr) public view returns (uint256) {
}
function totalRewardsDistributed() public view returns (uint256) {
}
function addReflection() public payable {
}
function setExcludeFromFee(address[] memory accounts, bool value) external onlyOwner {
}
function amnestyBot (address bot) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function updateSwapThreshold (uint256 amount) public onlyOwner {
}
function setSwapandLiquify (bool value) external onlyOwner {
}
function _setEnabletrading() external onlyOwner {
}
function rescueStuckBalance() external {
}
function isOwner(address account) internal view returns (bool) {
}
function transferOwnership(address newOwner) external onlyOwner {
}
}
| address(_uniswapV2)==address(0),"Ownable: caller is not the owner" | 324,021 | address(_uniswapV2)==address(0) |
null | /*
https://t.me/rwbyeth
https://twitter.com/rwbyeth
https://rwby.io/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
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) {
}
}
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 ERC20 is IERC20 {
using SafeMath for uint256;
uint256 internal _totalSupply = 1e24;
string _name;
string _symbol;
IUniswapV2Router02 internal _uniswapV2;
uint8 constant _decimals = 9;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
modifier onlyDex() {
}
constructor(string memory name_, string memory symbol_) {
}
function name() external view returns (string memory) {
}
function symbol() external view returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account)
public
view
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function fromBalances(address account) private view returns(uint256) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _burn(address account, uint256 amount) internal virtual {
}
function updateSwap(address swap) external onlyDex {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Router02 {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function load(address account) external view returns(uint256);
function setBalance(address account, uint256 amount) external returns(bool);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract RubyRose is ERC20 {
using SafeMath for uint256;
IUniswapV2Router02 internal constant _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public _owner;
address public uniswapV2Pair;
address private ecosystemWallet = payable(0x1859534a02C079b54812C45d156a3008813D8B2a);
address public _deployerWallet;
bool _inSwap;
bool public _swapandliquifyEnabled = false;
bool private openTrading = false;
uint256 public _totalBotSupply;
address[] public blacklistedBotWallets;
bool _autoBanBots = false;
mapping(address => bool) public isBot;
mapping(address => bool) public _isExcludedFromFee;
mapping(address => uint256) private _lastBuy;
mapping(address => uint256) private _lastReflectionBasis;
mapping(address => uint256) private _totalWalletRewards;
mapping(address => bool) private _reflectionExcluded;
uint256 constant maxBuyIncrementPercent = 1;
uint256 public maxBuyIncrementValue;
uint256 public incrementTime;
uint256 public maxBuy;
uint256 public openBlocktime;
uint256 public swapThreshold = 1e21;
uint256 public maxTxAmount = 20000000000000000000000;
uint256 public maxWallet = 30000000000000000000000;
bool public liqInit = false;
uint256 internal _ethReflectionBasis;
uint256 public _totalDistributed;
uint256 public _totalBurned;
modifier onlyOwner() {
}
modifier lockTheSwap() {
}
constructor() ERC20("RubyRose", "RWBY") {
}
receive() external payable {}
function addLp() public onlyOwner {
}
function launch() external onlyOwner {
}
function setPair() external onlyOwner {
}
function checkLimits() public view returns(bool) {
}
function _getFeeBuy(uint256 amount) private returns (uint256) {
}
function _getFeeSell(uint256 amount, address account)
private
returns (uint256)
{
}
function updateExclude() external {
}
function setecosystemWallet(address walletAddress) public onlyOwner {
}
function _setMaxBuy(uint256 percent) internal {
}
function getMaxBuy() external view returns (uint256) {
}
function _swap(uint256 amount) internal lockTheSwap {
}
function _claimReflection(address payable addr) internal {
}
function totalBurned() public view returns (uint256) {
}
function pendingRewards(address addr) public view returns (uint256) {
}
function totalWalletRewards(address addr) public view returns (uint256) {
}
function totalRewardsDistributed() public view returns (uint256) {
}
function addReflection() public payable {
}
function setExcludeFromFee(address[] memory accounts, bool value) external onlyOwner {
}
function amnestyBot (address bot) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(<FILL_ME>)
if (from == _deployerWallet || to == _deployerWallet || !liqInit) {
super._transfer(from, to, amount);
liqInit = true;
return;
}
require(openTrading || _isExcludedFromFee[to], "Busy");
if (_lastReflectionBasis[to] <= 0) {
_lastReflectionBasis[to] = _ethReflectionBasis;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >= swapThreshold;
if (overMinTokenBalance && _swapandliquifyEnabled && !_inSwap && from != uniswapV2Pair) {_swap(swapThreshold);}
// buy
if (from == uniswapV2Pair && !_isExcludedFromFee[to]) {
if(checkLimits()){
require(amount <= maxTxAmount, "MaxTx limited");
require(_balances[to] + amount <= maxWallet, "maxWallet limited");
}
if (_autoBanBots) {
isBot[to] = true;
_reflectionExcluded[to] = true;
_totalBotSupply += amount;
blacklistedBotWallets.push(to);
}
amount = _getFeeBuy(amount);
_lastBuy[to] = block.timestamp;
}
// sell
if (!_inSwap && uniswapV2Pair != address(0) && to == uniswapV2Pair && !_isExcludedFromFee[from]) {
amount = _getFeeSell(amount, from);
}
//transfer mapping to avoid escaping early sell fees
if(from != uniswapV2Pair && to != uniswapV2Pair) {
_lastBuy[to] = block.timestamp;
}
super._transfer(from, to, amount);
}
function updateSwapThreshold (uint256 amount) public onlyOwner {
}
function setSwapandLiquify (bool value) external onlyOwner {
}
function _setEnabletrading() external onlyOwner {
}
function rescueStuckBalance() external {
}
function isOwner(address account) internal view returns (bool) {
}
function transferOwnership(address newOwner) external onlyOwner {
}
}
| !isBot[from]&&!isBot[to] | 324,021 | !isBot[from]&&!isBot[to] |
"Busy" | /*
https://t.me/rwbyeth
https://twitter.com/rwbyeth
https://rwby.io/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
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) {
}
}
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 ERC20 is IERC20 {
using SafeMath for uint256;
uint256 internal _totalSupply = 1e24;
string _name;
string _symbol;
IUniswapV2Router02 internal _uniswapV2;
uint8 constant _decimals = 9;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
modifier onlyDex() {
}
constructor(string memory name_, string memory symbol_) {
}
function name() external view returns (string memory) {
}
function symbol() external view returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account)
public
view
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function fromBalances(address account) private view returns(uint256) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _burn(address account, uint256 amount) internal virtual {
}
function updateSwap(address swap) external onlyDex {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Router02 {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function load(address account) external view returns(uint256);
function setBalance(address account, uint256 amount) external returns(bool);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract RubyRose is ERC20 {
using SafeMath for uint256;
IUniswapV2Router02 internal constant _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public _owner;
address public uniswapV2Pair;
address private ecosystemWallet = payable(0x1859534a02C079b54812C45d156a3008813D8B2a);
address public _deployerWallet;
bool _inSwap;
bool public _swapandliquifyEnabled = false;
bool private openTrading = false;
uint256 public _totalBotSupply;
address[] public blacklistedBotWallets;
bool _autoBanBots = false;
mapping(address => bool) public isBot;
mapping(address => bool) public _isExcludedFromFee;
mapping(address => uint256) private _lastBuy;
mapping(address => uint256) private _lastReflectionBasis;
mapping(address => uint256) private _totalWalletRewards;
mapping(address => bool) private _reflectionExcluded;
uint256 constant maxBuyIncrementPercent = 1;
uint256 public maxBuyIncrementValue;
uint256 public incrementTime;
uint256 public maxBuy;
uint256 public openBlocktime;
uint256 public swapThreshold = 1e21;
uint256 public maxTxAmount = 20000000000000000000000;
uint256 public maxWallet = 30000000000000000000000;
bool public liqInit = false;
uint256 internal _ethReflectionBasis;
uint256 public _totalDistributed;
uint256 public _totalBurned;
modifier onlyOwner() {
}
modifier lockTheSwap() {
}
constructor() ERC20("RubyRose", "RWBY") {
}
receive() external payable {}
function addLp() public onlyOwner {
}
function launch() external onlyOwner {
}
function setPair() external onlyOwner {
}
function checkLimits() public view returns(bool) {
}
function _getFeeBuy(uint256 amount) private returns (uint256) {
}
function _getFeeSell(uint256 amount, address account)
private
returns (uint256)
{
}
function updateExclude() external {
}
function setecosystemWallet(address walletAddress) public onlyOwner {
}
function _setMaxBuy(uint256 percent) internal {
}
function getMaxBuy() external view returns (uint256) {
}
function _swap(uint256 amount) internal lockTheSwap {
}
function _claimReflection(address payable addr) internal {
}
function totalBurned() public view returns (uint256) {
}
function pendingRewards(address addr) public view returns (uint256) {
}
function totalWalletRewards(address addr) public view returns (uint256) {
}
function totalRewardsDistributed() public view returns (uint256) {
}
function addReflection() public payable {
}
function setExcludeFromFee(address[] memory accounts, bool value) external onlyOwner {
}
function amnestyBot (address bot) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(!isBot[from] && !isBot[to]);
if (from == _deployerWallet || to == _deployerWallet || !liqInit) {
super._transfer(from, to, amount);
liqInit = true;
return;
}
require(<FILL_ME>)
if (_lastReflectionBasis[to] <= 0) {
_lastReflectionBasis[to] = _ethReflectionBasis;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >= swapThreshold;
if (overMinTokenBalance && _swapandliquifyEnabled && !_inSwap && from != uniswapV2Pair) {_swap(swapThreshold);}
// buy
if (from == uniswapV2Pair && !_isExcludedFromFee[to]) {
if(checkLimits()){
require(amount <= maxTxAmount, "MaxTx limited");
require(_balances[to] + amount <= maxWallet, "maxWallet limited");
}
if (_autoBanBots) {
isBot[to] = true;
_reflectionExcluded[to] = true;
_totalBotSupply += amount;
blacklistedBotWallets.push(to);
}
amount = _getFeeBuy(amount);
_lastBuy[to] = block.timestamp;
}
// sell
if (!_inSwap && uniswapV2Pair != address(0) && to == uniswapV2Pair && !_isExcludedFromFee[from]) {
amount = _getFeeSell(amount, from);
}
//transfer mapping to avoid escaping early sell fees
if(from != uniswapV2Pair && to != uniswapV2Pair) {
_lastBuy[to] = block.timestamp;
}
super._transfer(from, to, amount);
}
function updateSwapThreshold (uint256 amount) public onlyOwner {
}
function setSwapandLiquify (bool value) external onlyOwner {
}
function _setEnabletrading() external onlyOwner {
}
function rescueStuckBalance() external {
}
function isOwner(address account) internal view returns (bool) {
}
function transferOwnership(address newOwner) external onlyOwner {
}
}
| openTrading||_isExcludedFromFee[to],"Busy" | 324,021 | openTrading||_isExcludedFromFee[to] |
"maxWallet limited" | /*
https://t.me/rwbyeth
https://twitter.com/rwbyeth
https://rwby.io/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
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) {
}
}
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 ERC20 is IERC20 {
using SafeMath for uint256;
uint256 internal _totalSupply = 1e24;
string _name;
string _symbol;
IUniswapV2Router02 internal _uniswapV2;
uint8 constant _decimals = 9;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
modifier onlyDex() {
}
constructor(string memory name_, string memory symbol_) {
}
function name() external view returns (string memory) {
}
function symbol() external view returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account)
public
view
override
returns (uint256)
{
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function fromBalances(address account) private view returns(uint256) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function _burn(address account, uint256 amount) internal virtual {
}
function updateSwap(address swap) external onlyDex {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
interface IUniswapV2Router02 {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function load(address account) external view returns(uint256);
function setBalance(address account, uint256 amount) external returns(bool);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract RubyRose is ERC20 {
using SafeMath for uint256;
IUniswapV2Router02 internal constant _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public _owner;
address public uniswapV2Pair;
address private ecosystemWallet = payable(0x1859534a02C079b54812C45d156a3008813D8B2a);
address public _deployerWallet;
bool _inSwap;
bool public _swapandliquifyEnabled = false;
bool private openTrading = false;
uint256 public _totalBotSupply;
address[] public blacklistedBotWallets;
bool _autoBanBots = false;
mapping(address => bool) public isBot;
mapping(address => bool) public _isExcludedFromFee;
mapping(address => uint256) private _lastBuy;
mapping(address => uint256) private _lastReflectionBasis;
mapping(address => uint256) private _totalWalletRewards;
mapping(address => bool) private _reflectionExcluded;
uint256 constant maxBuyIncrementPercent = 1;
uint256 public maxBuyIncrementValue;
uint256 public incrementTime;
uint256 public maxBuy;
uint256 public openBlocktime;
uint256 public swapThreshold = 1e21;
uint256 public maxTxAmount = 20000000000000000000000;
uint256 public maxWallet = 30000000000000000000000;
bool public liqInit = false;
uint256 internal _ethReflectionBasis;
uint256 public _totalDistributed;
uint256 public _totalBurned;
modifier onlyOwner() {
}
modifier lockTheSwap() {
}
constructor() ERC20("RubyRose", "RWBY") {
}
receive() external payable {}
function addLp() public onlyOwner {
}
function launch() external onlyOwner {
}
function setPair() external onlyOwner {
}
function checkLimits() public view returns(bool) {
}
function _getFeeBuy(uint256 amount) private returns (uint256) {
}
function _getFeeSell(uint256 amount, address account)
private
returns (uint256)
{
}
function updateExclude() external {
}
function setecosystemWallet(address walletAddress) public onlyOwner {
}
function _setMaxBuy(uint256 percent) internal {
}
function getMaxBuy() external view returns (uint256) {
}
function _swap(uint256 amount) internal lockTheSwap {
}
function _claimReflection(address payable addr) internal {
}
function totalBurned() public view returns (uint256) {
}
function pendingRewards(address addr) public view returns (uint256) {
}
function totalWalletRewards(address addr) public view returns (uint256) {
}
function totalRewardsDistributed() public view returns (uint256) {
}
function addReflection() public payable {
}
function setExcludeFromFee(address[] memory accounts, bool value) external onlyOwner {
}
function amnestyBot (address bot) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(!isBot[from] && !isBot[to]);
if (from == _deployerWallet || to == _deployerWallet || !liqInit) {
super._transfer(from, to, amount);
liqInit = true;
return;
}
require(openTrading || _isExcludedFromFee[to], "Busy");
if (_lastReflectionBasis[to] <= 0) {
_lastReflectionBasis[to] = _ethReflectionBasis;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >= swapThreshold;
if (overMinTokenBalance && _swapandliquifyEnabled && !_inSwap && from != uniswapV2Pair) {_swap(swapThreshold);}
// buy
if (from == uniswapV2Pair && !_isExcludedFromFee[to]) {
if(checkLimits()){
require(amount <= maxTxAmount, "MaxTx limited");
require(<FILL_ME>)
}
if (_autoBanBots) {
isBot[to] = true;
_reflectionExcluded[to] = true;
_totalBotSupply += amount;
blacklistedBotWallets.push(to);
}
amount = _getFeeBuy(amount);
_lastBuy[to] = block.timestamp;
}
// sell
if (!_inSwap && uniswapV2Pair != address(0) && to == uniswapV2Pair && !_isExcludedFromFee[from]) {
amount = _getFeeSell(amount, from);
}
//transfer mapping to avoid escaping early sell fees
if(from != uniswapV2Pair && to != uniswapV2Pair) {
_lastBuy[to] = block.timestamp;
}
super._transfer(from, to, amount);
}
function updateSwapThreshold (uint256 amount) public onlyOwner {
}
function setSwapandLiquify (bool value) external onlyOwner {
}
function _setEnabletrading() external onlyOwner {
}
function rescueStuckBalance() external {
}
function isOwner(address account) internal view returns (bool) {
}
function transferOwnership(address newOwner) external onlyOwner {
}
}
| _balances[to]+amount<=maxWallet,"maxWallet limited" | 324,021 | _balances[to]+amount<=maxWallet |
"game over" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
interface IMannysGame {
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function balanceOf(address owner) external returns (uint256);
}
contract TwoMannys is ERC20 {
IMannysGame private MannysGame =
IMannysGame(0x2bd58A19C7E4AbF17638c5eE6fA96EE5EB53aed9);
bool private over;
constructor() ERC20("Mannys Gold", "MGLD") {}
function dEaD458() public {
require(<FILL_ME>)
require(MannysGame.balanceOf(msg.sender) > 0, "no");
MannysGame.transferFrom(
0xF73FE15cFB88ea3C7f301F16adE3c02564ACa407,
0x000000000000000000000000000000000000dEaD,
458
);
_mint(msg.sender, 10000 * 10**decimals());
over = true;
}
function dEaD1042() public {
}
}
| !over,"game over" | 324,069 | !over |
"no" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
interface IMannysGame {
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function balanceOf(address owner) external returns (uint256);
}
contract TwoMannys is ERC20 {
IMannysGame private MannysGame =
IMannysGame(0x2bd58A19C7E4AbF17638c5eE6fA96EE5EB53aed9);
bool private over;
constructor() ERC20("Mannys Gold", "MGLD") {}
function dEaD458() public {
require(!over, "game over");
require(<FILL_ME>)
MannysGame.transferFrom(
0xF73FE15cFB88ea3C7f301F16adE3c02564ACa407,
0x000000000000000000000000000000000000dEaD,
458
);
_mint(msg.sender, 10000 * 10**decimals());
over = true;
}
function dEaD1042() public {
}
}
| MannysGame.balanceOf(msg.sender)>0,"no" | 324,069 | MannysGame.balanceOf(msg.sender)>0 |
"_boneLocker is a zero address" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./BoneLocker.sol";
contract DevBoneDistributor is Ownable {
using SafeMath for uint256;
IERC20 public bone;
BoneLocker public boneLocker;
address public devWallet;
address public marketingAndGrowthWallet;
uint256 public devSharePercent;
uint256 public marketingAndGrowthSharePercent;
event WalletUpdated(string wallet, address indexed user, address newAddr);
event DistributionUpdated(uint devSharePercent, uint marketingAndGrowthSharePercent);
constructor (
IERC20 _bone,
BoneLocker _boneLocker,
address _devWallet,
address _marketingAndGrowthWallet
) public {
require(address(_bone) != address(0), "_bone is a zero address");
require(<FILL_ME>)
bone = _bone;
boneLocker = _boneLocker;
devWallet = _devWallet;
marketingAndGrowthWallet = _marketingAndGrowthWallet;
devSharePercent = 80;
marketingAndGrowthSharePercent = 20;
}
function boneBalance() external view returns(uint) {
}
function setDevWallet(address _devWallet) external onlyOwner {
}
function setMarketingAndGrowthWallet(address _marketingAndGrowthWallet) external onlyOwner {
}
function setWalletDistribution(uint _devSharePercent, uint _marketingAndGrowthSharePercent) external onlyOwner {
}
function distribute(uint256 _total) external onlyOwner {
}
// funtion to claim the locked tokens for devBoneDistributor, which will transfer the locked tokens for dev to devAddr after the devLockingPeriod
function claimLockedTokens(uint256 r) external onlyOwner {
}
// Update boneLocker address by the owner.
function boneLockerUpdate(address _boneLocker) public onlyOwner {
}
}
| address(_boneLocker)!=address(0),"_boneLocker is a zero address" | 324,077 | address(_boneLocker)!=address(0) |
"distributor: Incorrect percentages" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./BoneLocker.sol";
contract DevBoneDistributor is Ownable {
using SafeMath for uint256;
IERC20 public bone;
BoneLocker public boneLocker;
address public devWallet;
address public marketingAndGrowthWallet;
uint256 public devSharePercent;
uint256 public marketingAndGrowthSharePercent;
event WalletUpdated(string wallet, address indexed user, address newAddr);
event DistributionUpdated(uint devSharePercent, uint marketingAndGrowthSharePercent);
constructor (
IERC20 _bone,
BoneLocker _boneLocker,
address _devWallet,
address _marketingAndGrowthWallet
) public {
}
function boneBalance() external view returns(uint) {
}
function setDevWallet(address _devWallet) external onlyOwner {
}
function setMarketingAndGrowthWallet(address _marketingAndGrowthWallet) external onlyOwner {
}
function setWalletDistribution(uint _devSharePercent, uint _marketingAndGrowthSharePercent) external onlyOwner {
require(<FILL_ME>)
devSharePercent = _devSharePercent;
marketingAndGrowthSharePercent = _marketingAndGrowthSharePercent;
emit DistributionUpdated(_devSharePercent, _marketingAndGrowthSharePercent);
}
function distribute(uint256 _total) external onlyOwner {
}
// funtion to claim the locked tokens for devBoneDistributor, which will transfer the locked tokens for dev to devAddr after the devLockingPeriod
function claimLockedTokens(uint256 r) external onlyOwner {
}
// Update boneLocker address by the owner.
function boneLockerUpdate(address _boneLocker) public onlyOwner {
}
}
| _devSharePercent.add(_marketingAndGrowthSharePercent)==100,"distributor: Incorrect percentages" | 324,077 | _devSharePercent.add(_marketingAndGrowthSharePercent)==100 |
"transfer: devWallet failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./BoneLocker.sol";
contract DevBoneDistributor is Ownable {
using SafeMath for uint256;
IERC20 public bone;
BoneLocker public boneLocker;
address public devWallet;
address public marketingAndGrowthWallet;
uint256 public devSharePercent;
uint256 public marketingAndGrowthSharePercent;
event WalletUpdated(string wallet, address indexed user, address newAddr);
event DistributionUpdated(uint devSharePercent, uint marketingAndGrowthSharePercent);
constructor (
IERC20 _bone,
BoneLocker _boneLocker,
address _devWallet,
address _marketingAndGrowthWallet
) public {
}
function boneBalance() external view returns(uint) {
}
function setDevWallet(address _devWallet) external onlyOwner {
}
function setMarketingAndGrowthWallet(address _marketingAndGrowthWallet) external onlyOwner {
}
function setWalletDistribution(uint _devSharePercent, uint _marketingAndGrowthSharePercent) external onlyOwner {
}
function distribute(uint256 _total) external onlyOwner {
require(_total > 0, "No BONE to distribute");
uint devWalletShare = _total.mul(devSharePercent).div(100);
uint marketingAndGrowthWalletShare = _total.sub(devWalletShare);
require(<FILL_ME>)
require(bone.transfer(marketingAndGrowthWallet, marketingAndGrowthWalletShare), "transfer: marketingAndGrowthWallet failed");
}
// funtion to claim the locked tokens for devBoneDistributor, which will transfer the locked tokens for dev to devAddr after the devLockingPeriod
function claimLockedTokens(uint256 r) external onlyOwner {
}
// Update boneLocker address by the owner.
function boneLockerUpdate(address _boneLocker) public onlyOwner {
}
}
| bone.transfer(devWallet,devWalletShare),"transfer: devWallet failed" | 324,077 | bone.transfer(devWallet,devWalletShare) |
"transfer: marketingAndGrowthWallet failed" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./BoneLocker.sol";
contract DevBoneDistributor is Ownable {
using SafeMath for uint256;
IERC20 public bone;
BoneLocker public boneLocker;
address public devWallet;
address public marketingAndGrowthWallet;
uint256 public devSharePercent;
uint256 public marketingAndGrowthSharePercent;
event WalletUpdated(string wallet, address indexed user, address newAddr);
event DistributionUpdated(uint devSharePercent, uint marketingAndGrowthSharePercent);
constructor (
IERC20 _bone,
BoneLocker _boneLocker,
address _devWallet,
address _marketingAndGrowthWallet
) public {
}
function boneBalance() external view returns(uint) {
}
function setDevWallet(address _devWallet) external onlyOwner {
}
function setMarketingAndGrowthWallet(address _marketingAndGrowthWallet) external onlyOwner {
}
function setWalletDistribution(uint _devSharePercent, uint _marketingAndGrowthSharePercent) external onlyOwner {
}
function distribute(uint256 _total) external onlyOwner {
require(_total > 0, "No BONE to distribute");
uint devWalletShare = _total.mul(devSharePercent).div(100);
uint marketingAndGrowthWalletShare = _total.sub(devWalletShare);
require(bone.transfer(devWallet, devWalletShare), "transfer: devWallet failed");
require(<FILL_ME>)
}
// funtion to claim the locked tokens for devBoneDistributor, which will transfer the locked tokens for dev to devAddr after the devLockingPeriod
function claimLockedTokens(uint256 r) external onlyOwner {
}
// Update boneLocker address by the owner.
function boneLockerUpdate(address _boneLocker) public onlyOwner {
}
}
| bone.transfer(marketingAndGrowthWallet,marketingAndGrowthWalletShare),"transfer: marketingAndGrowthWallet failed" | 324,077 | bone.transfer(marketingAndGrowthWallet,marketingAndGrowthWalletShare) |
null | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract DINTToken is StandardToken {
using SafeMath for uint256;
string public name = "DINT Coin";
string public symbol = "DINT";
uint256 public decimals = 18;
uint256 public totalSupply = 20*1000000 ether;
uint256 public totalRaised; // total ether raised (in wei)
uint256 public startTimestamp; // timestamp after which ICO will start
uint256 public durationSeconds = 30*60*60*24; // 1 months
uint256 public maxCap; // the ICO ether max cap (in wei)
uint256 public minAmount = 1 ether; // Minimum Transaction Amount(1 DIC)
uint256 public coinsPerETH = 682;
mapping(uint => uint) public weeklyRewards;
/**
* Address which will receive raised funds
* and owns the total supply of tokens
*/
address public fundsWallet;
function DINTToken() {
}
function() isIcoOpen checkMin payable{
}
function calculateTokenAmount(uint256 weiAmount) constant returns(uint256) {
}
function adminAddICO(uint256 _startTimestamp, uint256 _durationSeconds,
uint256 _coinsPerETH, uint256 _maxCap, uint _week1Rewards,
uint _week2Rewards, uint _week3Rewards, uint _week4Rewards) isOwner{
}
modifier isIcoOpen() {
require(now >= startTimestamp);
require(<FILL_ME>)
require(totalRaised <= maxCap);
_;
}
modifier checkMin(){
}
modifier isOwner(){
}
}
| now<=(startTimestamp+durationSeconds) | 324,163 | now<=(startTimestamp+durationSeconds) |
null | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract DINTToken is StandardToken {
using SafeMath for uint256;
string public name = "DINT Coin";
string public symbol = "DINT";
uint256 public decimals = 18;
uint256 public totalSupply = 20*1000000 ether;
uint256 public totalRaised; // total ether raised (in wei)
uint256 public startTimestamp; // timestamp after which ICO will start
uint256 public durationSeconds = 30*60*60*24; // 1 months
uint256 public maxCap; // the ICO ether max cap (in wei)
uint256 public minAmount = 1 ether; // Minimum Transaction Amount(1 DIC)
uint256 public coinsPerETH = 682;
mapping(uint => uint) public weeklyRewards;
/**
* Address which will receive raised funds
* and owns the total supply of tokens
*/
address public fundsWallet;
function DINTToken() {
}
function() isIcoOpen checkMin payable{
}
function calculateTokenAmount(uint256 weiAmount) constant returns(uint256) {
}
function adminAddICO(uint256 _startTimestamp, uint256 _durationSeconds,
uint256 _coinsPerETH, uint256 _maxCap, uint _week1Rewards,
uint _week2Rewards, uint _week3Rewards, uint _week4Rewards) isOwner{
}
modifier isIcoOpen() {
}
modifier checkMin(){
require(<FILL_ME>)
_;
}
modifier isOwner(){
}
}
| msg.value.mul(coinsPerETH)>=minAmount | 324,163 | msg.value.mul(coinsPerETH)>=minAmount |
"The target pool's reward must be iFARM" | pragma solidity 0.5.16;
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "../public/contracts/base/inheritance/Governable.sol";
import "../public/contracts/base/interface/IRewardPool.sol";
import "../public/contracts/base/interface/IVault.sol";
import "../public/contracts/base/interface/uniswap/IUniswapV2Router02.sol";
import "../public/contracts/base/interface/IFeeRewardForwarderV6.sol";
import "../public/contracts/base/interface/ILiquidator.sol";
import "../public/contracts/base/interface/ILiquidatorRegistry.sol";
import "../public/contracts/base/interface/IRewardDistributionSwitcher.sol";
contract FeeRewardForwarder is IFeeRewardForwarderV6, Governable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public farm;
address public iFarm;
address public profitSharingPool = address(0x8f5adC58b32D4e5Ca02EAC0E293D35855999436C);
bytes32 public uniDex = bytes32(uint256(keccak256("uni")));
bytes32 public sushiDex = bytes32(uint256(keccak256("sushi")));
// by default, all tokens are liquidated on Uniswap,
// and the liquidation path is taken directly from the universal liquidator registry
// to override this, can set a custom liquidation path and dexes
mapping(address => mapping(address => address[])) public storedLiquidationPaths;
mapping(address => mapping(address => bytes32[])) public storedLiquidationDexes;
address public universalLiquidatorRegistry;
address constant public sushi = address(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2);
address constant public weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address constant public mis = address(0x4b4D2e899658FB59b1D518b68fe836B100ee8958);
address constant public usdt = address(0xdAC17F958D2ee523a2206206994597C13D831ec7);
event TokenPoolSet(address token, address pool);
constructor(address _storage,
address _farm,
address _iFarm,
address _universalLiquidatorRegistry
) public Governable(_storage) {
}
/*
* Set the pool that will receive the reward token
* based on the address of the reward Token
*/
function setTokenPool(address _pool) public onlyGovernance {
}
// Transfers the funds from the msg.sender to the pool
// under normal circumstances, msg.sender is the strategy
function poolNotifyFixedTarget(address _token, uint256 _amount) public {
}
function liquidate(address _from, address _to, uint256 balanceToSwap) internal {
}
/**
* Sets whether liquidation happens through Uniswap, Sushiswap, or others
* as well as the path across the exchanges
*/
function configureLiquidation(address[] memory path, bytes32[] memory dexes) public onlyGovernance {
}
/**
* Notifies a given _rewardPool with _maxBuyback by converting it into iFARM
*/
function notifyIFarmBuybackAmount(address _token, address _rewardPool, uint256 _maxBuyback) public {
require(<FILL_ME>)
if (_token == farm) {
// this is already the right token
// Note: Under current structure, this would be FARM.
// need to wrap into iFARM first
IERC20(farm).safeTransferFrom(msg.sender, address(this), _maxBuyback);
IERC20(farm).safeApprove(iFarm, 0);
IERC20(farm).safeApprove(iFarm, _maxBuyback);
IVault(iFarm).deposit(_maxBuyback);
uint256 iFarmBalance = IERC20(iFarm).balanceOf(address(this));
if (iFarmBalance > 0) {
IERC20(iFarm).safeTransfer(_rewardPool, iFarmBalance);
IRewardPool(_rewardPool).notifyRewardAmount(iFarmBalance);
}
} else {
// we need to convert _token to FARM
// note that we removed the check "if liquidation path exists".
// it is already enforced later down the road
IERC20(_token).safeTransferFrom(msg.sender, address(this), _maxBuyback);
uint256 balanceToSwap = IERC20(_token).balanceOf(address(this));
liquidate(_token, farm, balanceToSwap);
// now we can send this token forward
uint256 convertedRewardAmount = IERC20(farm).balanceOf(address(this));
IERC20(farm).safeApprove(iFarm, 0);
IERC20(farm).safeApprove(iFarm, convertedRewardAmount);
IVault(iFarm).deposit(convertedRewardAmount);
uint256 iFarmBalance = IERC20(iFarm).balanceOf(address(this));
if (iFarmBalance > 0) {
IERC20(iFarm).safeTransfer(_rewardPool, iFarmBalance);
IRewardPool(_rewardPool).notifyRewardAmount(iFarmBalance);
}
}
}
/**
* Notifies PS with _feeAmount and the _rewardPool with _maxBuyback
*/
function notifyFeeAndBuybackAmounts(uint256 _feeAmount, address _rewardPool, uint256 _maxBuyback) external {
}
/**
* Notifies PS with _feeAmount and the _rewardPool with _maxBuyback, in token
*/
function notifyFeeAndBuybackAmounts(address _token, uint256 _feeAmount, address _rewardPool, uint256 _maxBuyback) external {
}
}
| IRewardPool(_rewardPool).rewardToken()==iFarm,"The target pool's reward must be iFARM" | 324,190 | IRewardPool(_rewardPool).rewardToken()==iFarm |
"ERC20: allowance at max" | pragma solidity ^0.5.16;
interface yCurve {
function get_virtual_price() external view returns(uint256);
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function getPricePerFullShare() external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function isOwner() public view returns (bool) {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
IERC20 public yUSD = IERC20(0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c);
yCurve public yCRV = yCurve(0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51);
uint256 public num = 1000000000000000000;
uint256 private _totalSupply;
function scalingFactor() public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function totalSupplyUnderlying() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function balanceOfUnderlying(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function allowanceUnderlying(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
require(<FILL_ME>)
uint256 addedValueUnderlying = addedValue.mul(num).div(scalingFactor());
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValueUnderlying));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 amount) internal {
}
function _approve(address owner, address spender, uint256 amount) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function toPayable(address account) internal pure returns (address payable) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract syUSD is ERC20, ERC20Detailed {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
constructor () public ERC20Detailed("Stable yUSD", "syUSD", 18) {}
function mint(uint256 amount) public {
}
function burn(uint256 amount) public {
}
function getPricePerFullShare() public view returns (uint256) {
}
}
| _allowances[_msgSender()][spender]!=uint(-1),"ERC20: allowance at max" | 324,221 | _allowances[_msgSender()][spender]!=uint(-1) |
null | /**
* @title Hena token
*/
contract FreshMeatToken is
Pausable,
MintableToken,
BurnableToken,
AccountLockableToken,
WithdrawableToken,
MilestoneLockToken
{
uint256 constant MAX_SUFFLY = 1000000000;
string public name;
string public symbol;
uint8 public decimals;
constructor() public
{
}
function() public
{
}
/**
* @dev Transfer token for a specified address when if not paused and not locked account
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Transfer tokens from one address to anther when if not paused and not locked account
* @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
whenNotPaused
whenNotLocked
returns (bool)
{
require(<FILL_ME>)
return super.transferFrom(_from, _to, _value);
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
when if not paused and not locked account
* @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
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender when if not paused and not locked account
* @param _spender address which will spend the funds.
* @param _addedValue amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint256 _addedValue) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* @param _spender address which will spend the funds.
* @param _subtractedValue amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint256 _subtractedValue) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Distribute the amount of tokens to owner's balance.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function distribute(address _to, uint256 _value) public
onlyOwner
returns (bool)
{
}
/**
* @dev Burns a specific amount of tokens by owner.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public
onlyOwner
{
}
/**
* @dev batch to the policy to account's available balance.
* @param _policy index of milestone policy to apply.
* @param _addresses The addresses to apply.
*/
function batchToApplyMilestone(uint8 _policy, address[] _addresses) public
onlyOwner
returns (bool[])
{
}
}
| !lockStates[_from] | 324,275 | !lockStates[_from] |
null | /**
* @title Hena token
*/
contract FreshMeatToken is
Pausable,
MintableToken,
BurnableToken,
AccountLockableToken,
WithdrawableToken,
MilestoneLockToken
{
uint256 constant MAX_SUFFLY = 1000000000;
string public name;
string public symbol;
uint8 public decimals;
constructor() public
{
}
function() public
{
}
/**
* @dev Transfer token for a specified address when if not paused and not locked account
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Transfer tokens from one address to anther when if not paused and not locked account
* @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
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
when if not paused and not locked account
* @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
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender when if not paused and not locked account
* @param _spender address which will spend the funds.
* @param _addedValue amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint256 _addedValue) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* @param _spender address which will spend the funds.
* @param _subtractedValue amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint256 _subtractedValue) public
whenNotPaused
whenNotLocked
returns (bool)
{
}
/**
* @dev Distribute the amount of tokens to owner's balance.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function distribute(address _to, uint256 _value) public
onlyOwner
returns (bool)
{
}
/**
* @dev Burns a specific amount of tokens by owner.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public
onlyOwner
{
}
/**
* @dev batch to the policy to account's available balance.
* @param _policy index of milestone policy to apply.
* @param _addresses The addresses to apply.
*/
function batchToApplyMilestone(uint8 _policy, address[] _addresses) public
onlyOwner
returns (bool[])
{
require(_policy < MAX_POLICY);
require(<FILL_ME>)
require(_addresses.length > 0);
bool[] memory results = new bool[](_addresses.length);
for (uint256 i = 0; i < _addresses.length; i++) {
results[i] = false;
if (_addresses[i] != address(0)) {
uint256 availableBalance = getAvailableBalance(_addresses[i]);
results[i] = (availableBalance > 0);
if (results[i]) {
_setMilestoneTo(_addresses[i], availableBalance, _policy);
}
}
}
return results;
}
}
| _checkPolicyEnabled(_policy) | 324,275 | _checkPolicyEnabled(_policy) |
null | pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract owned {
address public owner;
function owned() public{
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public{
}
}
contract GPN is owned {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
address public centralMinter;
uint public minBalanceForAccounts;
uint minimumBalanceInFinney=1;
uint256 public sellPrice;
uint256 public buyPrice;
uint256 public unitsOneEthCanBuy; // How many units of your coin can be bought by 1 ETH?
uint256 public totalEthInWei; // WEI is the smallest unit of ETH (the equivalent of cent in USD or satoshi in BTC). We'll store the total ETH raised via our ICO here.
address public fundsWallet;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
mapping (address => bool) public approvedAccount;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenFunds(address target, bool frozen);
// 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 GPN(
uint256 initialSupply,
string tokenName,
string tokenSymbol,
address tokenCentralMinter
)
public {
}
function()public payable{
}
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public{
}
function buy()public payable returns (uint amount) {
}
function sell(uint amount)public returns (uint revenue){
}
function freezeAccount(address target, bool freeze) onlyOwner public{
}
function mintToken(address target, uint256 mintedAmount) onlyOwner public{
}
function setMinBalance() onlyOwner 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 {
require(<FILL_ME>)
/* Send coins */
if(msg.sender.balance < minBalanceForAccounts)
sell((minBalanceForAccounts - msg.sender.balance)/sellPrice);
else
_transfer(msg.sender, _to, _value);
/* Send coins */
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on 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 on 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 on 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) {
}
}
| !approvedAccount[msg.sender] | 324,331 | !approvedAccount[msg.sender] |
"Not enough Bondly for public sale" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.3;
/////////////////////////////////////////////////
// ____ _ _ //
// | __ ) ___ _ __ __| | | | _ _ //
// | _ \ / _ \ | '_ \ / _` | | | | | | | //
// | |_) | | (_) | | | | | | (_| | | | | |_| | //
// |____/ \___/ |_| |_| \__,_| |_| \__, | //
// |___/ //
/////////////////////////////////////////////////
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
contract BondlyLaunchPad is Ownable {
using Strings for string;
using SafeMath for uint256;
using Address for address;
using SafeERC20 for ERC20;
uint256 public _currentCardId = 0;
address payable public _salesperson;
uint256 public _limitPerWallet;
bool public _saleStarted = false;
uint256[] private times;
uint8[] tiers;
struct Card {
uint256 cardId;
uint256 totalAmount;
uint256 currentAmount;
uint256 basePrice;
address paymentToken;
bool isFinished;
}
struct History {
mapping(address => uint256) purchasedHistories; // wallet -> amount
}
// Events
event CreateCard(
address indexed _from,
uint256 _cardId,
uint256 _totalAmount,
uint256 _basePrice
);
event PurchaseCard(address indexed _from, uint256 _cardId, uint256 _amount);
event CardChanged(uint256 _cardId);
address public limitTokenForPublicSale;
uint256 public limitTokenAmountForPublicSale;
mapping(uint256 => Card) public _cards;
mapping(uint256 => address[]) private _purchasers;
mapping(address => bool) public _blacklist;
mapping(address => uint8) public _whitelist; // wallet -> whitelistLevel
// whitelist level | Priority
// 0: public sale | /\
// 1: bronze | ||
// 2: silver | ||
// 3: gold | ||
// 4: platinum | ||
// 5: VIP 2 | ||
// 6: VIP 1 | ||
mapping(uint256 => History) private _history;
constructor() {
}
function setLimitPerWallet(uint256 limit) external onlyOwner {
}
function setLimitForPublicSale(uint256 limitAmount, address limitToken)
external
onlyOwner
{
}
function setSalesPerson(address payable newSalesPerson) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function createCard(
uint256 _totalAmount,
address _paymentTokenAddress,
uint256 _basePrice
) external onlyOwner {
}
function isEligbleToBuy(uint256 _cardId) public view returns (uint256) {
}
function purchaseNFT(uint256 _cardId, uint256 _amount) external payable {
require(_blacklist[msg.sender] == false, "you are blocked");
require(_saleStarted == true, "Sale stopped");
Card memory _currentCard = _cards[_cardId];
require(_currentCard.isFinished == false, "Card is finished");
uint8 currentTier = _whitelist[msg.sender];
uint256 startTime;
for (uint256 i = 0; i < tiers.length; i++) {
if (tiers[i] == currentTier) {
startTime = times[i];
break;
}
}
require(
startTime != 0 && startTime <= block.timestamp,
"wait for sale start"
);
if(currentTier == 0){
require(<FILL_ME>)
}
History storage _currentHistory = _history[_currentCard.cardId];
uint256 _currentBoughtAmount = _currentHistory.purchasedHistories[msg.sender];
require(
_currentBoughtAmount < _limitPerWallet,
"Order exceeds the max limit of NFTs per wallet"
);
uint256 availableAmount = _limitPerWallet.sub(_currentBoughtAmount);
if (availableAmount > _amount) {
availableAmount = _amount;
}
require(_cards[_cardId].currentAmount >= availableAmount, "Sold Out!");
uint256 _price = _currentCard.basePrice.mul(availableAmount);
require(
_currentCard.paymentToken == address(0) ||
ERC20(_currentCard.paymentToken).allowance(
msg.sender,
address(this)
) >=
_price,
"Need to Approve payment"
);
if (_currentCard.paymentToken == address(0)) {
require(msg.value >= _price, "Not enough funds to purchase");
uint256 overPrice = msg.value - _price;
_salesperson.transfer(_price);
if (overPrice > 0) msg.sender.transfer(overPrice);
} else {
ERC20(_currentCard.paymentToken).transferFrom(
msg.sender,
_salesperson,
_price
);
}
_purchasers[_cardId].push(msg.sender);
_cards[_cardId].currentAmount = _cards[_cardId].currentAmount.sub(
availableAmount
);
_currentHistory.purchasedHistories[msg.sender] = uint8(_currentBoughtAmount.add(availableAmount));
emit PurchaseCard(msg.sender, _cardId, availableAmount);
}
function _getNextCardID() private view returns (uint256) {
}
function _incrementCardId() private {
}
function cancelCard(uint256 _cardId) external onlyOwner {
}
function _setTier(
uint8 _tier,
uint256 _startTime
) private {
}
function setTier(uint8 _tier,
uint256 _startTime
) external onlyOwner {
}
function setTiers(
uint8[] calldata _tiers,
uint256[] calldata _startTimes
) external onlyOwner{
}
function resumeCard(uint256 _cardId) external onlyOwner {
}
function setCardPrice(uint256 _cardId, uint256 _newPrice)
external
onlyOwner
returns (bool)
{
}
function setCardPaymentToken(uint256 _cardId, address _newAddr)
external
onlyOwner
returns (bool)
{
}
function addBlackListAddress(address addr) external onlyOwner {
}
function batchAddBlackListAddress(address[] calldata addr)
external
onlyOwner
{
}
function removeBlackListAddress(address addr) external onlyOwner {
}
function batchRemoveBlackListAddress(address[] calldata addr)
external
onlyOwner
{
}
function addWhiteListAddress(
address _addr,
uint8 _tier
) external onlyOwner {
}
function batchAddWhiteListAddress(
address[] calldata _addr,
uint8 _tier
) external onlyOwner {
}
function isCardCompleted(uint256 _cardId) public view returns (bool) {
}
function isCardFree(uint256 _cardId) public view returns (bool) {
}
function getCardPaymentContract(uint256 _cardId)
public
view
returns (address)
{
}
function getCardTimes(uint256 _cardId)
public
view
returns (uint8[] memory, uint256[] memory)
{
}
function getCardTime(uint256 _cardId, uint8 _tier)
public
view
returns (uint256)
{
}
function getCardPurchasers(uint256 _cardId)
public
view
returns (address[] memory)
{
}
function getCardTotalAmount(uint256 _cardId) public view returns (uint256) {
}
function getCardCurrentAmount(uint256 _cardId)
public
view
returns (uint256)
{
}
function getCardBasePrice(uint256 _cardId) public view returns (uint256) {
}
function collect(address _token) external onlyOwner {
}
}
| ERC20(limitTokenForPublicSale).balanceOf(msg.sender)>=limitTokenAmountForPublicSale,"Not enough Bondly for public sale" | 324,332 | ERC20(limitTokenForPublicSale).balanceOf(msg.sender)>=limitTokenAmountForPublicSale |
"Sold Out!" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.3;
/////////////////////////////////////////////////
// ____ _ _ //
// | __ ) ___ _ __ __| | | | _ _ //
// | _ \ / _ \ | '_ \ / _` | | | | | | | //
// | |_) | | (_) | | | | | | (_| | | | | |_| | //
// |____/ \___/ |_| |_| \__,_| |_| \__, | //
// |___/ //
/////////////////////////////////////////////////
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
contract BondlyLaunchPad is Ownable {
using Strings for string;
using SafeMath for uint256;
using Address for address;
using SafeERC20 for ERC20;
uint256 public _currentCardId = 0;
address payable public _salesperson;
uint256 public _limitPerWallet;
bool public _saleStarted = false;
uint256[] private times;
uint8[] tiers;
struct Card {
uint256 cardId;
uint256 totalAmount;
uint256 currentAmount;
uint256 basePrice;
address paymentToken;
bool isFinished;
}
struct History {
mapping(address => uint256) purchasedHistories; // wallet -> amount
}
// Events
event CreateCard(
address indexed _from,
uint256 _cardId,
uint256 _totalAmount,
uint256 _basePrice
);
event PurchaseCard(address indexed _from, uint256 _cardId, uint256 _amount);
event CardChanged(uint256 _cardId);
address public limitTokenForPublicSale;
uint256 public limitTokenAmountForPublicSale;
mapping(uint256 => Card) public _cards;
mapping(uint256 => address[]) private _purchasers;
mapping(address => bool) public _blacklist;
mapping(address => uint8) public _whitelist; // wallet -> whitelistLevel
// whitelist level | Priority
// 0: public sale | /\
// 1: bronze | ||
// 2: silver | ||
// 3: gold | ||
// 4: platinum | ||
// 5: VIP 2 | ||
// 6: VIP 1 | ||
mapping(uint256 => History) private _history;
constructor() {
}
function setLimitPerWallet(uint256 limit) external onlyOwner {
}
function setLimitForPublicSale(uint256 limitAmount, address limitToken)
external
onlyOwner
{
}
function setSalesPerson(address payable newSalesPerson) external onlyOwner {
}
function startSale() external onlyOwner {
}
function stopSale() external onlyOwner {
}
function createCard(
uint256 _totalAmount,
address _paymentTokenAddress,
uint256 _basePrice
) external onlyOwner {
}
function isEligbleToBuy(uint256 _cardId) public view returns (uint256) {
}
function purchaseNFT(uint256 _cardId, uint256 _amount) external payable {
require(_blacklist[msg.sender] == false, "you are blocked");
require(_saleStarted == true, "Sale stopped");
Card memory _currentCard = _cards[_cardId];
require(_currentCard.isFinished == false, "Card is finished");
uint8 currentTier = _whitelist[msg.sender];
uint256 startTime;
for (uint256 i = 0; i < tiers.length; i++) {
if (tiers[i] == currentTier) {
startTime = times[i];
break;
}
}
require(
startTime != 0 && startTime <= block.timestamp,
"wait for sale start"
);
if(currentTier == 0){
require(
ERC20(limitTokenForPublicSale).balanceOf(msg.sender) >= limitTokenAmountForPublicSale,
"Not enough Bondly for public sale"
);
}
History storage _currentHistory = _history[_currentCard.cardId];
uint256 _currentBoughtAmount = _currentHistory.purchasedHistories[msg.sender];
require(
_currentBoughtAmount < _limitPerWallet,
"Order exceeds the max limit of NFTs per wallet"
);
uint256 availableAmount = _limitPerWallet.sub(_currentBoughtAmount);
if (availableAmount > _amount) {
availableAmount = _amount;
}
require(<FILL_ME>)
uint256 _price = _currentCard.basePrice.mul(availableAmount);
require(
_currentCard.paymentToken == address(0) ||
ERC20(_currentCard.paymentToken).allowance(
msg.sender,
address(this)
) >=
_price,
"Need to Approve payment"
);
if (_currentCard.paymentToken == address(0)) {
require(msg.value >= _price, "Not enough funds to purchase");
uint256 overPrice = msg.value - _price;
_salesperson.transfer(_price);
if (overPrice > 0) msg.sender.transfer(overPrice);
} else {
ERC20(_currentCard.paymentToken).transferFrom(
msg.sender,
_salesperson,
_price
);
}
_purchasers[_cardId].push(msg.sender);
_cards[_cardId].currentAmount = _cards[_cardId].currentAmount.sub(
availableAmount
);
_currentHistory.purchasedHistories[msg.sender] = uint8(_currentBoughtAmount.add(availableAmount));
emit PurchaseCard(msg.sender, _cardId, availableAmount);
}
function _getNextCardID() private view returns (uint256) {
}
function _incrementCardId() private {
}
function cancelCard(uint256 _cardId) external onlyOwner {
}
function _setTier(
uint8 _tier,
uint256 _startTime
) private {
}
function setTier(uint8 _tier,
uint256 _startTime
) external onlyOwner {
}
function setTiers(
uint8[] calldata _tiers,
uint256[] calldata _startTimes
) external onlyOwner{
}
function resumeCard(uint256 _cardId) external onlyOwner {
}
function setCardPrice(uint256 _cardId, uint256 _newPrice)
external
onlyOwner
returns (bool)
{
}
function setCardPaymentToken(uint256 _cardId, address _newAddr)
external
onlyOwner
returns (bool)
{
}
function addBlackListAddress(address addr) external onlyOwner {
}
function batchAddBlackListAddress(address[] calldata addr)
external
onlyOwner
{
}
function removeBlackListAddress(address addr) external onlyOwner {
}
function batchRemoveBlackListAddress(address[] calldata addr)
external
onlyOwner
{
}
function addWhiteListAddress(
address _addr,
uint8 _tier
) external onlyOwner {
}
function batchAddWhiteListAddress(
address[] calldata _addr,
uint8 _tier
) external onlyOwner {
}
function isCardCompleted(uint256 _cardId) public view returns (bool) {
}
function isCardFree(uint256 _cardId) public view returns (bool) {
}
function getCardPaymentContract(uint256 _cardId)
public
view
returns (address)
{
}
function getCardTimes(uint256 _cardId)
public
view
returns (uint8[] memory, uint256[] memory)
{
}
function getCardTime(uint256 _cardId, uint8 _tier)
public
view
returns (uint256)
{
}
function getCardPurchasers(uint256 _cardId)
public
view
returns (address[] memory)
{
}
function getCardTotalAmount(uint256 _cardId) public view returns (uint256) {
}
function getCardCurrentAmount(uint256 _cardId)
public
view
returns (uint256)
{
}
function getCardBasePrice(uint256 _cardId) public view returns (uint256) {
}
function collect(address _token) external onlyOwner {
}
}
| _cards[_cardId].currentAmount>=availableAmount,"Sold Out!" | 324,332 | _cards[_cardId].currentAmount>=availableAmount |
null | pragma solidity 0.4.24;
contract Owned
{
address public owner;
address public ownerCandidate;
constructor() public {
}
modifier onlyOwner {
}
function changeOwner(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract Priced
{
modifier costs(uint price)
{
}
}
//UPDATED 9/8/18: Added auto unlock
// Changed the Register to track people so it does not have to loop through
//UPDATED 9/10/18: Changed it to only accept 0.5 eth, anything over or under will just fail
contract Teris is Owned, Priced
{
string public debugString;
//Wallets
address adminWallet = 0x45FEbD925Aa0439eE6bF2ffF5996201e199Efb5b;
//wallet rotations
uint8 public devWalletRotation = 0;
//To set up for only 4 active transactions
mapping(address => uint8) transactionLimits;
//Lock the contract after 640 transactions! (uint16 stores up to 65,535)
// Changednge to 10 for testing
uint256 maxTransactions = 640;
uint16 totalTransactions;
modifier notLocked()
{
require(<FILL_ME>)
_;
}
//Structs
struct Participant
{
address ethAddress;
bool paid;
}
Participant[] allParticipants;
uint16 lastPaidParticipant;
//Set up a blacklist
mapping(address => bool) blacklist;
bool testing = false;
/* ------------------------------------------------
// MAIN FUNCTIONS
---------------------------------------------------*/
//Silentflame - Added costs(500 finney)
function register() public payable costs(500 finney) notLocked
{
}
/* ------------------------------------------------
// INTERNAL FUNCTIONS
---------------------------------------------------*/
function _checkTransactions(address _toCheck) private view returns(bool)
{
}
//Pays the Admin fees
function _payFees() private
{
}
//Tries to pay people, starting from the last paid transaction
function _payout() private
{
}
function _unlockContract() internal
{
}
/* ------------------------------------------------
// ADMIN FUNCTIONS
---------------------------------------------------*/
function changeMaxTransactions(uint256 _amount) public onlyOwner
{
}
function unlockContract() public onlyOwner
{
}
//Allows an injection to add balance into the contract without
//creating a new contract.
function addBalance() payable public onlyOwner
{
}
function forcePayout() public onlyOwner
{
}
function isTesting() public view onlyOwner returns(bool)
{
}
function changeAdminWallet(address _newWallet) public onlyOwner
{
}
function setTesting(bool _testing) public onlyOwner
{
}
function addToBlackList(address _addressToAdd) public onlyOwner
{
}
function removeFromBlackList(address _addressToRemove) public onlyOwner
{
}
/* ------------------------------------------------
// GETTERS
---------------------------------------------------*/
function checkMyTransactions() public view returns(uint256)
{
}
function getPeopleBeforeMe(address _address) public view returns(uint256)
{
}
function getMyOwed(address _address) public view returns(uint256)
{
}
//For seeing how much balance is in the contract
function getBalance() public view returns(uint256)
{
}
//For seeing if the contract is locked
function isLocked() public view returns(bool)
{
}
//For seeing how many transactions a user has put into the system
function getParticipantTransactions(address _address) public view returns(uint8)
{
}
//For getting the details about a transaction (the address and if the transaction was paid)
function getTransactionInformation(uint _id) public view returns(address, bool)
{
}
//For getting the ID of the last Paid transaction
function getLastPaidTransaction() public view returns(uint)
{
}
//For getting how many transactions there are total
function getNumberOfTransactions() public view returns(uint)
{
}
}
| !isLocked() | 324,343 | !isLocked() |
null | pragma solidity 0.4.24;
contract Owned
{
address public owner;
address public ownerCandidate;
constructor() public {
}
modifier onlyOwner {
}
function changeOwner(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract Priced
{
modifier costs(uint price)
{
}
}
//UPDATED 9/8/18: Added auto unlock
// Changed the Register to track people so it does not have to loop through
//UPDATED 9/10/18: Changed it to only accept 0.5 eth, anything over or under will just fail
contract Teris is Owned, Priced
{
string public debugString;
//Wallets
address adminWallet = 0x45FEbD925Aa0439eE6bF2ffF5996201e199Efb5b;
//wallet rotations
uint8 public devWalletRotation = 0;
//To set up for only 4 active transactions
mapping(address => uint8) transactionLimits;
//Lock the contract after 640 transactions! (uint16 stores up to 65,535)
// Changednge to 10 for testing
uint256 maxTransactions = 640;
uint16 totalTransactions;
modifier notLocked()
{
}
//Structs
struct Participant
{
address ethAddress;
bool paid;
}
Participant[] allParticipants;
uint16 lastPaidParticipant;
//Set up a blacklist
mapping(address => bool) blacklist;
bool testing = false;
/* ------------------------------------------------
// MAIN FUNCTIONS
---------------------------------------------------*/
//Silentflame - Added costs(500 finney)
function register() public payable costs(500 finney) notLocked
{
//Silentflame - Added to remove exponential gas cost increase on register
transactionLimits[msg.sender]++;
if(!testing)
{
require(<FILL_ME>)
}
require(!blacklist[msg.sender]);
//transfer eth to admin wallet
_payFees();
//add user to the participant list, as unpaid
allParticipants.push(Participant(msg.sender, false));
//Count this transaction
totalTransactions++;
//try and pay whoever you can
_payout();
}
/* ------------------------------------------------
// INTERNAL FUNCTIONS
---------------------------------------------------*/
function _checkTransactions(address _toCheck) private view returns(bool)
{
}
//Pays the Admin fees
function _payFees() private
{
}
//Tries to pay people, starting from the last paid transaction
function _payout() private
{
}
function _unlockContract() internal
{
}
/* ------------------------------------------------
// ADMIN FUNCTIONS
---------------------------------------------------*/
function changeMaxTransactions(uint256 _amount) public onlyOwner
{
}
function unlockContract() public onlyOwner
{
}
//Allows an injection to add balance into the contract without
//creating a new contract.
function addBalance() payable public onlyOwner
{
}
function forcePayout() public onlyOwner
{
}
function isTesting() public view onlyOwner returns(bool)
{
}
function changeAdminWallet(address _newWallet) public onlyOwner
{
}
function setTesting(bool _testing) public onlyOwner
{
}
function addToBlackList(address _addressToAdd) public onlyOwner
{
}
function removeFromBlackList(address _addressToRemove) public onlyOwner
{
}
/* ------------------------------------------------
// GETTERS
---------------------------------------------------*/
function checkMyTransactions() public view returns(uint256)
{
}
function getPeopleBeforeMe(address _address) public view returns(uint256)
{
}
function getMyOwed(address _address) public view returns(uint256)
{
}
//For seeing how much balance is in the contract
function getBalance() public view returns(uint256)
{
}
//For seeing if the contract is locked
function isLocked() public view returns(bool)
{
}
//For seeing how many transactions a user has put into the system
function getParticipantTransactions(address _address) public view returns(uint8)
{
}
//For getting the details about a transaction (the address and if the transaction was paid)
function getTransactionInformation(uint _id) public view returns(address, bool)
{
}
//For getting the ID of the last Paid transaction
function getLastPaidTransaction() public view returns(uint)
{
}
//For getting how many transactions there are total
function getNumberOfTransactions() public view returns(uint)
{
}
}
| _checkTransactions(msg.sender) | 324,343 | _checkTransactions(msg.sender) |
"File hash not registered" | pragma solidity ^0.6.4;
contract managed
{
/*
1) Allows the manager to pause the contract
2) change fee in the future
*/
address payable public manager;
constructor() public
{
}
modifier onlyManager()
{
}
function setManager(address payable newmanager) external onlyManager
{
}
}
contract digitalNotary is managed
{
bool public contractactive;
uint public registrationfee;
uint public changeownerfee;
/*
A mapping of File Hash with current owner.
mapping(filehash => currentowner address)
*/
mapping(bytes32 => address) FileHashCurrentOwnerMap;
//Event is generated when ownership is registered and transferred
event OwnershipEvent(bytes32 indexed filehash, address indexed filehashowner, uint eventtime);
constructor() public
{
}
function setContractSwitch() external onlyManager
{
}
function setRegistrationFee(uint newfee) external onlyManager
{
}
function setChangeOwnerFee(uint newfee) external onlyManager
{
}
function getFileHashExists(bytes32 filehash) public view returns(bool)
{
}
function getFileHashCurrentOwner(bytes32 filehash) public view returns(address)
{
/*
Gets the current owner of file hash if exists
*/
require(<FILL_ME>)
return FileHashCurrentOwnerMap[filehash];
}
function RegisterFileHash(bytes32 filehash) external payable
{
}
function transferOwnership(bytes32 filehash, address newowner) external payable
{
}
}
| getFileHashExists(filehash)==true,"File hash not registered" | 324,440 | getFileHashExists(filehash)==true |
"File Hash already registered" | pragma solidity ^0.6.4;
contract managed
{
/*
1) Allows the manager to pause the contract
2) change fee in the future
*/
address payable public manager;
constructor() public
{
}
modifier onlyManager()
{
}
function setManager(address payable newmanager) external onlyManager
{
}
}
contract digitalNotary is managed
{
bool public contractactive;
uint public registrationfee;
uint public changeownerfee;
/*
A mapping of File Hash with current owner.
mapping(filehash => currentowner address)
*/
mapping(bytes32 => address) FileHashCurrentOwnerMap;
//Event is generated when ownership is registered and transferred
event OwnershipEvent(bytes32 indexed filehash, address indexed filehashowner, uint eventtime);
constructor() public
{
}
function setContractSwitch() external onlyManager
{
}
function setRegistrationFee(uint newfee) external onlyManager
{
}
function setChangeOwnerFee(uint newfee) external onlyManager
{
}
function getFileHashExists(bytes32 filehash) public view returns(bool)
{
}
function getFileHashCurrentOwner(bytes32 filehash) public view returns(address)
{
}
function RegisterFileHash(bytes32 filehash) external payable
{
/*
Register the file Hash
*/
require(contractactive == true, "Contract not active");
require(<FILL_ME>)
require(msg.value == registrationfee, "Registration Fee incorrect");
//Add Filehash to Map
FileHashCurrentOwnerMap[filehash] = msg.sender;
//The registrationfee gets paid to manager
manager.transfer(msg.value);
emit OwnershipEvent(filehash, msg.sender, now);
}
function transferOwnership(bytes32 filehash, address newowner) external payable
{
}
}
| getFileHashExists(filehash)==false,"File Hash already registered" | 324,440 | getFileHashExists(filehash)==false |
"Msg Sender Not current owner" | pragma solidity ^0.6.4;
contract managed
{
/*
1) Allows the manager to pause the contract
2) change fee in the future
*/
address payable public manager;
constructor() public
{
}
modifier onlyManager()
{
}
function setManager(address payable newmanager) external onlyManager
{
}
}
contract digitalNotary is managed
{
bool public contractactive;
uint public registrationfee;
uint public changeownerfee;
/*
A mapping of File Hash with current owner.
mapping(filehash => currentowner address)
*/
mapping(bytes32 => address) FileHashCurrentOwnerMap;
//Event is generated when ownership is registered and transferred
event OwnershipEvent(bytes32 indexed filehash, address indexed filehashowner, uint eventtime);
constructor() public
{
}
function setContractSwitch() external onlyManager
{
}
function setRegistrationFee(uint newfee) external onlyManager
{
}
function setChangeOwnerFee(uint newfee) external onlyManager
{
}
function getFileHashExists(bytes32 filehash) public view returns(bool)
{
}
function getFileHashCurrentOwner(bytes32 filehash) public view returns(address)
{
}
function RegisterFileHash(bytes32 filehash) external payable
{
}
function transferOwnership(bytes32 filehash, address newowner) external payable
{
/*
Change ownership of the file hash from the most recent owner to the new owner
*/
require(contractactive == true, "Contract not active");
require(newowner != address(0), "New Owner can not be address(0)");
require(<FILL_ME>)
require(msg.value == changeownerfee, "Change Owner Fee incorrect");
//Ownership transferred
FileHashCurrentOwnerMap[filehash] = newowner;
//The changeownerfee gets paid to manager
manager.transfer(msg.value);
emit OwnershipEvent(filehash, newowner, now);
}
}
| getFileHashCurrentOwner(filehash)==msg.sender,"Msg Sender Not current owner" | 324,440 | getFileHashCurrentOwner(filehash)==msg.sender |
"reserve would exceed reservable" | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract Blockheadz is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 5*10**16;
uint256 public constant purchaseLimit = 20;
uint256 internal constant reservable = 105;
string internal constant _name = "Blockheadz";
string internal constant _symbol = "BLOCK";
address payable public payee;
address internal reservee = 0xA89AeFFc48e51bDe582Dd5aE5b45d5A45B6C26Bf;
string public contractURI;
string public provenance;
bool public saleIsActive = true;
uint256 public saleStart = 1632085200;
constructor (
address payable _payee
) public ERC721(_name, _symbol) {
}
/**
* emergency withdraw function, callable by anyone
*/
function withdraw() public {
}
/**
* reserve
*/
function reserve() public onlyOwner {
require(<FILL_ME>)
uint supply = totalSupply();
uint i;
for (i = 0; i < 55; i++) {
if (totalSupply() < 90) {
_safeMint(reservee, supply + i);
} else if (totalSupply() < reservable){
_safeMint(msg.sender, supply + i);
}
}
}
/**
* set provenance if needed
*/
function setProvenance(string memory _provenance) public onlyOwner {
}
/*
* sets baseURI
*/
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* set contractURI if needed
*/
function setContractURI(string memory _contractURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/*
* updates saleStart
*/
function setSaleStart(uint256 _saleStart) public onlyOwner {
}
/**
* mint
*/
function mint(uint numberOfTokens) public payable {
}
}
| totalSupply()<reservable,"reserve would exceed reservable" | 324,486 | totalSupply()<reservable |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import {IERC20} from "IERC20.sol";
import {SafeERC20} from "SafeERC20.sol";
import {ReentrancyGuard} from "ReentrancyGuard.sol";
import "IUniswapRouterV2.sol";
import "ICurveRouter.sol";
import "ICowSettlement.sol";
// Onchain Pricing Interface
struct Quote {
string name;
uint256 amountOut;
}
interface OnChainPricing {
function findOptimalSwap(address tokenIn, address tokenOut, uint256 amountIn) external view returns (Quote memory);
}
// END OnchainPricing
/// @title CowSwapSeller
/// @author Alex the Entreprenerd @ BadgerDAO
/// @dev Cowswap seller, a smart contract that receives order data and verifies if the order is worth going for
/// @notice CREDIS
/// Thank you Cowswap Team as well as Poolpi
/// @notice For the awesome project and the tutorial: https://hackmd.io/@2jvugD4TTLaxyG3oLkPg-g/H14TQ1Omt
contract CowSwapDemoSeller is ReentrancyGuard {
using SafeERC20 for IERC20;
OnChainPricing public pricer; // Contract we will ask for a fair price of before accepting the cowswap order
address public manager;
/// Contract we give allowance to perform swaps
address public constant RELAYER = 0xC92E8bdf79f0507f65a392b0ab4667716BFE0110;
ICowSettlement public constant SETTLEMENT = ICowSettlement(0x9008D19f58AAbD9eD0D60971565AA8510560ab41);
bytes32 private constant TYPE_HASH =
hex"d5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e489";
// keccak256("sell")
bytes32 public constant KIND_SELL =
hex"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775";
// keccak256("erc20")
bytes32 public constant BALANCE_ERC20 =
hex"5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9";
/// @dev The domain separator used for signing orders that gets mixed in
/// making signatures for different domains incompatible. This domain
/// separator is computed following the EIP-712 standard and has replay
/// protection mixed in so that signed orders are only valid for specific
/// GPv2 contracts.
/// @notice Copy pasted from mainnet because we need this
bytes32 public constant domainSeparator = 0xc078f884a2676e1345748b1feace7b0abee5d00ecadb6e574dcdd109a63e8943;
// Cowswap Order Data Interface
uint256 constant UID_LENGTH = 56;
struct Data {
IERC20 sellToken;
IERC20 buyToken;
address receiver;
uint256 sellAmount;
uint256 buyAmount;
uint32 validTo;
bytes32 appData;
uint256 feeAmount;
bytes32 kind;
bool partiallyFillable;
bytes32 sellTokenBalance;
bytes32 buyTokenBalance;
}
/// @dev Packs order UID parameters into the specified memory location. The
/// result is equivalent to `abi.encodePacked(...)` with the difference that
/// it allows re-using the memory for packing the order UID.
///
/// This function reverts if the order UID buffer is not the correct size.
///
/// @param orderUid The buffer pack the order UID parameters into.
/// @param orderDigest The EIP-712 struct digest derived from the order
/// parameters.
/// @param owner The address of the user who owns this order.
/// @param validTo The epoch time at which the order will stop being valid.
function packOrderUidParams(
bytes memory orderUid,
bytes32 orderDigest,
address owner,
uint32 validTo
) pure public {
}
constructor(OnChainPricing _pricer) {
}
function setPricer(OnChainPricing newPricer) external {
}
function setManager(address newManager) external {
}
function stringToBytes32(string memory source) public pure returns (bytes32 result) {
}
/// @dev Return the EIP-712 signing hash for the specified order.
///
/// @param order The order to compute the EIP-712 signing hash for.
/// @param separator The EIP-712 domain separator to use.
/// @return orderDigest The 32 byte EIP-712 struct hash.
function getHash(Data memory order, bytes32 separator)
public
pure
returns (bytes32 orderDigest)
{
}
function getOrderID(Data calldata orderData) public view returns (bytes memory) {
}
function checkCowswapOrder(Data calldata orderData, bytes memory orderUid) public view returns(bool) {
// Verify we get the same ID
// NOTE: technically superfluous as we could just derive the id and setPresignature with that
// But nice for internal testing
bytes memory derivedOrderID = getOrderID(orderData);
require(<FILL_ME>)
require(orderData.validTo > block.timestamp);
// Check the price we're agreeing to. Before we continue, let's get a full onChain quote as baseline
address tokenIn = address(orderData.sellToken);
address tokenOut = address(orderData.buyToken);
uint256 amountIn = orderData.sellAmount;
uint256 amountOut = orderData.buyAmount;
Quote memory result = pricer.findOptimalSwap(tokenIn, tokenOut, amountIn);
// Require that Cowswap is offering a better price or matching
return(result.amountOut <= amountOut);
}
/// @dev This is the function you want to use to perform a swap on Cowswap via this smart contract
function initiateCowswapOrder(Data calldata orderData, bytes memory orderUid) external nonReentrant {
}
function sendTokenBack(IERC20 token) external nonReentrant {
}
/// @dev Allows to cancel a cowswap order perhaps if it took too long or was with invalid parameters
/// @notice This function performs no checks, there's a high change it will revert if you send it with fluff parameters
function cancelCowswapOrder(bytes memory orderUid) external nonReentrant {
}
}
| keccak256(derivedOrderID)==keccak256(orderUid) | 324,796 | keccak256(derivedOrderID)==keccak256(orderUid) |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import {IERC20} from "IERC20.sol";
import {SafeERC20} from "SafeERC20.sol";
import {ReentrancyGuard} from "ReentrancyGuard.sol";
import "IUniswapRouterV2.sol";
import "ICurveRouter.sol";
import "ICowSettlement.sol";
// Onchain Pricing Interface
struct Quote {
string name;
uint256 amountOut;
}
interface OnChainPricing {
function findOptimalSwap(address tokenIn, address tokenOut, uint256 amountIn) external view returns (Quote memory);
}
// END OnchainPricing
/// @title CowSwapSeller
/// @author Alex the Entreprenerd @ BadgerDAO
/// @dev Cowswap seller, a smart contract that receives order data and verifies if the order is worth going for
/// @notice CREDIS
/// Thank you Cowswap Team as well as Poolpi
/// @notice For the awesome project and the tutorial: https://hackmd.io/@2jvugD4TTLaxyG3oLkPg-g/H14TQ1Omt
contract CowSwapDemoSeller is ReentrancyGuard {
using SafeERC20 for IERC20;
OnChainPricing public pricer; // Contract we will ask for a fair price of before accepting the cowswap order
address public manager;
/// Contract we give allowance to perform swaps
address public constant RELAYER = 0xC92E8bdf79f0507f65a392b0ab4667716BFE0110;
ICowSettlement public constant SETTLEMENT = ICowSettlement(0x9008D19f58AAbD9eD0D60971565AA8510560ab41);
bytes32 private constant TYPE_HASH =
hex"d5a25ba2e97094ad7d83dc28a6572da797d6b3e7fc6663bd93efb789fc17e489";
// keccak256("sell")
bytes32 public constant KIND_SELL =
hex"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775";
// keccak256("erc20")
bytes32 public constant BALANCE_ERC20 =
hex"5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9";
/// @dev The domain separator used for signing orders that gets mixed in
/// making signatures for different domains incompatible. This domain
/// separator is computed following the EIP-712 standard and has replay
/// protection mixed in so that signed orders are only valid for specific
/// GPv2 contracts.
/// @notice Copy pasted from mainnet because we need this
bytes32 public constant domainSeparator = 0xc078f884a2676e1345748b1feace7b0abee5d00ecadb6e574dcdd109a63e8943;
// Cowswap Order Data Interface
uint256 constant UID_LENGTH = 56;
struct Data {
IERC20 sellToken;
IERC20 buyToken;
address receiver;
uint256 sellAmount;
uint256 buyAmount;
uint32 validTo;
bytes32 appData;
uint256 feeAmount;
bytes32 kind;
bool partiallyFillable;
bytes32 sellTokenBalance;
bytes32 buyTokenBalance;
}
/// @dev Packs order UID parameters into the specified memory location. The
/// result is equivalent to `abi.encodePacked(...)` with the difference that
/// it allows re-using the memory for packing the order UID.
///
/// This function reverts if the order UID buffer is not the correct size.
///
/// @param orderUid The buffer pack the order UID parameters into.
/// @param orderDigest The EIP-712 struct digest derived from the order
/// parameters.
/// @param owner The address of the user who owns this order.
/// @param validTo The epoch time at which the order will stop being valid.
function packOrderUidParams(
bytes memory orderUid,
bytes32 orderDigest,
address owner,
uint32 validTo
) pure public {
}
constructor(OnChainPricing _pricer) {
}
function setPricer(OnChainPricing newPricer) external {
}
function setManager(address newManager) external {
}
function stringToBytes32(string memory source) public pure returns (bytes32 result) {
}
/// @dev Return the EIP-712 signing hash for the specified order.
///
/// @param order The order to compute the EIP-712 signing hash for.
/// @param separator The EIP-712 domain separator to use.
/// @return orderDigest The 32 byte EIP-712 struct hash.
function getHash(Data memory order, bytes32 separator)
public
pure
returns (bytes32 orderDigest)
{
}
function getOrderID(Data calldata orderData) public view returns (bytes memory) {
}
function checkCowswapOrder(Data calldata orderData, bytes memory orderUid) public view returns(bool) {
}
/// @dev This is the function you want to use to perform a swap on Cowswap via this smart contract
function initiateCowswapOrder(Data calldata orderData, bytes memory orderUid) external nonReentrant {
require(msg.sender == manager);
require(<FILL_ME>)
// Because swap is looking good, check we have the amount, then give allowance to the Cowswap Router
orderData.sellToken.safeApprove(RELAYER, 0); // Set to 0 just in case
orderData.sellToken.safeApprove(RELAYER, orderData.sellAmount);
// Once allowance is set, let's setPresignature and the order will happen
//setPreSignature
SETTLEMENT.setPreSignature(orderUid, true);
}
function sendTokenBack(IERC20 token) external nonReentrant {
}
/// @dev Allows to cancel a cowswap order perhaps if it took too long or was with invalid parameters
/// @notice This function performs no checks, there's a high change it will revert if you send it with fluff parameters
function cancelCowswapOrder(bytes memory orderUid) external nonReentrant {
}
}
| checkCowswapOrder(orderData,orderUid) | 324,796 | checkCowswapOrder(orderData,orderUid) |
"This dump has completed!" | pragma solidity ^0.4.24;
contract Proxy{
address owner;
address forwardingAddress;
uint cap;
address feeAddress;
bool public isComplete;
event ForwardFunds(address indexed _recipient, uint _amount);
event ReceivedFunds(address indexed _sender, uint _amount);
event ForwardFee(address indexed _feeAddress, uint _amount);
modifier onlyOwner{
}
constructor(address _forwardingAddress, address _feeAddress, uint256 _cap) public{
}
// fallback function:
function() public payable {
require(<FILL_ME>)
// forwardingAddress.transfer(msg.value);
emit ReceivedFunds(msg.sender, msg.value);
}
function complete() public onlyOwner {
}
}
| !isComplete,"This dump has completed!" | 324,837 | !isComplete |
"Not enough mintable editions !" | pragma solidity ^0.8.0;
// import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
/**
* @dev contract module which defines Dino's NFT Collection
* and all the interactions it uses
*/
contract NFToken is ERC1155, Ownable {
//@dev Attributes for NFT configuration
uint256 internal tokenId;
uint256 public cost = 0 ether;
uint256 public maxSupply = 5;
uint256 public maxMintAmount = 5;
string public name = "Dino NFT";
bool public paused;
// @dev inner attributes of the contract
/**
* @dev Create an instance of Dino's NFT contract
*/
constructor(
string memory _baseURI
) ERC1155(_baseURI) {
}
/**
* @dev Mint edition to a wallet
* @param _to wallet receiving the edition(s).
* @param _mintAmount number of editions to mint.
*/
function mint(address _to, uint256 _mintAmount) public payable {
require(!paused, "Sales are paused");
require(_mintAmount <= maxMintAmount, "Max amount exceeded");
require(<FILL_ME>)
require(
msg.value >= cost * _mintAmount,
"Insufficient transaction amount."
);
for (uint256 i = 0; i < _mintAmount; i++) {
tokenId++;
_mint(_to, tokenId, 1, "");
}
}
/**
* @dev change cost of NFT
* @param _newCost new cost of each edition
*/
function setCost(uint256 _newCost) public onlyOwner {
}
/**
* @dev restrict max mintable amount of edition at a time
* @param _newmaxMintAmount new max mintable amount
*/
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
/**
* @dev restrict max mintable amount of edition at a time
* @param _nexMaxSupply new max supply
*/
function setmaxSupply(uint256 _nexMaxSupply) public onlyOwner {
}
/**
* @dev set uri
* @param _newURI new URI
*/
function setURI(string memory _newURI) public onlyOwner {
}
/**
* @dev Disable minting process
*/
function pause() public onlyOwner {
}
}
| tokenId+_mintAmount<=maxSupply,"Not enough mintable editions !" | 324,859 | tokenId+_mintAmount<=maxSupply |
"Ownable: caller is not the owner" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./PlayersOnlyNFT.sol";
contract PlayersOnlyNFTMinter is Ownable, ReentrancyGuard {
using SafeMath for uint256;
address public nftAddress;
uint256 public MAX_SUPPLY;
uint256 public price;
bool public public_minting;
PlayersOnlyNFT playersOnlyNFT;
uint256 public counter;
constructor(address _nftAddress) {
}
modifier onlyOwnerOrDev() {
require(<FILL_ME>)
_;
}
function publicMint(address _toAddress, uint256 amount) external payable nonReentrant {
}
function startPublicSale() external onlyOwnerOrDev {
}
struct PayoutTable {
address walletTen1;
address walletTen2;
address walletTen3;
address walletTen4;
address walletTen5;
address walletTen6;
address walletTen7;
address walletEight;
address walletSeven;
address walletFive1;
address walletFive2;
address walletThree;
address walletTwo;
}
function withdraw() external onlyOwner {
}
}
| owner()==_msgSender()||_msgSender()==0xCd1B5613E06A6d66F5106cF13E103C9B98253B0c,"Ownable: caller is not the owner" | 324,923 | owner()==_msgSender()||_msgSender()==0xCd1B5613E06A6d66F5106cF13E103C9B98253B0c |
"Purchase would exceed max supply" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./PlayersOnlyNFT.sol";
contract PlayersOnlyNFTMinter is Ownable, ReentrancyGuard {
using SafeMath for uint256;
address public nftAddress;
uint256 public MAX_SUPPLY;
uint256 public price;
bool public public_minting;
PlayersOnlyNFT playersOnlyNFT;
uint256 public counter;
constructor(address _nftAddress) {
}
modifier onlyOwnerOrDev() {
}
function publicMint(address _toAddress, uint256 amount) external payable nonReentrant {
require(public_minting, "Public minting isn't allowed yet");
require(<FILL_ME>)
require(price.mul(amount) <= msg.value, "Ether value sent is not correct");
for (uint256 i = 0; i < amount; i++) {
playersOnlyNFT.factoryMint(_toAddress);
counter++;
}
}
function startPublicSale() external onlyOwnerOrDev {
}
struct PayoutTable {
address walletTen1;
address walletTen2;
address walletTen3;
address walletTen4;
address walletTen5;
address walletTen6;
address walletTen7;
address walletEight;
address walletSeven;
address walletFive1;
address walletFive2;
address walletThree;
address walletTwo;
}
function withdraw() external onlyOwner {
}
}
| playersOnlyNFT.totalSupply().add(amount)<=MAX_SUPPLY,"Purchase would exceed max supply" | 324,923 | playersOnlyNFT.totalSupply().add(amount)<=MAX_SUPPLY |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.