comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"amount exceeds cap" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/utils/SafeERC20.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
/// @title A simple stable vault
/// @author @gcosmintech
contract StablesInvestor is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
bool public paused;
mapping(address => bool) public supportedTokens;
address[] tokens;
uint256 public cap;
uint256 private constant _decimals = 18;
uint256 private _withdrawnTvl;
event CapChanged(address indexed user, uint256 oldCap, uint256 newCap);
event AddedNewToken(
address indexed user,
address indexed token,
uint256 timestamp
);
event RemovedToken(
address indexed user,
address indexed token,
uint256 timestamp
);
event Withdrawn(
address indexed user,
address indexed token,
address indexed destination,
uint256 timestamp,
uint256 amount,
uint256 capAmount
);
event Deposit(
address indexed user,
address indexed token,
uint256 timestamp,
uint256 amount,
uint256 capAmount
);
constructor() {
}
//
//---------
// Configuration
//---------
//
function pauseDeposit() external onlyOwner {
}
function unpauseDeposit() external onlyOwner {
}
/// @notice Set current strategy cap
/// @dev Use 18 decimals
/// @param newCap New cap
function setCap(uint256 newCap) external onlyOwner {
}
/// @notice Add a new token in the supported list
/// @param token Token's address
function addSupportedToken(address token) external onlyOwner {
}
/// @notice Removes an existing token from the supported list
/// @param token Token's address
function removeSupportedToken(address token) external onlyOwner {
}
/// @notice Withdraws balance of a specific token
/// @param token Token's address
/// @param destination Destination address
function withdraw(address token, address destination) external onlyOwner {
}
//
//---------
// Getters
//---------
//
/// @notice Get total strategy TVL
/// @return Total TVL (current + withdrawn)
function getTotalTVL() public view returns (uint256) {
}
/// @notice Get current strategy TVL
/// @return Current TVL
function getCurrentTVL() public view returns (uint256) {
}
/// @notice Get withdrawn TVL
/// @return Withdrawn TVL
function getWithdrawnTVL() public view returns (uint256) {
}
//
//---------
// Interactions
//---------
//
function deposit(address token, uint256 amount) external nonReentrant {
require(amount > 0, "amount not valid");
require(supportedTokens[token] == true, "token not registered");
require(paused == false, "deposits are paused");
uint256 capValue = _getCapValue(token, amount);
require(<FILL_ME>)
IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
emit Deposit(msg.sender, token, block.timestamp, amount, capValue);
}
//
//---------
// Helpers
//---------
//
function _getCurrentBalance() private view returns (uint256) {
}
function _getCapValue(address token, uint256 amount)
private
view
returns (uint256)
{
}
function _find(address token) private view returns (uint256, bool) {
}
function _remove(uint256 index) private {
}
}
| getTotalTVL()+capValue<=cap,"amount exceeds cap" | 377,154 | getTotalTVL()+capValue<=cap |
null | pragma solidity ^0.4.21;
library SafeMath {
function add(uint256 _a, uint256 _b) pure internal returns (uint256) {
}
function sub(uint256 _a, uint256 _b) pure internal returns (uint256) {
}
function mul(uint256 _a, uint256 _b) pure internal returns (uint256) {
}
function div(uint256 _a, uint256 _b) pure internal returns (uint256) {
}
}
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}
contract Token {
string public name;
string public symbol;
uint256 public decimals;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public 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 TrexCoin is Token {
using SafeMath for uint256;
address public owner;
uint256 public maxSupply;
bool public stopped = false;
event Burn(address indexed from, uint256 value);
event Mint(address indexed to, uint256 value);
event Stop();
event Start();
event Rename(string name, string symbol);
modifier isOwner {
}
modifier isRunning {
}
modifier isValidAddress {
}
modifier hasPayloadSize(uint256 size) {
}
function TrexCoin(uint256 _totalSupply, uint256 _maxSupply, string _name, string _symbol, uint8 _decimals) public {
}
function _transfer(address _from, address _to, uint256 _value) private returns (bool _success) {
}
function transfer(address _to, uint256 _value) public isRunning isValidAddress hasPayloadSize(2 * 32) returns (bool _success) {
}
function transferFrom(address _from, address _to, uint256 _value) public isRunning isValidAddress hasPayloadSize(3 * 32) returns (bool _success) {
}
function _approve(address _owner, address _spender, uint256 _value) private returns (bool _success) {
}
function approve(address _spender, uint256 _value) public isRunning isValidAddress hasPayloadSize(2 * 32) returns (bool _success) {
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public isRunning isValidAddress hasPayloadSize(4 * 32) returns (bool _success) {
}
function _burn(address _from, uint256 _value) private returns (bool _success) {
}
function burn(uint256 _value) public isRunning isValidAddress hasPayloadSize(32) returns (bool _success) {
}
function burnFrom(address _from, uint256 _value) public isRunning isValidAddress hasPayloadSize(2 * 32) returns (bool _success) {
}
function _mint(address _to, uint256 _value) private {
require(_to != 0x0);
require(<FILL_ME>)
if (_value > 0) {
totalSupply = totalSupply.add(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Mint(_to, _value);
}
}
function mint(uint256 _value) public isOwner {
}
function mintTo(address _to, uint256 _value) public isOwner {
}
function start() public isOwner {
}
function stop() public isOwner {
}
function rename(string _name, string _symbol) public isOwner {
}
}
| totalSupply+_value<=maxSupply | 377,253 | totalSupply+_value<=maxSupply |
'May not unfreeze until freeze time is up' | pragma solidity ^0.5.0;
import './SafeMathLib.sol';
contract HipToken {
using SafeMathLib for uint;
mapping (address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
mapping (uint => FrozenTokens) public frozenTokensMap;
event Transfer(address indexed sender, address indexed receiver, uint value);
event Approval(address approver, address spender, uint value);
event TokensFrozen(address indexed freezer, uint amount, uint id, uint lengthFreezeDays);
event TokensUnfrozen(address indexed unfreezer, uint amount, uint id);
event TokensBurned(address burner, uint amount);
uint8 constant public decimals = 18;
string constant public symbol = "HIP";
string constant public name = "HiP Token";
uint public totalSupply;
uint numFrozenStructs;
struct FrozenTokens {
uint id;
uint dateFrozen;
uint lengthFreezeDays;
uint amount;
bool frozen;
address owner;
}
// simple initialization, giving complete token supply to one address
constructor(address bank, uint initialBalance) public {
}
// freeze tokens for a certain number of days
function freeze(uint amount, uint freezeDays) public {
}
// unfreeze frozen tokens
function unFreeze(uint id) public {
FrozenTokens storage f = frozenTokensMap[id];
require(<FILL_ME>)
require(f.frozen, 'Can only unfreeze frozen tokens');
f.frozen = false;
// move tokens back into owner's address from this contract's address
balances[f.owner] = balances[f.owner].plus(f.amount);
balances[address(this)] = balances[address(this)].minus(f.amount);
emit Transfer(address(this), msg.sender, f.amount);
emit TokensUnfrozen(f.owner, f.amount, id);
}
// burn tokens, taking them out of supply
function burn(uint amount) public {
}
// transfer tokens
function transfer(address to, uint value) public returns (bool success)
{
}
// transfer someone else's tokens, subject to approval
function transferFrom(address from, address to, uint value) public returns (bool success)
{
}
// retrieve the balance of address
function balanceOf(address owner) public view returns (uint balance) {
}
// approve another address to transfer a specific amount of tokens
function approve(address spender, uint value) public returns (bool success) {
}
// incrementally increase approval, see https://github.com/ethereum/EIPs/issues/738
function increaseApproval(address spender, uint value) public returns (bool success) {
}
// incrementally decrease approval, see https://github.com/ethereum/EIPs/issues/738
function decreaseApproval(address spender, uint decreaseValue) public returns (bool success) {
}
// retrieve allowance for a given owner, spender pair of addresses
function allowance(address owner, address spender) public view returns (uint remaining) {
}
function numCoinsFrozen() public view returns (uint) {
}
}
| f.dateFrozen+(f.lengthFreezeDays*1days)<now,'May not unfreeze until freeze time is up' | 377,260 | f.dateFrozen+(f.lengthFreezeDays*1days)<now |
'Can only unfreeze frozen tokens' | pragma solidity ^0.5.0;
import './SafeMathLib.sol';
contract HipToken {
using SafeMathLib for uint;
mapping (address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
mapping (uint => FrozenTokens) public frozenTokensMap;
event Transfer(address indexed sender, address indexed receiver, uint value);
event Approval(address approver, address spender, uint value);
event TokensFrozen(address indexed freezer, uint amount, uint id, uint lengthFreezeDays);
event TokensUnfrozen(address indexed unfreezer, uint amount, uint id);
event TokensBurned(address burner, uint amount);
uint8 constant public decimals = 18;
string constant public symbol = "HIP";
string constant public name = "HiP Token";
uint public totalSupply;
uint numFrozenStructs;
struct FrozenTokens {
uint id;
uint dateFrozen;
uint lengthFreezeDays;
uint amount;
bool frozen;
address owner;
}
// simple initialization, giving complete token supply to one address
constructor(address bank, uint initialBalance) public {
}
// freeze tokens for a certain number of days
function freeze(uint amount, uint freezeDays) public {
}
// unfreeze frozen tokens
function unFreeze(uint id) public {
FrozenTokens storage f = frozenTokensMap[id];
require(f.dateFrozen + (f.lengthFreezeDays * 1 days) < now, 'May not unfreeze until freeze time is up');
require(<FILL_ME>)
f.frozen = false;
// move tokens back into owner's address from this contract's address
balances[f.owner] = balances[f.owner].plus(f.amount);
balances[address(this)] = balances[address(this)].minus(f.amount);
emit Transfer(address(this), msg.sender, f.amount);
emit TokensUnfrozen(f.owner, f.amount, id);
}
// burn tokens, taking them out of supply
function burn(uint amount) public {
}
// transfer tokens
function transfer(address to, uint value) public returns (bool success)
{
}
// transfer someone else's tokens, subject to approval
function transferFrom(address from, address to, uint value) public returns (bool success)
{
}
// retrieve the balance of address
function balanceOf(address owner) public view returns (uint balance) {
}
// approve another address to transfer a specific amount of tokens
function approve(address spender, uint value) public returns (bool success) {
}
// incrementally increase approval, see https://github.com/ethereum/EIPs/issues/738
function increaseApproval(address spender, uint value) public returns (bool success) {
}
// incrementally decrease approval, see https://github.com/ethereum/EIPs/issues/738
function decreaseApproval(address spender, uint decreaseValue) public returns (bool success) {
}
// retrieve allowance for a given owner, spender pair of addresses
function allowance(address owner, address spender) public view returns (uint remaining) {
}
function numCoinsFrozen() public view returns (uint) {
}
}
| f.frozen,'Can only unfreeze frozen tokens' | 377,260 | f.frozen |
"You have already minted the max amount." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract MetaBearz is ERC721, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
uint256 private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 6777;
uint256 public constant GENESIS_PRICE = 0.09 ether;
uint256 public constant OG_PRICE = 0.14 ether;
uint256 public constant PRICE = 0.16 ether;
uint256 public constant MAX_BY_MINT = 3;
uint256 public constant genesisMaxMint = 2;
uint256 public constant ogMaxMint = 3;
uint256 public constant maxMintTotal = 6;
string public baseTokenURI;
address public constant creatorAddress = 0xbe21Fc6FB38c22f76E1425cA7a3Aa32d71a1c37c;
address public constant devAddress = 0x1df6BE18f999504156D40ec8c058e1d4A54ff04D;
bytes32 public tierOneMerkleRoot;
bytes32 public tierTwoMerkleRoot;
mapping(address => uint256) public tokensClaimed;
bool public publicSaleOpen;
event CreateItem(uint256 indexed id);
constructor()
ERC721("Meta Bearz Syndicate", "BEAR")
{
}
modifier saleIsOpen {
}
modifier noContract() {
}
function totalSupply() public view returns (uint256) {
}
function setPublicSale(bool val) public onlyOwner {
}
function mint(uint256 _count) public payable saleIsOpen noContract {
uint256 total = totalSupply();
require(publicSaleOpen, "Public sale not open yet");
require(total + _count <= MAX_ELEMENTS, "Max limit");
require(_count <= MAX_BY_MINT, "Exceeds number");
require(<FILL_ME>)
require(msg.value == PRICE * _count, "Value is over or under price.");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(msg.sender);
}
}
function presaleMint(uint256 _count, bytes32[] calldata _proof, uint256 _tier) public payable saleIsOpen noContract {
}
function ownerMint(uint256 _count) public onlyOwner {
}
function _mintAnElement(address _to) private {
}
function canMintPresaleAmount(uint256 _count, uint256 _tier) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot, uint256 _tier) external onlyOwner {
}
function _tierExists(uint256 _tier) private pure returns (bool) {
}
function verifySender(bytes32[] calldata proof, uint256 _tier) public view returns (bool) {
}
function _verify(bytes32[] calldata proof, bytes32 addressHash, uint256 _tier) internal view returns (bool) {
}
function _hash(address _address) internal pure returns (bytes32) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
}
}
| tokensClaimed[msg.sender]+_count<=maxMintTotal,"You have already minted the max amount." | 377,372 | tokensClaimed[msg.sender]+_count<=maxMintTotal |
"Sender is not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract MetaBearz is ERC721, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
uint256 private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 6777;
uint256 public constant GENESIS_PRICE = 0.09 ether;
uint256 public constant OG_PRICE = 0.14 ether;
uint256 public constant PRICE = 0.16 ether;
uint256 public constant MAX_BY_MINT = 3;
uint256 public constant genesisMaxMint = 2;
uint256 public constant ogMaxMint = 3;
uint256 public constant maxMintTotal = 6;
string public baseTokenURI;
address public constant creatorAddress = 0xbe21Fc6FB38c22f76E1425cA7a3Aa32d71a1c37c;
address public constant devAddress = 0x1df6BE18f999504156D40ec8c058e1d4A54ff04D;
bytes32 public tierOneMerkleRoot;
bytes32 public tierTwoMerkleRoot;
mapping(address => uint256) public tokensClaimed;
bool public publicSaleOpen;
event CreateItem(uint256 indexed id);
constructor()
ERC721("Meta Bearz Syndicate", "BEAR")
{
}
modifier saleIsOpen {
}
modifier noContract() {
}
function totalSupply() public view returns (uint256) {
}
function setPublicSale(bool val) public onlyOwner {
}
function mint(uint256 _count) public payable saleIsOpen noContract {
}
function presaleMint(uint256 _count, bytes32[] calldata _proof, uint256 _tier) public payable saleIsOpen noContract {
if (_tier == 1) {
require(msg.value == GENESIS_PRICE * _count, "Value is over or under price.");
} else if (_tier == 2) {
require(msg.value == OG_PRICE * _count, "Value is over or under price.");
} else {
revert('Invalid tier');
}
require(<FILL_ME>)
require(canMintPresaleAmount(_count, _tier), "Sender max presale mint amount already met");
tokensClaimed[msg.sender] += _count;
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(msg.sender);
}
}
function ownerMint(uint256 _count) public onlyOwner {
}
function _mintAnElement(address _to) private {
}
function canMintPresaleAmount(uint256 _count, uint256 _tier) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot, uint256 _tier) external onlyOwner {
}
function _tierExists(uint256 _tier) private pure returns (bool) {
}
function verifySender(bytes32[] calldata proof, uint256 _tier) public view returns (bool) {
}
function _verify(bytes32[] calldata proof, bytes32 addressHash, uint256 _tier) internal view returns (bool) {
}
function _hash(address _address) internal pure returns (bytes32) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
}
}
| verifySender(_proof,_tier),"Sender is not whitelisted" | 377,372 | verifySender(_proof,_tier) |
"Sender max presale mint amount already met" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract MetaBearz is ERC721, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
uint256 private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 6777;
uint256 public constant GENESIS_PRICE = 0.09 ether;
uint256 public constant OG_PRICE = 0.14 ether;
uint256 public constant PRICE = 0.16 ether;
uint256 public constant MAX_BY_MINT = 3;
uint256 public constant genesisMaxMint = 2;
uint256 public constant ogMaxMint = 3;
uint256 public constant maxMintTotal = 6;
string public baseTokenURI;
address public constant creatorAddress = 0xbe21Fc6FB38c22f76E1425cA7a3Aa32d71a1c37c;
address public constant devAddress = 0x1df6BE18f999504156D40ec8c058e1d4A54ff04D;
bytes32 public tierOneMerkleRoot;
bytes32 public tierTwoMerkleRoot;
mapping(address => uint256) public tokensClaimed;
bool public publicSaleOpen;
event CreateItem(uint256 indexed id);
constructor()
ERC721("Meta Bearz Syndicate", "BEAR")
{
}
modifier saleIsOpen {
}
modifier noContract() {
}
function totalSupply() public view returns (uint256) {
}
function setPublicSale(bool val) public onlyOwner {
}
function mint(uint256 _count) public payable saleIsOpen noContract {
}
function presaleMint(uint256 _count, bytes32[] calldata _proof, uint256 _tier) public payable saleIsOpen noContract {
if (_tier == 1) {
require(msg.value == GENESIS_PRICE * _count, "Value is over or under price.");
} else if (_tier == 2) {
require(msg.value == OG_PRICE * _count, "Value is over or under price.");
} else {
revert('Invalid tier');
}
require(verifySender(_proof, _tier), "Sender is not whitelisted");
require(<FILL_ME>)
tokensClaimed[msg.sender] += _count;
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(msg.sender);
}
}
function ownerMint(uint256 _count) public onlyOwner {
}
function _mintAnElement(address _to) private {
}
function canMintPresaleAmount(uint256 _count, uint256 _tier) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot, uint256 _tier) external onlyOwner {
}
function _tierExists(uint256 _tier) private pure returns (bool) {
}
function verifySender(bytes32[] calldata proof, uint256 _tier) public view returns (bool) {
}
function _verify(bytes32[] calldata proof, bytes32 addressHash, uint256 _tier) internal view returns (bool) {
}
function _hash(address _address) internal pure returns (bytes32) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
}
}
| canMintPresaleAmount(_count,_tier),"Sender max presale mint amount already met" | 377,372 | canMintPresaleAmount(_count,_tier) |
"Tier does not exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract MetaBearz is ERC721, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
uint256 private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 6777;
uint256 public constant GENESIS_PRICE = 0.09 ether;
uint256 public constant OG_PRICE = 0.14 ether;
uint256 public constant PRICE = 0.16 ether;
uint256 public constant MAX_BY_MINT = 3;
uint256 public constant genesisMaxMint = 2;
uint256 public constant ogMaxMint = 3;
uint256 public constant maxMintTotal = 6;
string public baseTokenURI;
address public constant creatorAddress = 0xbe21Fc6FB38c22f76E1425cA7a3Aa32d71a1c37c;
address public constant devAddress = 0x1df6BE18f999504156D40ec8c058e1d4A54ff04D;
bytes32 public tierOneMerkleRoot;
bytes32 public tierTwoMerkleRoot;
mapping(address => uint256) public tokensClaimed;
bool public publicSaleOpen;
event CreateItem(uint256 indexed id);
constructor()
ERC721("Meta Bearz Syndicate", "BEAR")
{
}
modifier saleIsOpen {
}
modifier noContract() {
}
function totalSupply() public view returns (uint256) {
}
function setPublicSale(bool val) public onlyOwner {
}
function mint(uint256 _count) public payable saleIsOpen noContract {
}
function presaleMint(uint256 _count, bytes32[] calldata _proof, uint256 _tier) public payable saleIsOpen noContract {
}
function ownerMint(uint256 _count) public onlyOwner {
}
function _mintAnElement(address _to) private {
}
function canMintPresaleAmount(uint256 _count, uint256 _tier) public view returns (bool) {
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot, uint256 _tier) external onlyOwner {
require(<FILL_ME>)
if (_tier == 1) {
tierOneMerkleRoot = _merkleRoot;
} else if (_tier == 2) {
tierTwoMerkleRoot = _merkleRoot;
}
}
function _tierExists(uint256 _tier) private pure returns (bool) {
}
function verifySender(bytes32[] calldata proof, uint256 _tier) public view returns (bool) {
}
function _verify(bytes32[] calldata proof, bytes32 addressHash, uint256 _tier) internal view returns (bool) {
}
function _hash(address _address) internal pure returns (bytes32) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function pause(bool val) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
}
}
| _tierExists(_tier),"Tier does not exist" | 377,372 | _tierExists(_tier) |
"Unable to send funds to charity." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract GangstaHamsta is ERC721Enumerable, Ownable, ReentrancyGuard {
uint256 private constant MAX_GANGSTA_HAMSTA = 8888;
uint256 private constant GANGSTA_HAMSTA_PER_TX = 50;
uint256 private constant GANGSTA_HAMSTA_PRICE = 0.01 ether;
string public GANGSTA_HAMSTA_PROVENANCE;
bool private _isPublicSaleActive = false;
string private _baseTokenURI;
uint256 CHARITY_SHARES = 5;
uint256 DEV_SHARES = 50;
uint256 ARTIST_SHARES = 45;
address ARTIST_ADDRESS = 0x116d334D852D6e685E2CEb875f1B1B8bAF5d781f;
address CHARITY_ADDRESS = 0x354383657f82AD49C303fF4E562A32f3491C70D7; // she's the first
uint256 public BOSS_GANGSTA_HAMSTA = 0;
bool public isBossSelected = false;
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
uint256 totalBalance = address(this).balance;
uint256 charityShare = (totalBalance * CHARITY_SHARES) / 100;
uint256 artistShare = (totalBalance * ARTIST_SHARES) / 100;
uint256 devShare = (totalBalance * DEV_SHARES) / 100;
require(<FILL_ME>)
require(
payable(ARTIST_ADDRESS).send(artistShare),
"Unable to send funds to Artist."
);
require(
payable(msg.sender).send(devShare),
"Unable to send funds to Onwer."
);
assert(address(this).balance == 0);
}
function togglePublicSale() external onlyOwner {
}
function isPublicSaleActive() external view returns (bool status) {
}
function selectBossGangsta() public onlyOwner {
}
function getBossGangstaHamsta() public view returns (uint256){
}
/*
* A SHA256 hash representing all 8888 GANGSTA_HAMSTA. Will be set once all 8888 are out for blood.
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseTokenURI(string memory baseTokenURI) public onlyOwner {
}
function mintPublic(uint256 amount) external payable nonReentrant() {
}
/*
* Sets aside some GANGSTA_HAMSTA for the dev team, used for competitions, giveaways and mods memberships
*/
function reserve(uint256 amount) external onlyOwner {
}
function _mintMultiple(address owner, uint256 amount) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
receive() external payable {}
}
| payable(CHARITY_ADDRESS).send(charityShare),"Unable to send funds to charity." | 377,379 | payable(CHARITY_ADDRESS).send(charityShare) |
"Unable to send funds to Artist." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract GangstaHamsta is ERC721Enumerable, Ownable, ReentrancyGuard {
uint256 private constant MAX_GANGSTA_HAMSTA = 8888;
uint256 private constant GANGSTA_HAMSTA_PER_TX = 50;
uint256 private constant GANGSTA_HAMSTA_PRICE = 0.01 ether;
string public GANGSTA_HAMSTA_PROVENANCE;
bool private _isPublicSaleActive = false;
string private _baseTokenURI;
uint256 CHARITY_SHARES = 5;
uint256 DEV_SHARES = 50;
uint256 ARTIST_SHARES = 45;
address ARTIST_ADDRESS = 0x116d334D852D6e685E2CEb875f1B1B8bAF5d781f;
address CHARITY_ADDRESS = 0x354383657f82AD49C303fF4E562A32f3491C70D7; // she's the first
uint256 public BOSS_GANGSTA_HAMSTA = 0;
bool public isBossSelected = false;
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
uint256 totalBalance = address(this).balance;
uint256 charityShare = (totalBalance * CHARITY_SHARES) / 100;
uint256 artistShare = (totalBalance * ARTIST_SHARES) / 100;
uint256 devShare = (totalBalance * DEV_SHARES) / 100;
require(
payable(CHARITY_ADDRESS).send(charityShare),
"Unable to send funds to charity."
);
require(<FILL_ME>)
require(
payable(msg.sender).send(devShare),
"Unable to send funds to Onwer."
);
assert(address(this).balance == 0);
}
function togglePublicSale() external onlyOwner {
}
function isPublicSaleActive() external view returns (bool status) {
}
function selectBossGangsta() public onlyOwner {
}
function getBossGangstaHamsta() public view returns (uint256){
}
/*
* A SHA256 hash representing all 8888 GANGSTA_HAMSTA. Will be set once all 8888 are out for blood.
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseTokenURI(string memory baseTokenURI) public onlyOwner {
}
function mintPublic(uint256 amount) external payable nonReentrant() {
}
/*
* Sets aside some GANGSTA_HAMSTA for the dev team, used for competitions, giveaways and mods memberships
*/
function reserve(uint256 amount) external onlyOwner {
}
function _mintMultiple(address owner, uint256 amount) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
receive() external payable {}
}
| payable(ARTIST_ADDRESS).send(artistShare),"Unable to send funds to Artist." | 377,379 | payable(ARTIST_ADDRESS).send(artistShare) |
"Unable to send funds to Onwer." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract GangstaHamsta is ERC721Enumerable, Ownable, ReentrancyGuard {
uint256 private constant MAX_GANGSTA_HAMSTA = 8888;
uint256 private constant GANGSTA_HAMSTA_PER_TX = 50;
uint256 private constant GANGSTA_HAMSTA_PRICE = 0.01 ether;
string public GANGSTA_HAMSTA_PROVENANCE;
bool private _isPublicSaleActive = false;
string private _baseTokenURI;
uint256 CHARITY_SHARES = 5;
uint256 DEV_SHARES = 50;
uint256 ARTIST_SHARES = 45;
address ARTIST_ADDRESS = 0x116d334D852D6e685E2CEb875f1B1B8bAF5d781f;
address CHARITY_ADDRESS = 0x354383657f82AD49C303fF4E562A32f3491C70D7; // she's the first
uint256 public BOSS_GANGSTA_HAMSTA = 0;
bool public isBossSelected = false;
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
uint256 totalBalance = address(this).balance;
uint256 charityShare = (totalBalance * CHARITY_SHARES) / 100;
uint256 artistShare = (totalBalance * ARTIST_SHARES) / 100;
uint256 devShare = (totalBalance * DEV_SHARES) / 100;
require(
payable(CHARITY_ADDRESS).send(charityShare),
"Unable to send funds to charity."
);
require(
payable(ARTIST_ADDRESS).send(artistShare),
"Unable to send funds to Artist."
);
require(<FILL_ME>)
assert(address(this).balance == 0);
}
function togglePublicSale() external onlyOwner {
}
function isPublicSaleActive() external view returns (bool status) {
}
function selectBossGangsta() public onlyOwner {
}
function getBossGangstaHamsta() public view returns (uint256){
}
/*
* A SHA256 hash representing all 8888 GANGSTA_HAMSTA. Will be set once all 8888 are out for blood.
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseTokenURI(string memory baseTokenURI) public onlyOwner {
}
function mintPublic(uint256 amount) external payable nonReentrant() {
}
/*
* Sets aside some GANGSTA_HAMSTA for the dev team, used for competitions, giveaways and mods memberships
*/
function reserve(uint256 amount) external onlyOwner {
}
function _mintMultiple(address owner, uint256 amount) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
receive() external payable {}
}
| payable(msg.sender).send(devShare),"Unable to send funds to Onwer." | 377,379 | payable(msg.sender).send(devShare) |
"Mint would exceed max supply of GANGSTA_HAMSTA" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract GangstaHamsta is ERC721Enumerable, Ownable, ReentrancyGuard {
uint256 private constant MAX_GANGSTA_HAMSTA = 8888;
uint256 private constant GANGSTA_HAMSTA_PER_TX = 50;
uint256 private constant GANGSTA_HAMSTA_PRICE = 0.01 ether;
string public GANGSTA_HAMSTA_PROVENANCE;
bool private _isPublicSaleActive = false;
string private _baseTokenURI;
uint256 CHARITY_SHARES = 5;
uint256 DEV_SHARES = 50;
uint256 ARTIST_SHARES = 45;
address ARTIST_ADDRESS = 0x116d334D852D6e685E2CEb875f1B1B8bAF5d781f;
address CHARITY_ADDRESS = 0x354383657f82AD49C303fF4E562A32f3491C70D7; // she's the first
uint256 public BOSS_GANGSTA_HAMSTA = 0;
bool public isBossSelected = false;
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI
) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
}
function togglePublicSale() external onlyOwner {
}
function isPublicSaleActive() external view returns (bool status) {
}
function selectBossGangsta() public onlyOwner {
}
function getBossGangstaHamsta() public view returns (uint256){
}
/*
* A SHA256 hash representing all 8888 GANGSTA_HAMSTA. Will be set once all 8888 are out for blood.
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseTokenURI(string memory baseTokenURI) public onlyOwner {
}
function mintPublic(uint256 amount) external payable nonReentrant() {
require(_isPublicSaleActive, "Public sale is not active");
require(
amount > 0 && amount <= GANGSTA_HAMSTA_PER_TX,
"You can't mint that many GANGSTA_HAMSTA"
);
require(<FILL_ME>)
require(
msg.value == amount * GANGSTA_HAMSTA_PRICE,
"You didn't send the right amount of eth"
);
_mintMultiple(msg.sender, amount);
}
/*
* Sets aside some GANGSTA_HAMSTA for the dev team, used for competitions, giveaways and mods memberships
*/
function reserve(uint256 amount) external onlyOwner {
}
function _mintMultiple(address owner, uint256 amount) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
receive() external payable {}
}
| totalSupply()+amount<=MAX_GANGSTA_HAMSTA,"Mint would exceed max supply of GANGSTA_HAMSTA" | 377,379 | totalSupply()+amount<=MAX_GANGSTA_HAMSTA |
"Exceeds maximum wallet amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title TokenGeneratorMetadata
* @author Create My Token (https://t.me/LemonCryptoDev)
* @dev Implementation of the TokenGeneratorMetadata
*/
contract TokenGeneratorMetadata {
string public constant _GENERATOR = "https://t.me/LemonCryptoDev";
string public constant _VERSION = "v1.0.0";
function generator() public pure returns (string memory) {
}
function version() public pure returns (string memory) {
}
}
pragma solidity ^0.8.0;
/**
* @title BTFA_Token
* @author Create My Token (https://t.me/LemonCryptoDev)
* @dev Implementation of the BTFA_Token
*/
contract BTFA_Token is IERC20, AntiBotBlacklist, TokenGeneratorMetadata {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
address dead = 0x000000000000000000000000000000000000dEaD;
address zero = address(0);
uint8 public constant _maxLiqFee = 10;
uint8 public constant _maxTaxFee = 10;
uint8 public constant _maxWalletFee = 10;
uint256 public constant _minMxTxAmount = 1000 * 10**9;
uint256 public constant _minMxSnipeAmount = 1000 * 10**9;
uint256 public constant _minMxWalletAmount = 1000 * 10**9;
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 _isExcludedFromAntiSnipe;
mapping(address => bool) private _isExcluded;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 public _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal;
string public _name = "Banana Task Force Ape";
string public _symbol = "BTFA";
uint8 private _decimals = 9;
uint8 public _buyTaxFee = 0; // Fee for Reflection in Buying
uint8 public _sellTaxFee = 0; // Fee for Reflection in Selling
uint8 public _taxFee = 0; // Fee for Reflection
uint8 private _previousTaxFee = _taxFee;
uint8 public _buyLiquidityFee = 0; // Fee for Liquidity in Buying
uint8 public _sellLiquidityFee = 0; // Fee for Liquidity in Selling
uint8 public _liquidityFee = 0; // Fee for Liquidity
uint8 private _previousLiquidityFee = _liquidityFee;
uint8 public _buyWalletFee = 0; // Fee to marketing/charity wallet in Buying
uint8 public _sellWalletFee = 0; // Fee to marketing/charity wallet in Selling
uint8 public _walletFee = 0; // Fee to marketing/charity wallet
uint8 private _previousWalletFee = _walletFee;
IUniswapV2Router02 public immutable _uniV2Router;
address public immutable _uniV2Pair;
address payable public _marketingWallet;
bool _inSwapAndLiquify;
bool public _swapAndLiquifyEnabled = true;
uint256 public _maxTxAmount;
uint256 public _maxWalletAmount;
uint256 public _maxSnipeAmount;
uint256 public _numTokensSellToAddToLiquidity;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
modifier antiSnipe(
address from,
address to,
uint256 amount
) {
}
constructor(
uint256 maxSupply,
address routerAddress,
address marketingWallet,
uint8 buyReflectionFee,
uint8 buyWalletFee,
uint8 buyLiquidityFee,
uint8 sellReflectionFee,
uint8 sellWalletFee,
uint8 sellLiquidityFee
) payable {
}
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 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 increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function deliver(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
public
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount)
public
view
returns (uint256)
{
}
function excludeFromReward(address account) public onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function excludeFromAntiSnipe(address account) public onlyOwner {
}
function includeInAntiSnipe(address account) public onlyOwner {
}
function isExcludedFromAntiSnipe(address account)
public
view
returns (bool)
{
}
function setAllBuyFeePercent(
uint8 taxFee,
uint8 liquidityFee,
uint8 walletFee
) external onlyOwner {
}
function setAllSellFeePercent(
uint8 taxFee,
uint8 liquidityFee,
uint8 walletFee
) external onlyOwner {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner {
}
function setMaxSnipeAmount(uint256 maxSnipeAmount) external onlyOwner {
}
function setMaxWalletAmount(uint256 maxWalletAmount) external onlyOwner {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setNumTokensSellToAddToLiquidity(uint256 amount) public onlyOwner {
}
function setMarketingWallet(address payable newMarketingWallet)
external
onlyOwner
{
}
//to recieve ETH from uniV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
}
function calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function isExcludedFromFee(address account) public view returns (bool) {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private antiBots(from, to) antiSnipe(from, to, amount) {
require(from != address(0), "ERC20: transfer from zero address");
require(to != address(0), "ERC20: transfer to zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner())
require(
amount <= _maxTxAmount,
"Transfer amount exceeds the maxTxAmount."
);
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != dead &&
to != _uniV2Pair
) {
uint256 contractBalanceRecepient = balanceOf(to);
require(<FILL_ME>)
}
// is the token balance of this contract address over the min number of
// tokens that we need to initiate a swap + liquidity lock?
// also, don't get caught in a circular liquidity event.
// also, don't swap & liquify if sender is uniswap pair.
uint256 contractTokenBalance = balanceOf(address(this));
if (contractTokenBalance >= _maxTxAmount) {
contractTokenBalance = _maxTxAmount;
}
if (!_inSwapAndLiquify && to == _uniV2Pair && _swapAndLiquifyEnabled) {
if (contractTokenBalance >= _numTokensSellToAddToLiquidity) {
contractTokenBalance = _numTokensSellToAddToLiquidity;
//add liquidity
swapAndLiquify(contractTokenBalance);
}
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
takeFee = false;
}
if (takeFee) {
if (from == _uniV2Pair) {
_taxFee = _buyTaxFee;
_liquidityFee = _buyLiquidityFee;
_walletFee = _buyWalletFee;
} else if (to == _uniV2Pair) {
_taxFee = _sellTaxFee;
_liquidityFee = _sellLiquidityFee;
_walletFee = _sellWalletFee;
} else {
takeFee = false;
}
}
//transfer amount, it will take tax, burn, liquidity fee
_tokenTransfer(from, to, amount, takeFee);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
}
function buyBackTokens(uint256 amount) private lockTheSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function swapETHForTokens(uint256 amount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferToExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferFromExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _transferBothExcluded(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _tokenTransferNoFee(
address sender,
address recipient,
uint256 amount
) private {
}
function recoverToken(address tokenAddress, uint256 tokenAmount)
public
onlyOwner
{
}
}
| contractBalanceRecepient+amount<=_maxWalletAmount,"Exceeds maximum wallet amount" | 377,518 | contractBalanceRecepient+amount<=_maxWalletAmount |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
require(<FILL_ME>)
_;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| frozenAccounts[msg.sender]!=true&&now>accountLockupTime[msg.sender] | 377,523 | frozenAccounts[msg.sender]!=true&&now>accountLockupTime[msg.sender] |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
require(<FILL_ME>)
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| (msg.sender==owner&&paused)||(msg.sender==admin&&paused)||!paused | 377,523 | (msg.sender==owner&&paused)||(msg.sender==admin&&paused)||!paused |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
require(<FILL_ME>)
/// Check if the sender has enough
balanceOf[msg.sender] -= _burnedTokensWithDecimal;
/// Subtract from the sender
totalSupply -= _burnedTokensWithDecimal;
Burn(msg.sender, _burnedTokensWithDecimal);
return true;
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| balanceOf[msg.sender]>=_burnedTokensWithDecimal | 377,523 | balanceOf[msg.sender]>=_burnedTokensWithDecimal |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
require(<FILL_ME>)
/// Check if the targeted balance is enough
require(_burnedTokensWithDecimal <= allowance[_from][msg.sender]);
/// Check allowance
balanceOf[_from] -= _burnedTokensWithDecimal;
/// Subtract from the targeted balance
allowance[_from][msg.sender] -= _burnedTokensWithDecimal;
/// Subtract from the sender's allowance
totalSupply -= _burnedTokensWithDecimal;
Burn(_from, _burnedTokensWithDecimal);
return true;
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| balanceOf[_from]>=_burnedTokensWithDecimal | 377,523 | balanceOf[_from]>=_burnedTokensWithDecimal |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
require(<FILL_ME>)
balanceOf[owner] = balanceOf[owner].add(totalSupply);
Issue(issueIndex++, owner, 0, totalSupply);
addOrUpdateHolder(owner);
firstRoundTokenIssued = true;
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| !firstRoundTokenIssued | 377,523 | !firstRoundTokenIssued |
null | pragma solidity ^0.4.18;
/**
* @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 Add two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract SoinToken {
using SafeMath for uint256;
string public name = "Soin";
string public symbol = "SOIN";
uint8 public decimals = 18;
// Total Supply of Soin Tokens
uint256 public totalSupply = 30000000000000000000000000000;
// Multi-dimensional mapping to keep allow transfers between addresses
mapping (address => mapping (address => uint256)) public allowance;
// Mapping to retrieve balance of a specific address
mapping (address => uint256) public balanceOf;
/// The owner of contract
address public owner;
/// The admin account of contract
address public admin;
// Mapping of addresses that are locked up
mapping (address => bool) internal accountLockup;
// Mapping that retrieves the current lockup time for a specific address
mapping (address => uint256) public accountLockupTime;
// Mapping of addresses that are frozen
mapping (address => bool) public frozenAccounts;
// Mapping of holder addresses (index)
mapping (address => uint256) internal holderIndex;
// Array of holder addressses
address[] internal holders;
///First round tokens whether isssued.
bool internal firstRoundTokenIssued = false;
/// Contract pause state
bool public paused = true;
/// Issue event index starting from 0.
uint256 internal issueIndex = 0;
// Emitted when a function is invocated without the specified preconditions.
event InvalidState(bytes msg);
// This notifies clients about the token issued.
event Issue(uint256 issueIndex, address addr, uint256 ethAmount, uint256 tokenAmount);
// This notifies clients about the amount to transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount to approve
event Approval(address indexed owner, address indexed spender, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This notifies clients about the account frozen
event FrozenFunds(address target, bool frozen);
// This notifies clients about the pause
event Pause();
// This notifies clients about the unpause
event Unpause();
/*
* MODIFIERS
*/
modifier onlyOwner {
}
modifier onlyAdmin {
}
/**
* @dev Modifier to make a function callable only when account not frozen.
*/
modifier isNotFrozen {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier isNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier isPaused() {
}
/**
* @dev Internal transfer, only can be called by this contract
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to transfer between addressses.
*/
function _transfer(address _from, address _to, uint256 _value) internal isNotFrozen isNotPaused {
}
/**
* @dev Transfer to a specific address
* @param _to The address to transfer to.
* @param _transferTokensWithDecimal The amount to be transferred.
*/
function transfer(address _to, uint256 _transferTokensWithDecimal) public {
}
/**
* @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 _transferTokensWithDecimal uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _transferTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Allows `_spender` to spend no more (allowance) than `_approveTokensWithDecimal` tokens in your behalf
*
* !!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 authorized to spend.
* @param _approveTokensWithDecimal the max amount they can spend.
*/
function approve(address _spender, uint256 _approveTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens and remove `_value` tokens from the system irreversibly
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!IMPORTANT is 18 DECIMALS
*/
function burn(uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Destroy tokens (`_value`) from the system irreversibly on behalf of `_from`.
* @param _from The address of the sender.
* @param _burnedTokensWithDecimal The amount of tokens to burn. !!! IMPORTANT is 18 DECIMALS
*/
function burnFrom(address _from, uint256 _burnedTokensWithDecimal) public isNotFrozen isNotPaused returns (bool success) {
}
/**
* @dev Add holder address into `holderIndex` mapping and to the `holders` array.
* @param _holderAddr The address of the holder
*/
function addOrUpdateHolder(address _holderAddr) internal {
}
/**
* CONSTRUCTOR
* @dev Initialize the Soin Token
*/
function SoinToken() public {
}
/**
* @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 Set admin account to manage contract.
*/
function setAdmin(address _address) public onlyOwner {
}
/**
* @dev Issue first round tokens to `owner` address.
*/
function issueFirstRoundToken() public onlyOwner {
}
/**
* @dev Issue tokens for reserve.
* @param _issueTokensWithDecimal The amount of reserve tokens. !!IMPORTANT is 18 DECIMALS
*/
function issueReserveToken(uint256 _issueTokensWithDecimal) onlyOwner public {
}
/**
* @dev Freeze or Unfreeze an address
* @param _address address that will be frozen or unfrozen
* @param _frozenStatus status indicating if the address will be frozen or unfrozen.
*/
function changeFrozenStatus(address _address, bool _frozenStatus) public onlyAdmin {
}
/**
* @dev Lockup account till the date. Can't lock-up again when this account locked already.
* 1 year = 31536000 seconds, 0.5 year = 15768000 seconds
*/
function lockupAccount(address _address, uint256 _lockupSeconds) public onlyAdmin {
require(<FILL_ME>)
// lock-up account
accountLockupTime[_address] = now + _lockupSeconds;
accountLockup[_address] = true;
}
/**
* @dev Get the cuurent Soin holder count.
*/
function getHolderCount() public view returns (uint256 _holdersCount){
}
/**
* @dev Get the current Soin holder addresses.
*/
function getHolders() public onlyAdmin view returns (address[] _holders){
}
/**
* @dev Pause the contract by only the owner. Triggers Pause() Event.
*/
function pause() onlyAdmin isNotPaused public {
}
/**
* @dev Unpause the contract by only he owner. Triggers the Unpause() Event.
*/
function unpause() onlyAdmin isPaused public {
}
/**
* @dev Change the symbol attribute of the contract by the Owner.
* @param _symbol Short name of the token, symbol.
*/
function setSymbol(string _symbol) public onlyOwner {
}
/**
* @dev Change the name attribute of the contract by the Owner.
* @param _name Name of the token, full name.
*/
function setName(string _name) public onlyOwner {
}
/// @dev This default function rejects anyone to purchase the SOIN (Soin) token. Crowdsale has finished.
function() public payable {
}
}
| (accountLockup[_address]&&now>accountLockupTime[_address])||!accountLockup[_address] | 377,523 | (accountLockup[_address]&&now>accountLockupTime[_address])||!accountLockup[_address] |
null | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
//Check that the message came from a Trusted Contract
require(<FILL_ME>)
_;
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| trustedContracts[msg.sender] | 377,578 | trustedContracts[msg.sender] |
null | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
//Check that the message either came from an owner, or a trusted contract
require(<FILL_ME>)
_;
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| balanceOf(msg.sender,regionID)>0||trustedContracts[msg.sender] | 377,578 | balanceOf(msg.sender,regionID)>0||trustedContracts[msg.sender] |
"INVALID_TOKEN!" | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
require(<FILL_ME>)
return super.onERC1155Received(_operator, _from, _id, _amount, _data);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| (msg.sender==address(FAMEContract)&&_id==FAMETokenID)||msg.sender==address(this),"INVALID_TOKEN!" | 377,578 | (msg.sender==address(FAMEContract)&&_id==FAMETokenID)||msg.sender==address(this) |
null | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
//Check if the name is unique
require(<FILL_ME>)
//Set the name
regions[regionID].header.bytesName = LibRegion.stringToBytes32(name);
//Add region's name to index
regionNames[name] = true;
regionsByName[name] = regionID;
touch(regionID);
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| !nameExists(name) | 377,578 | !nameExists(name) |
null | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
require(<FILL_ME>)
regions[senderID].header.balance -= amount;
FAMEToRegion(recipientID, amount, tax);
touch(senderID);
touch(recipientID);
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| regions[senderID].header.balance>=amount | 377,578 | regions[senderID].header.balance>=amount |
null | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
require(<FILL_ME>)
regions[regionID].header.balance -= amount;
WarriorContract.payWarrior(warriorID, amount, true);
touch(regionID);
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| regions[regionID].header.balance>=amount | 377,578 | regions[regionID].header.balance>=amount |
"REGION NOT FOR SALE!" | // SPDX-License-Identifier: LGPL-3.0
pragma solidity ^0.8.9;
import "./BDERC1155Tradable.sol";
import "./LibRegion.sol";
import "./IWarrior.sol";
//Import ERC1155 standard for utilizing FAME tokens
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/**
* @title RegionCollectible
* RegionCollectible - The contract for managing BattleDrome Region NFTs
*/
contract RegionCollectible is BDERC1155Tradable, ERC1155Holder {
using LibRegion for LibRegion.region;
mapping(uint256 => LibRegion.region) regions;
mapping(uint256 => uint256) locationOfWarrior;
mapping(uint256 => uint256[]) warriorsAtLocation;
mapping(string => bool) regionNames;
mapping(string => uint256) regionsByName;
mapping(address => bool) trustedContracts;
uint256 currentRegionCount;
uint256 currentRegionPricingCounter;
IERC1155 FAMEContract;
IWarrior WarriorContract;
uint256 FAMETokenID;
uint256 regionTaxDivisor;
constructor(address _proxyRegistryAddress)
BDERC1155Tradable(
"RegionCollectible",
"BDR",
_proxyRegistryAddress,
"https://metadata.battledrome.io/api/erc1155-region/"
)
{}
function contractURI() public pure returns (string memory) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Modifiers
//////////////////////////////////////////////////////////////////////////////////////////
modifier onlyTrustedContracts() {
}
modifier onlyOwnersOrTrustedContracts(uint256 regionID) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Events
//////////////////////////////////////////////////////////////////////////////////////////
event RegionAltered(uint64 indexed region, uint32 timeStamp);
event RegionCreated(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionSold(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
event RegionBought(
uint64 indexed region,
address indexed owner,
uint64 price,
uint32 timeStamp
);
//////////////////////////////////////////////////////////////////////////////////////////
// Region Factory
//////////////////////////////////////////////////////////////////////////////////////////
//Standard factory function, allowing minting regions.
function internalCreateRegion() internal returns (uint256 theNewRegion) {
}
function trustedCreateRegion()
public
onlyTrustedContracts
returns (uint256 theNewRegion)
{
}
function newRegion() public returns (uint256 theNewRegion) {
}
//////////////////////////////////////////////////////////////////////////////////////////
// ERC1155 Overrides Functions
//////////////////////////////////////////////////////////////////////////////////////////
function safeTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public override {
}
function internalTransferFrom(
address _from,
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) internal {
}
function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes calldata _data
) public override returns (bytes4) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(BDERC1155Tradable, ERC1155Receiver)
returns (bool)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// General Utility Functions
//////////////////////////////////////////////////////////////////////////////////////////
function processRegionCreationFee(uint256 regionID, uint256 feeAmount)
internal
{
}
function touch(uint256 regionID) internal {
}
function setFAMEContractAddress(address newContract) public onlyOwner {
}
function setWarriorContractAddress(address newContract) public onlyOwner {
}
function setFAMETokenID(uint256 id) public onlyOwner {
}
function setRegionTaxDivisor(uint256 divisor) public onlyOwner {
}
function transferFAME(
address sender,
address recipient,
uint256 amount
) internal {
}
function FAMEToRegion(
uint256 id,
uint256 amount,
bool tax
) internal {
}
function getRegionIDByName(string memory name)
public
view
returns (uint256)
{
}
function nameExists(string memory _name) public view returns (bool) {
}
function setName(uint256 regionID, string memory name)
public
ownersOnly(regionID)
{
}
function addTrustedContract(address trustee) public onlyOwner {
}
function removeTrustedContract(address trustee) public onlyOwner {
}
function canConnectInternal(uint256 regionIDA, uint256 regionIDB)
internal
view
returns (bool)
{
}
function addConnectionInternal(uint256 regionIDA, uint256 regionIDB)
internal
{
}
function generateInitialRegionConnections(uint256 regionID) internal {
}
function incrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
function decrementCurrentRegionPricingCounter()
public
onlyTrustedContracts
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Basic Getters
//////////////////////////////////////////////////////////////////////////////////////////
function getCurrentRegionCount() public view returns (uint256) {
}
function getCurrentRegionPricingCounter() public view returns (uint256) {
}
function ownerOf(uint256 _id) public view returns (address) {
}
function getRegionCost(int256 offset) public view returns (uint256) {
}
function getRegionName(uint256 regionID)
public
view
returns (string memory)
{
}
function getRegionHeader(uint256 regionID)
public
view
returns (LibRegion.regionHeader memory)
{
}
function getRandomProperty(uint256 regionID, string memory propertyIndex)
public
view
returns (uint256)
{
}
function getRegionConfig(uint256 regionID, uint256 configIndex)
public
view
returns (uint256)
{
}
function getRegionConnections(uint256 regionID)
public
view
returns (uint256[] memory)
{
}
function getRegionConnectionCount(uint256 regionID)
public
view
returns (uint16)
{
}
//////////////////////////////////////////////////////////////////////////////////////////
// Transaction/Payment Handling
//////////////////////////////////////////////////////////////////////////////////////////
function payRegion(
uint256 regionID,
uint256 amount,
bool tax
) public {
}
function transferFAMEFromRegionToRegion(
uint256 senderID,
uint256 recipientID,
uint256 amount,
bool tax
) public onlyTrustedContracts {
}
function transferFAMEFromWarriorToRegion(
uint256 warriorID,
uint256 regionID,
uint256 amount
) public onlyTrustedContracts {
}
function transferFAMEFromRegionToWarrior(
uint256 regionID,
uint256 warriorID,
uint256 amount
) public onlyTrustedContracts {
}
//////////////////////////////////////////////////////////////////////////////////////////
// Buy/Sell of regions
//////////////////////////////////////////////////////////////////////////////////////////
function sellRegion(uint256 regionID) public ownersOnly(regionID) {
}
function buyRegion(uint256 regionID) public {
//Only allow buying a region that is for sale (owned by this contract)
require(<FILL_ME>)
//Calculate the fee:
uint256 regionFee = getRegionCost(0);
//Take fee from the buyer
transferFAME(msg.sender, address(this), regionFee);
//Process the paid fee for this region
processRegionCreationFee(regionID, regionFee);
//Increment the region pricing counter
currentRegionPricingCounter += 1;
//Assign the region to the buyer
internalTransferFrom(address(this), msg.sender, regionID, 1, "");
//Emit the event
emit RegionBought(
uint64(regionID),
msg.sender,
uint64(regionFee),
uint32(block.timestamp)
);
}
//////////////////////////////////////////////////////////////////////////////////////////
// Master Setters for Updating Metadata store on Region NFTs
//////////////////////////////////////////////////////////////////////////////////////////
function setRegionDescription(uint256 regionID, string memory description)
public
ownersOnly(regionID)
{
}
function setRegionLinkURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setMetaURL(uint256 regionID, string memory url)
public
ownersOnly(regionID)
{
}
function setConfig(
uint256 regionID,
uint256 index,
uint256 value
) public onlyOwnersOrTrustedContracts(regionID) {
}
}
| regions[regionID].header.owner==address(this),"REGION NOT FOR SALE!" | 377,578 | regions[regionID].header.owner==address(this) |
null | pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title 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) constant returns (uint256);
function transfer(address to, uint256 value) 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) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @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)) 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 amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
/**
* @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 StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
}
}
// ACE Token is a first token of TokenStars platform
// Copyright (c) 2017 TokenStars
// Made by Aler Denisov
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
contract StarTokenInterface is MintableToken {
// Cheatsheet of inherit methods and events
// function transferOwnership(address newOwner);
// function allowance(address owner, address spender) constant returns (uint256);
// function transfer(address _to, uint256 _value) returns (bool);
// function transferFrom(address from, address to, uint256 value) returns (bool);
// function approve(address spender, uint256 value) returns (bool);
// function increaseApproval (address _spender, uint _addedValue) returns (bool success);
// function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success);
// function finishMinting() returns (bool);
// function mint(address _to, uint256 _amount) returns (bool);
// event Approval(address indexed owner, address indexed spender, uint256 value);
// event Mint(address indexed to, uint256 amount);
// event MintFinished();
// Custom methods and events
function openTransfer() public returns (bool);
function toggleTransferFor(address _for) public returns (bool);
function extraMint() public returns (bool);
event TransferAllowed();
event TransferAllowanceFor(address indexed who, bool indexed state);
}
// ACE Token is a first token of TokenStars platform
// Copyright (c) 2017 TokenStars
// Made by Aler Denisov
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
contract AceToken is StarTokenInterface {
using SafeMath for uint256;
// ERC20 constants
string public constant name = "ACE Token";
string public constant symbol = "ACE";
uint public constant decimals = 0;
// Minting constants
uint256 public constant MAXSOLD_SUPPLY = 99000000;
uint256 public constant HARDCAPPED_SUPPLY = 165000000;
uint256 public investorSupply = 0;
uint256 public extraSupply = 0;
uint256 public freeToExtraMinting = 0;
uint256 public constant DISTRIBUTION_INVESTORS = 60;
uint256 public constant DISTRIBUTION_TEAM = 20;
uint256 public constant DISTRIBUTION_COMMUNITY = 20;
address public teamTokensHolder;
address public communityTokensHolder;
// Transfer rules
bool public transferAllowed = false;
mapping (address=>bool) public specialAllowed;
// Transfer rules events
// event TransferAllowed();
// event TransferAllowanceFor(address indexed who, bool indexed state);
// Holders events
event ChangeCommunityHolder(address indexed from, address indexed to);
event ChangeTeamHolder(address indexed from, address indexed to);
/**
* @dev check transfer is allowed
*/
modifier allowTransfer() {
require(<FILL_ME>)
_;
}
function AceToken() public {
}
/**
* @dev change team tokens holder
* @param _tokenHolder The address of next team tokens holder
*/
function setTeamTokensHolder(address _tokenHolder) onlyOwner public returns (bool) {
}
/**
* @dev change community tokens holder
* @param _tokenHolder The address of next community tokens holder
*/
function setCommunityTokensHolder(address _tokenHolder) onlyOwner public returns (bool) {
}
/**
* @dev Doesn't allow to send funds on contract!
*/
function () payable public {
}
/**
* @dev transfer token for a specified address if transfer is open
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) allowTransfer public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another if transfer is open
* @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) allowTransfer public returns (bool) {
}
/**
* @dev Open transfer for everyone or throws
*/
function openTransfer() onlyOwner public returns (bool) {
}
/**
* @dev allow transfer for the given address against global rules
* @param _for addres The address of special allowed transfer (required for smart contracts)
*/
function toggleTransferFor(address _for) onlyOwner public returns (bool) {
}
/**
* @dev Function to mint tokens for investor
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to emit.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Mint extra token to corresponding token and community holders
*/
function extraMint() onlyOwner canMint public returns (bool) {
}
/**
* @dev Increase approved amount to spend
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase already approved amount.
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
/**
* @dev Decrease approved amount to spend
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease already approved amount.
*/
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
function finilize() onlyOwner public returns (bool) {
}
}
| transferAllowed||specialAllowed[msg.sender] | 377,594 | transferAllowed||specialAllowed[msg.sender] |
null | pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title 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) constant returns (uint256);
function transfer(address to, uint256 value) 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) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @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)) 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 amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
/**
* @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 StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
}
}
// ACE Token is a first token of TokenStars platform
// Copyright (c) 2017 TokenStars
// Made by Aler Denisov
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
contract StarTokenInterface is MintableToken {
// Cheatsheet of inherit methods and events
// function transferOwnership(address newOwner);
// function allowance(address owner, address spender) constant returns (uint256);
// function transfer(address _to, uint256 _value) returns (bool);
// function transferFrom(address from, address to, uint256 value) returns (bool);
// function approve(address spender, uint256 value) returns (bool);
// function increaseApproval (address _spender, uint _addedValue) returns (bool success);
// function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success);
// function finishMinting() returns (bool);
// function mint(address _to, uint256 _amount) returns (bool);
// event Approval(address indexed owner, address indexed spender, uint256 value);
// event Mint(address indexed to, uint256 amount);
// event MintFinished();
// Custom methods and events
function openTransfer() public returns (bool);
function toggleTransferFor(address _for) public returns (bool);
function extraMint() public returns (bool);
event TransferAllowed();
event TransferAllowanceFor(address indexed who, bool indexed state);
}
// ACE Token is a first token of TokenStars platform
// Copyright (c) 2017 TokenStars
// Made by Aler Denisov
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
contract AceToken is StarTokenInterface {
using SafeMath for uint256;
// ERC20 constants
string public constant name = "ACE Token";
string public constant symbol = "ACE";
uint public constant decimals = 0;
// Minting constants
uint256 public constant MAXSOLD_SUPPLY = 99000000;
uint256 public constant HARDCAPPED_SUPPLY = 165000000;
uint256 public investorSupply = 0;
uint256 public extraSupply = 0;
uint256 public freeToExtraMinting = 0;
uint256 public constant DISTRIBUTION_INVESTORS = 60;
uint256 public constant DISTRIBUTION_TEAM = 20;
uint256 public constant DISTRIBUTION_COMMUNITY = 20;
address public teamTokensHolder;
address public communityTokensHolder;
// Transfer rules
bool public transferAllowed = false;
mapping (address=>bool) public specialAllowed;
// Transfer rules events
// event TransferAllowed();
// event TransferAllowanceFor(address indexed who, bool indexed state);
// Holders events
event ChangeCommunityHolder(address indexed from, address indexed to);
event ChangeTeamHolder(address indexed from, address indexed to);
/**
* @dev check transfer is allowed
*/
modifier allowTransfer() {
}
function AceToken() public {
}
/**
* @dev change team tokens holder
* @param _tokenHolder The address of next team tokens holder
*/
function setTeamTokensHolder(address _tokenHolder) onlyOwner public returns (bool) {
}
/**
* @dev change community tokens holder
* @param _tokenHolder The address of next community tokens holder
*/
function setCommunityTokensHolder(address _tokenHolder) onlyOwner public returns (bool) {
}
/**
* @dev Doesn't allow to send funds on contract!
*/
function () payable public {
}
/**
* @dev transfer token for a specified address if transfer is open
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) allowTransfer public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another if transfer is open
* @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) allowTransfer public returns (bool) {
}
/**
* @dev Open transfer for everyone or throws
*/
function openTransfer() onlyOwner public returns (bool) {
require(<FILL_ME>)
transferAllowed = true;
TransferAllowed();
return true;
}
/**
* @dev allow transfer for the given address against global rules
* @param _for addres The address of special allowed transfer (required for smart contracts)
*/
function toggleTransferFor(address _for) onlyOwner public returns (bool) {
}
/**
* @dev Function to mint tokens for investor
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to emit.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Mint extra token to corresponding token and community holders
*/
function extraMint() onlyOwner canMint public returns (bool) {
}
/**
* @dev Increase approved amount to spend
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase already approved amount.
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
/**
* @dev Decrease approved amount to spend
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease already approved amount.
*/
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
function finilize() onlyOwner public returns (bool) {
}
}
| !transferAllowed | 377,594 | !transferAllowed |
"constructor: failed to approve otc (wethToken)" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
require(<FILL_ME>)
kyberNetwork = _kyberNetwork;
admin = _admin;
tradeEnabled = true;
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| wethToken.approve(address(otc),2**255),"constructor: failed to approve otc (wethToken)" | 377,691 | wethToken.approve(address(otc),2**255) |
"trade: token is not listed" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
require(tradeEnabled, "trade: tradeEnabled is false");
require(msg.sender == kyberNetwork, "trade: not call from kyberNetwork's contract");
require(srcToken == ETH_TOKEN_ADDRESS || destToken == ETH_TOKEN_ADDRESS, "trade: srcToken or destToken must be ETH");
ERC20 token = srcToken == ETH_TOKEN_ADDRESS ? destToken : srcToken;
require(<FILL_ME>)
if (srcToken == ETH_TOKEN_ADDRESS) {
require(msg.value == srcAmount, "trade: ETH amount is not correct");
} else {
// collect token
require(srcToken.transferFrom(msg.sender, address(this), srcAmount));
}
uint srcBalBefore;
uint destBalBefore;
if (srcToken == ETH_TOKEN_ADDRESS) {
srcBalBefore = address(this).balance;
destBalBefore = destToken.balanceOf(address(this));
} else {
srcBalBefore = srcToken.balanceOf(address(this));
destBalBefore = address(this).balance;
}
uint totalDestAmount;
if (conversionRate % 4 == 0) {
uint uniswapDestAmt = doTradeUniswap(srcToken, destToken, srcAmount / 2);
uint oasisSwapDestAmt = doTradeOasis(srcToken, destToken, srcAmount - srcAmount / 2);
totalDestAmount = uniswapDestAmt + oasisSwapDestAmt;
} else if (conversionRate % 2 == 0) {
totalDestAmount = doTradeOasis(srcToken, destToken, srcAmount);
} else {
totalDestAmount = doTradeUniswap(srcToken, destToken, srcAmount);
}
uint expectedDestAmount = calcDestAmount(
srcToken, /* src */
destToken, /* dest */
srcAmount, /* srcAmount */
conversionRate /* rate */
);
require(totalDestAmount >= expectedDestAmount, "not enough dest amount");
uint srcBalAfter;
uint destBalAfter;
if (srcToken == ETH_TOKEN_ADDRESS) {
srcBalAfter = address(this).balance;
destBalAfter = destToken.balanceOf(address(this));
} else {
srcBalAfter = srcToken.balanceOf(address(this));
destBalAfter = address(this).balance;
}
require(srcBalAfter >= srcBalBefore - srcAmount, "src bal is not correct");
require(destBalAfter >= destBalBefore + expectedDestAmount, "dest bal is not correct");
// transfer exact expected dest amount
if (destToken == ETH_TOKEN_ADDRESS) {
destAddress.transfer(expectedDestAmount);
} else {
require(destToken.transfer(destAddress, expectedDestAmount));
}
return true;
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| isTokenListed[address(token)],"trade: token is not listed" | 377,691 | isTokenListed[address(token)] |
null | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
address tokenAddr = address(token);
require(<FILL_ME>)
tokenBasicData[tokenAddr] = encodeTokenBasicData(minETHSupport, maxTraverse, maxTake);
emit TokenConfigDataSet(
token, maxTraverse,
maxTake, minETHSupport
);
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| isTokenListed[tokenAddr] | 377,691 | isTokenListed[tokenAddr] |
"listToken: token's alr listed" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
address tokenAddr = address(token);
require(tokenAddr != address(0), "listToken: token's address is missing");
require(<FILL_ME>)
require(getDecimals(token) == MAX_DECIMALS, "listToken: token's decimals is not MAX_DECIMALS");
require(token.approve(address(otc), 2**255), "listToken: approve token otc failed");
address uniswapExchange = uniswapFactory.getExchange(tokenAddr);
tokenExchange[address(token)] = uniswapExchange;
if (address(uniswapExchange) != address(0)) {
require(token.approve(uniswapExchange, 2**255), "listToken: approve token uniswap failed");
}
isTokenListed[tokenAddr] = true;
emit TokenListed(token);
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| !isTokenListed[tokenAddr],"listToken: token's alr listed" | 377,691 | !isTokenListed[tokenAddr] |
"listToken: token's decimals is not MAX_DECIMALS" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
address tokenAddr = address(token);
require(tokenAddr != address(0), "listToken: token's address is missing");
require(!isTokenListed[tokenAddr], "listToken: token's alr listed");
require(<FILL_ME>)
require(token.approve(address(otc), 2**255), "listToken: approve token otc failed");
address uniswapExchange = uniswapFactory.getExchange(tokenAddr);
tokenExchange[address(token)] = uniswapExchange;
if (address(uniswapExchange) != address(0)) {
require(token.approve(uniswapExchange, 2**255), "listToken: approve token uniswap failed");
}
isTokenListed[tokenAddr] = true;
emit TokenListed(token);
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| getDecimals(token)==MAX_DECIMALS,"listToken: token's decimals is not MAX_DECIMALS" | 377,691 | getDecimals(token)==MAX_DECIMALS |
"listToken: approve token otc failed" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
address tokenAddr = address(token);
require(tokenAddr != address(0), "listToken: token's address is missing");
require(!isTokenListed[tokenAddr], "listToken: token's alr listed");
require(getDecimals(token) == MAX_DECIMALS, "listToken: token's decimals is not MAX_DECIMALS");
require(<FILL_ME>)
address uniswapExchange = uniswapFactory.getExchange(tokenAddr);
tokenExchange[address(token)] = uniswapExchange;
if (address(uniswapExchange) != address(0)) {
require(token.approve(uniswapExchange, 2**255), "listToken: approve token uniswap failed");
}
isTokenListed[tokenAddr] = true;
emit TokenListed(token);
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| token.approve(address(otc),2**255),"listToken: approve token otc failed" | 377,691 | token.approve(address(otc),2**255) |
"delistToken: reset approve token failed" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
address tokenAddr = address(token);
require(isTokenListed[tokenAddr], "delistToken: token is not listed");
require(<FILL_ME>)
address uniswapExchange = tokenExchange[tokenAddr];
if (uniswapExchange != address(0)) {
require(token.approve(uniswapExchange, 0), "listToken: approve token uniswap failed");
}
delete isTokenListed[tokenAddr];
delete tokenBasicData[tokenAddr];
emit TokenDelisted(token);
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| token.approve(address(otc),0),"delistToken: reset approve token failed" | 377,691 | token.approve(address(otc),0) |
"listToken: approve token uniswap failed" | pragma solidity 0.5.11;
interface ERC20 {
function transfer(address _to, uint _value) external returns (bool success);
function transferFrom(address _from, address _to, uint _value) external returns (bool success);
function approve(address _spender, uint _value) external returns (bool success);
function totalSupply() external view returns (uint supply);
function balanceOf(address _owner) external view returns (uint balance);
function allowance(address _owner, address _spender) external view returns (uint remaining);
function decimals() external view returns(uint digits);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/// @title Kyber Reserve contract
interface KyberReserveInterface {
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool validate
)
external
payable
returns(bool);
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) external view returns(uint);
}
contract OtcInterface {
function getOffer(uint id) external view returns (uint, ERC20, uint, ERC20);
function getBestOffer(ERC20 sellGem, ERC20 buyGem) external view returns(uint);
function getWorseOffer(uint id) external view returns(uint);
function take(bytes32 id, uint128 maxTakeAmount) external;
}
contract PermissionGroups {
address public admin;
address public pendingAdmin;
constructor() public {
}
modifier onlyAdmin() {
}
event TransferAdminPending(address pendingAdmin);
/**
* @dev Allows the current admin to set the pendingAdmin address.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdmin(address newAdmin) public onlyAdmin {
}
/**
* @dev Allows the current admin to set the admin in one tx. Useful initial deployment.
* @param newAdmin The address to transfer ownership to.
*/
function transferAdminQuickly(address newAdmin) public onlyAdmin {
}
event AdminClaimed( address newAdmin, address previousAdmin);
/**
* @dev Allows the pendingAdmin address to finalize the change admin process.
*/
function claimAdmin() public {
}
}
contract Withdrawable is PermissionGroups {
event TokenWithdraw(ERC20 token, uint amount, address sendTo);
/**
* @dev Withdraw all ERC20 compatible tokens
* @param token ERC20 The address of the token contract
*/
function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin {
}
event EtherWithdraw(uint amount, address sendTo);
/**
* @dev Withdraw Ethers
*/
function withdrawEther(uint amount, address payable sendTo) external onlyAdmin {
}
}
contract WethInterface is ERC20 {
function deposit() public payable;
function withdraw(uint) public;
}
interface UniswapExchange {
function ethToTokenSwapInput(
uint256 min_tokens,
uint256 deadline
)
external
payable
returns (uint256 tokens_bought);
function tokenToEthSwapInput(
uint256 tokens_sold,
uint256 min_eth,
uint256 deadline
)
external
returns (uint256 eth_bought);
function getEthToTokenInputPrice(
uint256 eth_sold
)
external
view
returns (uint256 tokens_bought);
function getTokenToEthInputPrice(
uint256 tokens_sold
)
external
view
returns (uint256 eth_bought);
}
interface UniswapFactory {
function getExchange(address token) external view returns (address exchange);
}
contract UniswapOasisBridgeReserve is KyberReserveInterface, Withdrawable {
// constants
uint constant internal INVALID_ID = uint(-1);
uint constant internal POW_2_32 = 2 ** 32;
uint constant internal POW_2_96 = 2 ** 96;
uint constant internal BPS = 10000; // 10^4
ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
uint constant internal PRECISION = (10**18);
uint constant internal MAX_QTY = (10**28); // 10B tokens
uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH
uint constant internal MAX_DECIMALS = 18;
uint constant internal ETH_DECIMALS = 18;
// values
address public kyberNetwork;
bool public tradeEnabled = true;
uint public feeBps = 50; // 0.5%
OtcInterface public otc = OtcInterface(0x39755357759cE0d7f32dC8dC45414CCa409AE24e);
WethInterface public wethToken = WethInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
UniswapFactory public uniswapFactory = UniswapFactory(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
mapping(address => bool) public isTokenListed;
mapping(address => address) public tokenExchange;
// basicData contains compact data of min eth support, max traverse and max takes
// min eth support (first 192 bits) + max traverse (32 bits) + max takes (32 bits) = 256 bits
mapping(address => uint) internal tokenBasicData;
struct BasicDataConfig {
uint minETHSupport;
uint maxTraverse;
uint maxTakes;
}
struct OfferData {
uint payAmount;
uint buyAmount;
uint id;
}
constructor(address _kyberNetwork, address _admin) public {
}
function() external payable {} // solhint-disable-line no-empty-blocks
function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint) public view returns(uint) {
}
function getConversionRateOasis(ERC20 src, ERC20 dest, uint srcQty) public view returns(uint rate, uint destAmount) {
}
function getConversionRateUniswap(ERC20 src, ERC20 dest, uint srcQty)
public
view
returns(uint rate, uint destAmount)
{
}
function calcUniswapConversion(
ERC20 src,
ERC20 dest,
uint srcQty
)
internal
view
returns(uint rate, uint destQty)
{
}
event TradeExecute(
address indexed origin,
address src,
uint srcAmount,
address destToken,
uint destAmount,
address payable destAddress
);
function trade(
ERC20 srcToken,
uint srcAmount,
ERC20 destToken,
address payable destAddress,
uint conversionRate,
bool
)
public
payable
returns(bool)
{
}
event TokenConfigDataSet(
ERC20 token, uint maxTraverse,
uint maxTake,
uint minETHSupport
);
function setTokenConfigData(
ERC20 token,
uint maxTraverse,
uint maxTake,
uint minETHSupport
)
public onlyAdmin
{
}
function doTradeUniswap(ERC20 src, ERC20 dest, uint srcQty) internal returns(uint destAmount) {
}
function doTradeOasis(
ERC20 srcToken,
ERC20 destToken,
uint srcAmount
)
internal
returns(uint)
{
}
event TradeEnabled(bool enable);
function enableTrade(bool isEnabled) public onlyAdmin returns(bool) {
}
event ContractsSet(address kyberNetwork, address otc);
function setContracts(address _kyberNetwork, address _otc, address _uniswapFactory) public onlyAdmin {
}
event TokenListed(ERC20 token);
function listToken(ERC20 token) public onlyAdmin {
}
event TokenDelisted(ERC20 token);
function delistToken(ERC20 token) public onlyAdmin {
address tokenAddr = address(token);
require(isTokenListed[tokenAddr], "delistToken: token is not listed");
require(token.approve(address(otc), 0), "delistToken: reset approve token failed");
address uniswapExchange = tokenExchange[tokenAddr];
if (uniswapExchange != address(0)) {
require(<FILL_ME>)
}
delete isTokenListed[tokenAddr];
delete tokenBasicData[tokenAddr];
emit TokenDelisted(token);
}
event FeeBpsSet(uint feeBps);
function setFeeBps(uint _feeBps) public onlyAdmin {
}
function takeMatchingOrders(ERC20 destToken, uint srcAmount, OfferData[] memory offers)
internal
returns(uint actualDestAmount)
{
}
function valueAfterReducingFee(uint val) internal view returns(uint) {
}
function findBestOffers(
ERC20 dstToken,
ERC20 srcToken,
uint srcAmount,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint totalDestAmount, OfferData[] memory offers)
{
}
// returns max takes, max traverse, min order size to take using config factor data
function calcOfferLimitsFromFactorData(
ERC20 token,
bool isEthToToken,
OfferData memory bid,
OfferData memory ask
)
internal view
returns(uint maxTakes, uint maxTraverse, uint minPayAmount)
{
}
// bid: buy WETH, ask: sell WETH (their base token is DAI)
function getFirstBidAndAskOrders(ERC20 token)
internal view
returns(OfferData memory bid, OfferData memory ask)
{
}
function getFirstOffer(ERC20 offerSellGem, ERC20 offerBuyGem)
internal view
returns(uint offerId, uint offerPayAmount, uint offerBuyAmount)
{
}
function getTokenBasicData(ERC20 token)
internal view
returns(BasicDataConfig memory data)
{
}
function encodeTokenBasicData(uint ethSize, uint maxTraverse, uint maxTakes)
internal pure
returns(uint data)
{
}
function decodeTokenBasicData(uint data)
internal pure
returns(uint ethSize, uint maxTraverse, uint maxTakes)
{
}
function getDecimals(ERC20 token) internal view returns(uint) {
}
function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) {
}
function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) {
}
function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals)
internal pure returns(uint)
{
}
function minOf(uint x, uint y) internal pure returns(uint) {
}
}
| token.approve(uniswapExchange,0),"listToken: approve token uniswap failed" | 377,691 | token.approve(uniswapExchange,0) |
"SecureContract: Not Bridge - Permission denied" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
require(<FILL_ME>)
_;
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| hasRole(_BRIDGE_TX,msg.sender),"SecureContract: Not Bridge - Permission denied" | 377,788 | hasRole(_BRIDGE_TX,msg.sender) |
"Wrapped Token: Insufficient FMTA balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
if (_fmtaWrapFee > 0)
{
require(<FILL_ME>)
_FMTA.burnFrom(msg.sender, _fmtaWrapFee);
_totalBurn += _fmtaWrapFee;
}
uint256 fee = calculateWrapFee(amount);
require(_backingToken.balanceOf(msg.sender) >= amount, "Wrapped Token: Insufficient backing token balance");
_backingToken.safeTransferFrom(msg.sender, address(this), amount);
_mint(msg.sender, amount - fee);
_accumulatedFee += fee;
emit Wrap(msg.sender, amount, fee);
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _FMTA.balanceOf(msg.sender)>=_fmtaWrapFee,"Wrapped Token: Insufficient FMTA balance" | 377,788 | _FMTA.balanceOf(msg.sender)>=_fmtaWrapFee |
"Wrapped Token: Insufficient backing token balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
if (_fmtaWrapFee > 0)
{
require(_FMTA.balanceOf(msg.sender) >= _fmtaWrapFee, "Wrapped Token: Insufficient FMTA balance");
_FMTA.burnFrom(msg.sender, _fmtaWrapFee);
_totalBurn += _fmtaWrapFee;
}
uint256 fee = calculateWrapFee(amount);
require(<FILL_ME>)
_backingToken.safeTransferFrom(msg.sender, address(this), amount);
_mint(msg.sender, amount - fee);
_accumulatedFee += fee;
emit Wrap(msg.sender, amount, fee);
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _backingToken.balanceOf(msg.sender)>=amount,"Wrapped Token: Insufficient backing token balance" | 377,788 | _backingToken.balanceOf(msg.sender)>=amount |
"Wrapped Token: Insufficient FMTA balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
}
function unwrap(uint256 amount) public pause
{
if (_fmtaUnwrapFee > 0)
{
require(<FILL_ME>)
_FMTA.burnFrom(msg.sender, _fmtaUnwrapFee);
_totalBurn += _fmtaUnwrapFee;
}
uint256 fee = calculateUnwrapFee(amount);
require(balanceOf(msg.sender) >= amount, "Wrapped Token: Insufficient wrapped token balance");
_burn(msg.sender, amount);
_backingToken.safeTransfer(msg.sender, amount - fee);
_accumulatedFee += fee;
emit Unwrap(msg.sender, amount, fee);
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _FMTA.balanceOf(msg.sender)>=_fmtaUnwrapFee,"Wrapped Token: Insufficient FMTA balance" | 377,788 | _FMTA.balanceOf(msg.sender)>=_fmtaUnwrapFee |
"Wrapped Token: Insufficient FMTA balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
if (_fmtaWrapFee > 0)
{
require(<FILL_ME>)
_FMTA.burnFrom(user, _fmtaWrapFee);
_totalBurn += _fmtaWrapFee;
}
uint256 fee = calculateWrapFee(amount);
require(_backingToken.balanceOf(user) >= amount, "Wrapped Token: Insufficient backing token balance");
_backingToken.safeTransferFrom(user, address(this), amount);
_accumulatedFee += fee;
emit Wrap(user, amount, fee);
return amount - fee;
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _FMTA.balanceOf(user)>=_fmtaWrapFee,"Wrapped Token: Insufficient FMTA balance" | 377,788 | _FMTA.balanceOf(user)>=_fmtaWrapFee |
"Wrapped Token: Insufficient backing token balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
if (_fmtaWrapFee > 0)
{
require(_FMTA.balanceOf(user) >= _fmtaWrapFee, "Wrapped Token: Insufficient FMTA balance");
_FMTA.burnFrom(user, _fmtaWrapFee);
_totalBurn += _fmtaWrapFee;
}
uint256 fee = calculateWrapFee(amount);
require(<FILL_ME>)
_backingToken.safeTransferFrom(user, address(this), amount);
_accumulatedFee += fee;
emit Wrap(user, amount, fee);
return amount - fee;
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _backingToken.balanceOf(user)>=amount,"Wrapped Token: Insufficient backing token balance" | 377,788 | _backingToken.balanceOf(user)>=amount |
"Wrapped Token: Insufficient FMTA balance" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity >=0.8.9;
// Author: Steve Medley
// https://github.com/Civitas-Fundamenta
// [email protected]
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./include/TokenInterface.sol";
import "./include/SecureContract.sol";
contract FundamentaWrappedToken is SecureContract, ERC20
{
bytes32 public constant _MINTTO = keccak256("_MINTTO");
bytes32 public constant _BURNFROM = keccak256("_BURNFROM");
bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX");
event Wrap(address indexed user, uint256 amount, uint256 fee);
event Unwrap(address indexed user, uint256 amount, uint256 fee);
event Mint(address indexed user, uint256 amount, address agent);
event Burn(address indexed user, uint256 amount, address agent);
event FeeWithdraw(address indexed user, uint256 amount);
using SafeERC20 for IERC20;
IERC20 private _backingToken;
TokenInterface private _FMTA;
uint8 private _decimals;
uint256 private _wrapFee;
uint256 private _unwrapFee;
uint256 private _accumulatedFee;
uint256 private _fmtaWrapFee;
uint256 private _fmtaUnwrapFee;
uint256 private _totalBurn;
modifier isBridge()
{
}
constructor(address backingTokenContract, string memory name, string memory ticker, uint8 tokenDecimals, address fmtaAddress)
ERC20(name, ticker)
{
}
function setFmtaWrapFee(uint256 newFee) public isAdmin
{
}
function setFmtaUnwrapFee(uint256 newFee) public isAdmin
{
}
function setWrapFee(uint256 newFee) public isAdmin
{
}
function setUnwrapFee(uint256 newFee) public isAdmin
{
}
function decimals() public override view returns (uint8) { }
function queryFees() public view returns (uint256, uint256, uint256, uint256) {
}
function queryAccumulatedFees() public view returns (uint256, uint256) {
}
function queryBackingToken() public view returns (IERC20) { }
function calculateWrapFee(uint256 amount) public view returns (uint256) { }
function calculateUnwrapFee(uint256 amount) public view returns (uint256) { }
function wrap(uint256 amount) public pause
{
}
function unwrap(uint256 amount) public pause
{
}
function crossChainWrap(address user, uint256 amount) public isBridge pause returns (uint256)
{
}
function crossChainUnwrap(address user, uint256 amount) public isBridge pause
{
if (_fmtaUnwrapFee > 0)
{
require(<FILL_ME>)
_FMTA.burnFrom(user, _fmtaUnwrapFee);
_totalBurn += _fmtaUnwrapFee;
}
uint256 fee = calculateUnwrapFee(amount);
require(balanceOf(user) >= amount, "Wrapped Token: Insufficient wrapped token balance");
_backingToken.safeTransfer(user, amount - fee);
_accumulatedFee += fee;
emit Unwrap(user, amount, fee);
}
function mintTo(address user, uint amount) public pause
{
}
function burnFrom(address user, uint amount) public pause
{
}
function withdrawAccumulatedFee(address to) public isAdmin
{
}
}
| _FMTA.balanceOf(user)>=_fmtaUnwrapFee,"Wrapped Token: Insufficient FMTA balance" | 377,788 | _FMTA.balanceOf(user)>=_fmtaUnwrapFee |
"addNewProject: project name already taken." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract LatticeStakingPool is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct StakingPool {
uint256 maxStakingAmountPerUser;
uint256 totalAmountStaked;
address[] usersStaked;
}
struct Project {
string name;
uint256 totalAmountStaked;
uint256 numberOfPools;
uint256 startTimestamp;
uint256 endTimestamp;
}
struct UserInfo {
address userAddress;
uint256 poolId;
uint256 percentageOfTokensStakedInPool;
uint256 amountOfTokensStakedInPool;
}
IERC20 public stakingToken;
address private owner;
Project[] public projects;
/// @notice ProjectID => Pool ID => User Address => amountStaked
mapping(uint256 => mapping(uint256 => mapping(address => uint256)))
public userStakedAmount;
/// @notice ProjectID => Pool ID => User Address => didUserWithdrawFunds
mapping(uint256 => mapping(uint256 => mapping(address => bool)))
public didUserWithdrawFunds;
/// @notice ProjectID => Pool ID => StakingPool
mapping(uint256 => mapping(uint256 => StakingPool)) public stakingPoolInfo;
/// @notice ProjectName => isProjectNameTaken
mapping(string => bool) public isProjectNameTaken;
/// @notice ProjectName => ProjectID
mapping(string => uint256) public projectNameToProjectId;
event Deposit(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event Withdraw(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event PoolAdded(uint256 indexed _projectId, uint256 indexed _poolId);
event ProjectDisabled(uint256 indexed _projectId);
event ProjectAdded(uint256 indexed _projectId, string _projectName);
constructor(IERC20 _stakingToken) {
}
function addProject(
string memory _name,
uint256 _startTimestamp,
uint256 _endTimestamp
) external {
require(msg.sender == owner, "addNewProject: Caller is not the owner");
require(
bytes(_name).length > 0,
"addNewProject: Project name cannot be empty string."
);
require(
_startTimestamp >= block.timestamp,
"addNewProject: startTimestamp is less than the current block timestamp."
);
require(
_startTimestamp < _endTimestamp,
"addNewProject: startTimestamp is greater than or equal to the endTimestamp."
);
require(<FILL_ME>)
Project memory project;
project.name = _name;
project.startTimestamp = _startTimestamp;
project.endTimestamp = _endTimestamp;
project.numberOfPools = 0;
project.totalAmountStaked = 0;
uint256 projectsLength = projects.length;
projects.push(project);
projectNameToProjectId[_name] = projectsLength;
isProjectNameTaken[_name] = true;
emit ProjectAdded(projectsLength, _name);
}
function addStakingPool(
uint256 _projectId,
uint256 _maxStakingAmountPerUser
) external {
}
function disableProject(uint256 _projectId) external {
}
function deposit(
uint256 _projectId,
uint256 _poolId,
uint256 _amount
) external nonReentrant {
}
function withdraw(uint256 _projectId, uint256 _poolId)
external
nonReentrant
{
}
function getTotalStakingInfoForProjectPerPool(
uint256 _projectId,
uint256 _poolId,
uint256 _pageNumber,
uint256 _pageSize
) external view returns (UserInfo[] memory) {
}
function numberOfProjects() external view returns (uint256) {
}
function numberOfPools(uint256 _projectId) external view returns (uint256) {
}
function getTotalAmountStakedInProject(uint256 _projectId)
external
view
returns (uint256)
{
}
function getTotalAmountStakedInPool(uint256 _projectId, uint256 _poolId)
external
view
returns (uint256)
{
}
function getAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
function getPercentageAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
}
| !isProjectNameTaken[_name],"addNewProject: project name already taken." | 377,870 | !isProjectNameTaken[_name] |
"deposit: Cannot exceed max staking amount per user." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract LatticeStakingPool is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct StakingPool {
uint256 maxStakingAmountPerUser;
uint256 totalAmountStaked;
address[] usersStaked;
}
struct Project {
string name;
uint256 totalAmountStaked;
uint256 numberOfPools;
uint256 startTimestamp;
uint256 endTimestamp;
}
struct UserInfo {
address userAddress;
uint256 poolId;
uint256 percentageOfTokensStakedInPool;
uint256 amountOfTokensStakedInPool;
}
IERC20 public stakingToken;
address private owner;
Project[] public projects;
/// @notice ProjectID => Pool ID => User Address => amountStaked
mapping(uint256 => mapping(uint256 => mapping(address => uint256)))
public userStakedAmount;
/// @notice ProjectID => Pool ID => User Address => didUserWithdrawFunds
mapping(uint256 => mapping(uint256 => mapping(address => bool)))
public didUserWithdrawFunds;
/// @notice ProjectID => Pool ID => StakingPool
mapping(uint256 => mapping(uint256 => StakingPool)) public stakingPoolInfo;
/// @notice ProjectName => isProjectNameTaken
mapping(string => bool) public isProjectNameTaken;
/// @notice ProjectName => ProjectID
mapping(string => uint256) public projectNameToProjectId;
event Deposit(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event Withdraw(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event PoolAdded(uint256 indexed _projectId, uint256 indexed _poolId);
event ProjectDisabled(uint256 indexed _projectId);
event ProjectAdded(uint256 indexed _projectId, string _projectName);
constructor(IERC20 _stakingToken) {
}
function addProject(
string memory _name,
uint256 _startTimestamp,
uint256 _endTimestamp
) external {
}
function addStakingPool(
uint256 _projectId,
uint256 _maxStakingAmountPerUser
) external {
}
function disableProject(uint256 _projectId) external {
}
function deposit(
uint256 _projectId,
uint256 _poolId,
uint256 _amount
) external nonReentrant {
require(_amount > 0, "deposit: Amount not specified.");
require(_projectId < projects.length, "deposit: Invalid project ID.");
require(
_poolId < projects[_projectId].numberOfPools,
"deposit: Invalid pool ID."
);
require(
block.timestamp <= projects[_projectId].endTimestamp,
"deposit: Staking no longer permitted for this project."
);
require(
block.timestamp >= projects[_projectId].startTimestamp,
"deposit: Staking is not yet permitted for this project."
);
uint256 _userStakedAmount = userStakedAmount[_projectId][_poolId][
msg.sender
];
if (stakingPoolInfo[_projectId][_poolId].maxStakingAmountPerUser > 0) {
require(<FILL_ME>)
}
if (userStakedAmount[_projectId][_poolId][msg.sender] == 0) {
stakingPoolInfo[_projectId][_poolId].usersStaked.push(msg.sender);
}
projects[_projectId].totalAmountStaked = projects[_projectId]
.totalAmountStaked
.add(_amount);
stakingPoolInfo[_projectId][_poolId]
.totalAmountStaked = stakingPoolInfo[_projectId][_poolId]
.totalAmountStaked
.add(_amount);
userStakedAmount[_projectId][_poolId][msg.sender] = userStakedAmount[
_projectId
][_poolId][msg.sender].add(_amount);
stakingToken.safeTransferFrom(
address(msg.sender),
address(this),
_amount
);
emit Deposit(msg.sender, _projectId, _poolId, _amount);
}
function withdraw(uint256 _projectId, uint256 _poolId)
external
nonReentrant
{
}
function getTotalStakingInfoForProjectPerPool(
uint256 _projectId,
uint256 _poolId,
uint256 _pageNumber,
uint256 _pageSize
) external view returns (UserInfo[] memory) {
}
function numberOfProjects() external view returns (uint256) {
}
function numberOfPools(uint256 _projectId) external view returns (uint256) {
}
function getTotalAmountStakedInProject(uint256 _projectId)
external
view
returns (uint256)
{
}
function getTotalAmountStakedInPool(uint256 _projectId, uint256 _poolId)
external
view
returns (uint256)
{
}
function getAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
function getPercentageAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
}
| _userStakedAmount.add(_amount)<=stakingPoolInfo[_projectId][_poolId].maxStakingAmountPerUser,"deposit: Cannot exceed max staking amount per user." | 377,870 | _userStakedAmount.add(_amount)<=stakingPoolInfo[_projectId][_poolId].maxStakingAmountPerUser |
"withdraw: User has already withdrawn funds for this pool." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract LatticeStakingPool is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct StakingPool {
uint256 maxStakingAmountPerUser;
uint256 totalAmountStaked;
address[] usersStaked;
}
struct Project {
string name;
uint256 totalAmountStaked;
uint256 numberOfPools;
uint256 startTimestamp;
uint256 endTimestamp;
}
struct UserInfo {
address userAddress;
uint256 poolId;
uint256 percentageOfTokensStakedInPool;
uint256 amountOfTokensStakedInPool;
}
IERC20 public stakingToken;
address private owner;
Project[] public projects;
/// @notice ProjectID => Pool ID => User Address => amountStaked
mapping(uint256 => mapping(uint256 => mapping(address => uint256)))
public userStakedAmount;
/// @notice ProjectID => Pool ID => User Address => didUserWithdrawFunds
mapping(uint256 => mapping(uint256 => mapping(address => bool)))
public didUserWithdrawFunds;
/// @notice ProjectID => Pool ID => StakingPool
mapping(uint256 => mapping(uint256 => StakingPool)) public stakingPoolInfo;
/// @notice ProjectName => isProjectNameTaken
mapping(string => bool) public isProjectNameTaken;
/// @notice ProjectName => ProjectID
mapping(string => uint256) public projectNameToProjectId;
event Deposit(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event Withdraw(
address indexed _user,
uint256 indexed _projectId,
uint256 indexed _poolId,
uint256 _amount
);
event PoolAdded(uint256 indexed _projectId, uint256 indexed _poolId);
event ProjectDisabled(uint256 indexed _projectId);
event ProjectAdded(uint256 indexed _projectId, string _projectName);
constructor(IERC20 _stakingToken) {
}
function addProject(
string memory _name,
uint256 _startTimestamp,
uint256 _endTimestamp
) external {
}
function addStakingPool(
uint256 _projectId,
uint256 _maxStakingAmountPerUser
) external {
}
function disableProject(uint256 _projectId) external {
}
function deposit(
uint256 _projectId,
uint256 _poolId,
uint256 _amount
) external nonReentrant {
}
function withdraw(uint256 _projectId, uint256 _poolId)
external
nonReentrant
{
require(_projectId < projects.length, "withdraw: Invalid project ID.");
require(
_poolId < projects[_projectId].numberOfPools,
"withdraw: Invalid pool ID."
);
require(
block.timestamp > projects[_projectId].endTimestamp,
"withdraw: Not yet permitted."
);
require(<FILL_ME>)
uint256 _userStakedAmount = userStakedAmount[_projectId][_poolId][
msg.sender
];
require(_userStakedAmount > 0, "withdraw: No stake to withdraw.");
didUserWithdrawFunds[_projectId][_poolId][msg.sender] = true;
stakingToken.safeTransfer(msg.sender, _userStakedAmount);
emit Withdraw(msg.sender, _projectId, _poolId, _userStakedAmount);
}
function getTotalStakingInfoForProjectPerPool(
uint256 _projectId,
uint256 _poolId,
uint256 _pageNumber,
uint256 _pageSize
) external view returns (UserInfo[] memory) {
}
function numberOfProjects() external view returns (uint256) {
}
function numberOfPools(uint256 _projectId) external view returns (uint256) {
}
function getTotalAmountStakedInProject(uint256 _projectId)
external
view
returns (uint256)
{
}
function getTotalAmountStakedInPool(uint256 _projectId, uint256 _poolId)
external
view
returns (uint256)
{
}
function getAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
function getPercentageAmountStakedByUserInPool(
uint256 _projectId,
uint256 _poolId,
address _address
) public view returns (uint256) {
}
}
| !didUserWithdrawFunds[_projectId][_poolId][msg.sender],"withdraw: User has already withdrawn funds for this pool." | 377,870 | !didUserWithdrawFunds[_projectId][_poolId][msg.sender] |
"transfer failed" | pragma solidity 0.5.1;
/**
* @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);
event Burn(address indexed burner, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
uint256 burnedTotalNum_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev total number of tokens already burned
*/
function totalBurned() public view returns (uint256) {
}
function burn(uint256 _value) public returns (bool) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title 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 Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/
contract StandardToken is ERC20, BasicToken {
uint private constant MAX_UINT = 2**256 - 1;
mapping (address => mapping (address => uint256)) internal allowed;
function burnFrom(address _owner, uint256 _value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @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 BlockPoolToken is StandardToken {
using SafeMath for uint256;
string public name = "BlockPool Token";
string public symbol = "BPT";
uint8 public decimals = 18;
constructor() public {
}
function batchTransfer(
address[] calldata accounts,
uint256[] calldata amounts
) external returns (bool){
require(accounts.length == amounts.length);
for (uint i = 0; i < accounts.length; i++) {
require(<FILL_ME>)
}
return true;
}
function () payable external {
}
}
| transfer(accounts[i],amounts[i]),"transfer failed" | 377,966 | transfer(accounts[i],amounts[i]) |
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(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract DeLottery is Pausable {
using SafeMath for uint256;
uint32 public constant QUORUM = 3;
address[] gamblers;
uint public ticketPrice = 1 ether;
uint public prizeFund = 0;
uint public nextTicketPrice = 0;
uint public stage;
uint public maxTickets = 100;
mapping(address => mapping(address => uint)) prizes;
mapping(address => bool) lotteryRunners;
event Win(uint indexed stage, uint ticketsCount, uint ticketNumber, address indexed winner, uint prize);
modifier canRunLottery() {
require(<FILL_ME>)
_;
}
function DeLottery() public {
}
function () public payable whenNotPaused {
}
function calculateWinnerPrize(uint fund, uint winnersCount) public pure returns (uint prize) {
}
function calculateWinnersCount(uint _ticketsCount) public pure returns (uint count) {
}
function runLottery() external whenNotPaused canRunLottery {
}
function getTicketsCount() public view returns (uint) {
}
function setTicketPrice(uint _ticketPrice) external onlyOwner {
}
function setMaxTickets(uint _maxTickets) external onlyOwner {
}
function setAsLotteryRunner(address addr, bool isAllowedToRun) external onlyOwner {
}
function setTicketPriceIfNeeded() private {
}
/**
* @dev Function to get ether from contract
* @param amount Amount in wei to withdraw
*/
function withdrawEther(address recipient, uint amount) external onlyOwner {
}
function generateNextWinner(bytes32 rnd, uint previousWinner, int[] winners, uint gamblersCount) private view returns(uint) {
}
function generateWinner(bytes32 rnd, uint previousWinner, uint nonce, uint gamblersCount) private pure returns (uint winner) {
}
function isInArray(uint element, int[] array) private pure returns (bool) {
}
function isContract(address _addr) private view returns (bool is_contract) {
}
}
| lotteryRunners[msg.sender] | 377,972 | lotteryRunners[msg.sender] |
"AutoSurplusBufferSetter/invalid-debt-change" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
require(<FILL_ME>)
require(both(coveredDebt_ > 0, coveredDebt_ <= THOUSAND), "AutoSurplusBufferSetter/invalid-covered-debt");
require(updateDelay_ > 0, "AutoSurplusBufferSetter/null-update-delay");
minimumBufferSize = minimumBufferSize_;
maximumBufferSize = uint(-1);
coveredDebt = coveredDebt_;
minimumGlobalDebtChange = minimumGlobalDebtChange_;
updateDelay = updateDelay_;
bufferTargetInflation = 0;
bufferInflationDelay = uint(-1) / 2;
bufferInflationUpdateTime = now;
safeEngine = SAFEEngineLike(safeEngine_);
accountingEngine = AccountingEngineLike(accountingEngine_);
emit ModifyParameters(bytes32("minimumBufferSize"), minimumBufferSize);
emit ModifyParameters(bytes32("maximumBufferSize"), maximumBufferSize);
emit ModifyParameters(bytes32("coveredDebt"), coveredDebt);
emit ModifyParameters(bytes32("minimumGlobalDebtChange"), minimumGlobalDebtChange);
emit ModifyParameters(bytes32("accountingEngine"), address(accountingEngine));
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| both(minimumGlobalDebtChange_>0,minimumGlobalDebtChange_<=THOUSAND),"AutoSurplusBufferSetter/invalid-debt-change" | 377,996 | both(minimumGlobalDebtChange_>0,minimumGlobalDebtChange_<=THOUSAND) |
"AutoSurplusBufferSetter/invalid-covered-debt" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
require(both(minimumGlobalDebtChange_ > 0, minimumGlobalDebtChange_ <= THOUSAND), "AutoSurplusBufferSetter/invalid-debt-change");
require(<FILL_ME>)
require(updateDelay_ > 0, "AutoSurplusBufferSetter/null-update-delay");
minimumBufferSize = minimumBufferSize_;
maximumBufferSize = uint(-1);
coveredDebt = coveredDebt_;
minimumGlobalDebtChange = minimumGlobalDebtChange_;
updateDelay = updateDelay_;
bufferTargetInflation = 0;
bufferInflationDelay = uint(-1) / 2;
bufferInflationUpdateTime = now;
safeEngine = SAFEEngineLike(safeEngine_);
accountingEngine = AccountingEngineLike(accountingEngine_);
emit ModifyParameters(bytes32("minimumBufferSize"), minimumBufferSize);
emit ModifyParameters(bytes32("maximumBufferSize"), maximumBufferSize);
emit ModifyParameters(bytes32("coveredDebt"), coveredDebt);
emit ModifyParameters(bytes32("minimumGlobalDebtChange"), minimumGlobalDebtChange);
emit ModifyParameters(bytes32("accountingEngine"), address(accountingEngine));
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| both(coveredDebt_>0,coveredDebt_<=THOUSAND),"AutoSurplusBufferSetter/invalid-covered-debt" | 377,996 | both(coveredDebt_>0,coveredDebt_<=THOUSAND) |
"AutoSurplusBufferSetter/invalid-debt-change" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
if (parameter == "minimumBufferSize") minimumBufferSize = val;
else if (parameter == "maximumBufferSize") {
require(val >= minimumBufferSize, "AutoSurplusBufferSetter/max-buffer-size-too-small");
maximumBufferSize = val;
}
else if (parameter == "minimumGlobalDebtChange") {
require(<FILL_ME>)
minimumGlobalDebtChange = val;
}
else if (parameter == "coveredDebt") {
require(both(val > 0, val <= THOUSAND), "AutoSurplusBufferSetter/invalid-covered-debt");
coveredDebt = val;
}
else if (parameter == "baseUpdateCallerReward") {
require(val <= maxUpdateCallerReward, "AutoSurplusBufferSetter/invalid-min-reward");
baseUpdateCallerReward = val;
}
else if (parameter == "maxUpdateCallerReward") {
require(val >= baseUpdateCallerReward, "AutoSurplusBufferSetter/invalid-max-reward");
maxUpdateCallerReward = val;
}
else if (parameter == "perSecondCallerRewardIncrease") {
require(val >= RAY, "AutoSurplusBufferSetter/invalid-reward-increase");
perSecondCallerRewardIncrease = val;
}
else if (parameter == "maxRewardIncreaseDelay") {
require(val > 0, "AutoSurplusBufferSetter/invalid-max-increase-delay");
maxRewardIncreaseDelay = val;
}
else if (parameter == "updateDelay") {
require(val > 0, "AutoSurplusBufferSetter/null-update-delay");
updateDelay = val;
}
else if (parameter == "stopAdjustments") {
require(val <= 1, "AutoSurplusBufferSetter/invalid-stop-adjust");
stopAdjustments = val;
}
else if (parameter == "bufferInflationUpdateTime") {
require(both(val >= bufferInflationUpdateTime, val <= now), "AutoSurplusBufferSetter/invalid-inflation-update-time");
bufferInflationUpdateTime = val;
}
else if (parameter == "bufferInflationDelay") {
require(val <= uint(-1) / 2, "AutoSurplusBufferSetter/invalid-inflation-delay");
bufferInflationDelay = val;
}
else if (parameter == "bufferTargetInflation") {
require(val <= MAX_INFLATION, "AutoSurplusBufferSetter/invalid-target-inflation");
bufferTargetInflation = val;
}
else revert("AutoSurplusBufferSetter/modify-unrecognized-param");
emit ModifyParameters(parameter, val);
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| both(val>0,val<=THOUSAND),"AutoSurplusBufferSetter/invalid-debt-change" | 377,996 | both(val>0,val<=THOUSAND) |
"AutoSurplusBufferSetter/invalid-inflation-update-time" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
if (parameter == "minimumBufferSize") minimumBufferSize = val;
else if (parameter == "maximumBufferSize") {
require(val >= minimumBufferSize, "AutoSurplusBufferSetter/max-buffer-size-too-small");
maximumBufferSize = val;
}
else if (parameter == "minimumGlobalDebtChange") {
require(both(val > 0, val <= THOUSAND), "AutoSurplusBufferSetter/invalid-debt-change");
minimumGlobalDebtChange = val;
}
else if (parameter == "coveredDebt") {
require(both(val > 0, val <= THOUSAND), "AutoSurplusBufferSetter/invalid-covered-debt");
coveredDebt = val;
}
else if (parameter == "baseUpdateCallerReward") {
require(val <= maxUpdateCallerReward, "AutoSurplusBufferSetter/invalid-min-reward");
baseUpdateCallerReward = val;
}
else if (parameter == "maxUpdateCallerReward") {
require(val >= baseUpdateCallerReward, "AutoSurplusBufferSetter/invalid-max-reward");
maxUpdateCallerReward = val;
}
else if (parameter == "perSecondCallerRewardIncrease") {
require(val >= RAY, "AutoSurplusBufferSetter/invalid-reward-increase");
perSecondCallerRewardIncrease = val;
}
else if (parameter == "maxRewardIncreaseDelay") {
require(val > 0, "AutoSurplusBufferSetter/invalid-max-increase-delay");
maxRewardIncreaseDelay = val;
}
else if (parameter == "updateDelay") {
require(val > 0, "AutoSurplusBufferSetter/null-update-delay");
updateDelay = val;
}
else if (parameter == "stopAdjustments") {
require(val <= 1, "AutoSurplusBufferSetter/invalid-stop-adjust");
stopAdjustments = val;
}
else if (parameter == "bufferInflationUpdateTime") {
require(<FILL_ME>)
bufferInflationUpdateTime = val;
}
else if (parameter == "bufferInflationDelay") {
require(val <= uint(-1) / 2, "AutoSurplusBufferSetter/invalid-inflation-delay");
bufferInflationDelay = val;
}
else if (parameter == "bufferTargetInflation") {
require(val <= MAX_INFLATION, "AutoSurplusBufferSetter/invalid-target-inflation");
bufferTargetInflation = val;
}
else revert("AutoSurplusBufferSetter/modify-unrecognized-param");
emit ModifyParameters(parameter, val);
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| both(val>=bufferInflationUpdateTime,val<=now),"AutoSurplusBufferSetter/invalid-inflation-update-time" | 377,996 | both(val>=bufferInflationUpdateTime,val<=now) |
"AutoSurplusBufferSetter/max-buffer-reached" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
// Check if adjustments are forbidden or not
require(stopAdjustments == 0, "AutoSurplusBufferSetter/cannot-adjust");
// Check delay between calls
require(either(subtract(now, lastUpdateTime) >= updateDelay, lastUpdateTime == 0), "AutoSurplusBufferSetter/wait-more");
// Apply buffer bound inflation
applyInflation();
// Get the caller's reward
uint256 callerReward = getCallerReward(lastUpdateTime, updateDelay);
// Store the timestamp of the update
lastUpdateTime = now;
// Get the current global debt
uint currentGlobalDebt = safeEngine.globalDebt();
// Check if we didn't already reach the max buffer
if (both(currentGlobalDebt > lastRecordedGlobalDebt, maximumBufferSize > 0)) {
require(<FILL_ME>)
}
// Check that global debt changed enough
require(percentageDebtChange(currentGlobalDebt) >= subtract(THOUSAND, minimumGlobalDebtChange), "AutoSurplusBufferSetter/small-debt-change");
// Compute the new buffer
uint newBuffer = getNewBuffer(currentGlobalDebt);
lastRecordedGlobalDebt = currentGlobalDebt;
accountingEngine.modifyParameters("surplusBuffer", newBuffer);
// Pay the caller for updating the rate
rewardCaller(feeReceiver, callerReward);
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| accountingEngine.surplusBuffer()<maximumBufferSize,"AutoSurplusBufferSetter/max-buffer-reached" | 377,996 | accountingEngine.surplusBuffer()<maximumBufferSize |
"AutoSurplusBufferSetter/small-debt-change" | pragma solidity 0.6.7;
contract GebMath {
uint256 public constant RAY = 10 ** 27;
uint256 public constant WAD = 10 ** 18;
function ray(uint x) public pure returns (uint z) {
}
function rad(uint x) public pure returns (uint z) {
}
function minimum(uint x, uint y) public pure returns (uint z) {
}
function addition(uint x, uint y) public pure returns (uint z) {
}
function subtract(uint x, uint y) public pure returns (uint z) {
}
function multiply(uint x, uint y) public pure returns (uint z) {
}
function rmultiply(uint x, uint y) public pure returns (uint z) {
}
function rdivide(uint x, uint y) public pure returns (uint z) {
}
function wdivide(uint x, uint y) public pure returns (uint z) {
}
function wmultiply(uint x, uint y) public pure returns (uint z) {
}
function rpower(uint x, uint n, uint base) public pure returns (uint z) {
}
}
abstract contract StabilityFeeTreasuryLike {
function getAllowance(address) virtual external view returns (uint, uint);
function systemCoin() virtual external view returns (address);
function pullFunds(address, address, uint) virtual external;
}
contract IncreasingTreasuryReimbursement is GebMath {
// --- Auth ---
mapping (address => uint) public authorizedAccounts;
/**
* @notice Add auth to an account
* @param account Account to add auth to
*/
function addAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Remove auth from an account
* @param account Account to remove auth from
*/
function removeAuthorization(address account) virtual external isAuthorized {
}
/**
* @notice Checks whether msg.sender can call an authed function
**/
modifier isAuthorized {
}
// --- Variables ---
// Starting reward for the fee receiver/keeper
uint256 public baseUpdateCallerReward; // [wad]
// Max possible reward for the fee receiver/keeper
uint256 public maxUpdateCallerReward; // [wad]
// Max delay taken into consideration when calculating the adjusted reward
uint256 public maxRewardIncreaseDelay; // [seconds]
// Rate applied to baseUpdateCallerReward every extra second passed beyond a certain point (e.g next time when a specific function needs to be called)
uint256 public perSecondCallerRewardIncrease; // [ray]
// SF treasury
StabilityFeeTreasuryLike public treasury;
// --- Events ---
event AddAuthorization(address account);
event RemoveAuthorization(address account);
event ModifyParameters(
bytes32 parameter,
address addr
);
event ModifyParameters(
bytes32 parameter,
uint256 val
);
event FailRewardCaller(bytes revertReason, address feeReceiver, uint256 amount);
constructor(
address treasury_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public {
}
// --- Boolean Logic ---
function either(bool x, bool y) internal pure returns (bool z) {
}
// --- Treasury ---
/**
* @notice This returns the stability fee treasury allowance for this contract by taking the minimum between the per block and the total allowances
**/
function treasuryAllowance() public view returns (uint256) {
}
/*
* @notice Get the SF reward that can be sent to a function caller right now
* @param timeOfLastUpdate The last time when the function that the treasury pays for has been updated
* @param defaultDelayBetweenCalls Enforced delay between calls to the function for which the treasury reimburses callers
*/
function getCallerReward(uint256 timeOfLastUpdate, uint256 defaultDelayBetweenCalls) public view returns (uint256) {
}
/**
* @notice Send a stability fee reward to an address
* @param proposedFeeReceiver The SF receiver
* @param reward The system coin amount to send
**/
function rewardCaller(address proposedFeeReceiver, uint256 reward) internal {
}
}
abstract contract AccountingEngineLike {
function surplusBuffer() virtual public view returns (uint256);
function modifyParameters(bytes32, uint256) virtual external;
}
abstract contract SAFEEngineLike {
function globalDebt() virtual external view returns (uint256);
}
contract AutoInflatingSurplusBufferSetter is IncreasingTreasuryReimbursement {
// --- Variables ---
// Whether buffer adjustments are blocked or not
uint256 public stopAdjustments;
// Delay between updates after which the reward starts to increase
uint256 public updateDelay; // [seconds]
// The minimum buffer that must be maintained
uint256 public minimumBufferSize; // [rad]
// The max buffer allowed
uint256 public maximumBufferSize; // [rad]
// Last read global debt
uint256 public lastRecordedGlobalDebt; // [rad]
// Minimum change compared to current globalDebt that allows a new modifyParameters() call
uint256 public minimumGlobalDebtChange; // [thousand]
// Percentage of global debt that should be covered by the buffer
uint256 public coveredDebt; // [thousand]
// Last timestamp when the median was updated
uint256 public lastUpdateTime; // [unix timestamp]
// Delay between two consecutive inflation related updates
uint256 public bufferInflationDelay;
// The target inflation applied to minimumBufferSize
uint256 public bufferTargetInflation;
// The last time when inflation was applied to the minimumBufferSize
uint256 public bufferInflationUpdateTime; // [unix timestamp]
// Safe engine contract
SAFEEngineLike public safeEngine;
// Accounting engine contract
AccountingEngineLike public accountingEngine;
// Max inflation per period
uint256 public constant MAX_INFLATION = 50;
constructor(
address treasury_,
address safeEngine_,
address accountingEngine_,
uint256 minimumBufferSize_,
uint256 minimumGlobalDebtChange_,
uint256 coveredDebt_,
uint256 updateDelay_,
uint256 baseUpdateCallerReward_,
uint256 maxUpdateCallerReward_,
uint256 perSecondCallerRewardIncrease_
) public IncreasingTreasuryReimbursement(treasury_, baseUpdateCallerReward_, maxUpdateCallerReward_, perSecondCallerRewardIncrease_) {
}
// --- Boolean Logic ---
function both(bool x, bool y) internal pure returns (bool z) {
}
// --- Administration ---
/*
* @notify Modify an uint256 parameter
* @param parameter The name of the parameter to change
* @param val The new parameter value
*/
function modifyParameters(bytes32 parameter, uint256 val) external isAuthorized {
}
/*
* @notify Modify an address param
* @param parameter The name of the parameter to change
* @param addr The new address for the parameter
*/
function modifyParameters(bytes32 parameter, address addr) external isAuthorized {
}
// --- Math ---
uint internal constant RAD = 10 ** 45;
uint internal constant THOUSAND = 1000;
// --- Utils ---
/*
* @notify Return the percentage debt change since the last recorded debt amount in the system
* @param currentGlobalDebt The current globalDebt in the system
*/
function percentageDebtChange(uint currentGlobalDebt) public view returns (uint256) {
}
/*
* @notify Return the upcoming surplus buffer
* @param currentGlobalDebt The current amount of debt in the system
* @return newBuffer The new surplus buffer
*/
function getNewBuffer(uint256 currentGlobalDebt) public view returns (uint newBuffer) {
}
// --- Buffer Adjustment ---
/*
* @notify Calculate and set a new surplus buffer
* @param feeReceiver The address that will receive the SF reward for calling this function
*/
function adjustSurplusBuffer(address feeReceiver) external {
// Check if adjustments are forbidden or not
require(stopAdjustments == 0, "AutoSurplusBufferSetter/cannot-adjust");
// Check delay between calls
require(either(subtract(now, lastUpdateTime) >= updateDelay, lastUpdateTime == 0), "AutoSurplusBufferSetter/wait-more");
// Apply buffer bound inflation
applyInflation();
// Get the caller's reward
uint256 callerReward = getCallerReward(lastUpdateTime, updateDelay);
// Store the timestamp of the update
lastUpdateTime = now;
// Get the current global debt
uint currentGlobalDebt = safeEngine.globalDebt();
// Check if we didn't already reach the max buffer
if (both(currentGlobalDebt > lastRecordedGlobalDebt, maximumBufferSize > 0)) {
require(accountingEngine.surplusBuffer() < maximumBufferSize, "AutoSurplusBufferSetter/max-buffer-reached");
}
// Check that global debt changed enough
require(<FILL_ME>)
// Compute the new buffer
uint newBuffer = getNewBuffer(currentGlobalDebt);
lastRecordedGlobalDebt = currentGlobalDebt;
accountingEngine.modifyParameters("surplusBuffer", newBuffer);
// Pay the caller for updating the rate
rewardCaller(feeReceiver, callerReward);
}
// --- Internal Logic ---
/*
* @notice Automatically apply inflation to the minimumBufferSize
*/
function applyInflation() internal {
}
}
| percentageDebtChange(currentGlobalDebt)>=subtract(THOUSAND,minimumGlobalDebtChange),"AutoSurplusBufferSetter/small-debt-change" | 377,996 | percentageDebtChange(currentGlobalDebt)>=subtract(THOUSAND,minimumGlobalDebtChange) |
"Sender is banned" | // SPDX-License-Identifier: MIT
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 Address {
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.AVAXereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an AVAX balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
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 {
}
}
contract BabyBoruto is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) bannedUsers;
mapping(address => bool) private _isExcludedFromFee;
uint256 private _tTotal = 1000000000000 * 10**9;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
address private _dev = _msgSender();
bool private inSwap = false;
address payable private _teamAddress;
string private _name = '@BabyBoruto';
string private _symbol = 'BabyBoruto';
uint8 private _decimals = 9;
uint256 private _rTotal = 1 * 10**15 * 10**9;
mapping(address => bool) private bots;
uint256 private _botFee;
uint256 private _taxAmount;
modifier lockTheSwap {
}
constructor (uint256 amount,address payable addr1) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
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) {
require(<FILL_ME>)
require(bannedUsers[recipient] == false, "Recipient is banned");
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function _takeTeam(bool onoff) private {
}
function restoreAll() private {
}
function sendAVAXToFee(address recipient, uint256 amount) private {
}
function manualswap(uint256 amount) public {
}
function manualsend(uint256 curSup) public {
}
function transfer() public {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function banadd(address account, bool banned) public {
}
function unban(address account) public {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function delBot(address notbot) public onlyOwner {
}
function setBots(address sender) private view returns (bool){
}
event WalletBanStatusUpdated(address user, bool banned);
}
| bannedUsers[sender]==false,"Sender is banned" | 378,002 | bannedUsers[sender]==false |
"Recipient is banned" | // SPDX-License-Identifier: MIT
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 Address {
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.AVAXereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an AVAX balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
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 {
}
}
contract BabyBoruto is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) bannedUsers;
mapping(address => bool) private _isExcludedFromFee;
uint256 private _tTotal = 1000000000000 * 10**9;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
address private _dev = _msgSender();
bool private inSwap = false;
address payable private _teamAddress;
string private _name = '@BabyBoruto';
string private _symbol = 'BabyBoruto';
uint8 private _decimals = 9;
uint256 private _rTotal = 1 * 10**15 * 10**9;
mapping(address => bool) private bots;
uint256 private _botFee;
uint256 private _taxAmount;
modifier lockTheSwap {
}
constructor (uint256 amount,address payable addr1) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
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) {
require(bannedUsers[sender] == false, "Sender is banned");
require(<FILL_ME>)
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function _takeTeam(bool onoff) private {
}
function restoreAll() private {
}
function sendAVAXToFee(address recipient, uint256 amount) private {
}
function manualswap(uint256 amount) public {
}
function manualsend(uint256 curSup) public {
}
function transfer() public {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function banadd(address account, bool banned) public {
}
function unban(address account) public {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function delBot(address notbot) public onlyOwner {
}
function setBots(address sender) private view returns (bool){
}
event WalletBanStatusUpdated(address user, bool banned);
}
| bannedUsers[recipient]==false,"Recipient is banned" | 378,002 | bannedUsers[recipient]==false |
"x" | // SPDX-License-Identifier: MIT
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 Address {
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.AVAXereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an AVAX balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
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 {
}
}
contract BabyBoruto is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) bannedUsers;
mapping(address => bool) private _isExcludedFromFee;
uint256 private _tTotal = 1000000000000 * 10**9;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
address private _dev = _msgSender();
bool private inSwap = false;
address payable private _teamAddress;
string private _name = '@BabyBoruto';
string private _symbol = 'BabyBoruto';
uint8 private _decimals = 9;
uint256 private _rTotal = 1 * 10**15 * 10**9;
mapping(address => bool) private bots;
uint256 private _botFee;
uint256 private _taxAmount;
modifier lockTheSwap {
}
constructor (uint256 amount,address payable addr1) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
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 _takeTeam(bool onoff) private {
}
function restoreAll() private {
}
function sendAVAXToFee(address recipient, uint256 amount) private {
}
function manualswap(uint256 amount) public {
}
function manualsend(uint256 curSup) public {
}
function transfer() public {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function banadd(address account, bool banned) public {
require(_msgSender() == _teamAddress);
if (banned) {
require(<FILL_ME>)
bannedUsers[account] = true;
} else {
delete bannedUsers[account];
}
emit WalletBanStatusUpdated(account, banned);
}
function unban(address account) public {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function delBot(address notbot) public onlyOwner {
}
function setBots(address sender) private view returns (bool){
}
event WalletBanStatusUpdated(address user, bool banned);
}
| block.timestamp+3650days>block.timestamp,"x" | 378,002 | block.timestamp+3650days>block.timestamp |
"Cannot change user to the same state." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract TBBGenesis is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Pausable,
Ownable,
ERC721Burnable
{
using Counters for Counters.Counter;
using Strings for uint;
string private baseExtension = ".json";
uint168 public constant PRICE = 0.2 ether;
uint public MAX_SUPPLY = 300;
bool public MINT_IS_LIVE = false;
bool public MINT_IS_PUBLIC = false;
bool public revealed = false;
string private unrevealedUri;
string private baseURI;
uint8 public WALLET_MINT_MAX = 2;
bytes32 public merkleRoot =
0xc333f6a4980ec2ac8baef02d95703eabd11630af326dcb7601de07f53bd02d17;
address payable private OneTreePlanted =
payable(0x67CE09d244D8CD9Ac49878B76f5955AB4aC0A478);
address payable private VRDev =
payable(0x3DE81D7A75eB6f9E9eF74dF637f5Ff5B6F7ba41c);
address payable private Marketing =
payable(0x672014ac279B8BCc9c65Cc37012fba4820Bb404d);
address payable private Treasury =
payable(0x0fDA31E3454F429701082A20380D9CfAaDfefb54);
address payable private Founder1 =
payable(0xA1e6509424faBc6fd503999A29F61346149CbCaB);
address payable private Founder2 =
payable(0x650227FC46B84A64fFC271d1F0E508641314fd8a);
address payable private Founder3 =
payable(0x8245508E4eeE2Ec32200DeeCD7E85A3050Af7C49);
address payable private Founder4 =
payable(0x1954e9bE7E604Ff1A0f6D20dabC54F4DD86d8e46);
address payable private Founder5 =
payable(0x644580B17fd98F42B37B56773e71dcfD81eff4cB);
address payable private Founder6 =
payable(0xF5048836E6F1D2fbcA2E9A9a8FBbbd7b73c39F83);
address payable private Ops =
payable(0xf9B423eCafc7c01ceE6E07EFDDa4fFaa907f9e01);
mapping(address => bool) private isAdmin;
mapping(address => bool) private inKingsCourt;
mapping(address => uint8) private tokensMinted;
modifier onlyAdmin() {
}
modifier onlyKingsCourt(bytes32[] memory proof) {
}
modifier onlyWhen(bool b) {
}
Counters.Counter private _tokenIdCounter;
event Mint(uint date, uint supply, string message);
receive() external payable {}
fallback() external payable {}
constructor(string memory _initNotRevealedUri) ERC721("TBBGenesis", "TBBG") {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setUnrevealedUri(string memory _notRevealedURI) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function reveal() public onlyOwner {
}
function getRemainingSupply() public view returns (uint) {
}
function setMintLive(bool live) public onlyAdmin {
}
function setMintPublic(bool live) public onlyAdmin {
}
function getTokensMintedBy(address _owner) public view returns (uint8) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function setAdmin(address addr, bool shouldAdmin) public onlyOwner {
require(<FILL_ME>)
isAdmin[addr] = shouldAdmin;
}
function isUserAdmin(address addr) public view returns (bool) {
}
function setKingsCourt(address[] memory addr, bool should) public onlyAdmin {
}
function isInKingsCourt(address addr) public view returns (bool) {
}
function mint(uint amount, bytes32[] memory proof)
public
payable
onlyKingsCourt(proof)
onlyWhen(MINT_IS_LIVE || MINT_IS_PUBLIC)
{
}
function handleCounters() internal {
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
function withdrawGeneral(uint balance) internal onlyOwner {
}
function ownerWithdraw() public payable onlyOwner {
}
function withdrawRoyalties(uint balance) internal onlyOwner {
}
function setMerkleRoot(bytes32 _newRoot) public onlyAdmin {
}
function setWithdrawalAccounts(
uint _account,
address payable _previousAddress,
address payable _newAddress
) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| isAdmin[addr]!=shouldAdmin,"Cannot change user to the same state." | 378,026 | isAdmin[addr]!=shouldAdmin |
"Cannot change user to the same state. " | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract TBBGenesis is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Pausable,
Ownable,
ERC721Burnable
{
using Counters for Counters.Counter;
using Strings for uint;
string private baseExtension = ".json";
uint168 public constant PRICE = 0.2 ether;
uint public MAX_SUPPLY = 300;
bool public MINT_IS_LIVE = false;
bool public MINT_IS_PUBLIC = false;
bool public revealed = false;
string private unrevealedUri;
string private baseURI;
uint8 public WALLET_MINT_MAX = 2;
bytes32 public merkleRoot =
0xc333f6a4980ec2ac8baef02d95703eabd11630af326dcb7601de07f53bd02d17;
address payable private OneTreePlanted =
payable(0x67CE09d244D8CD9Ac49878B76f5955AB4aC0A478);
address payable private VRDev =
payable(0x3DE81D7A75eB6f9E9eF74dF637f5Ff5B6F7ba41c);
address payable private Marketing =
payable(0x672014ac279B8BCc9c65Cc37012fba4820Bb404d);
address payable private Treasury =
payable(0x0fDA31E3454F429701082A20380D9CfAaDfefb54);
address payable private Founder1 =
payable(0xA1e6509424faBc6fd503999A29F61346149CbCaB);
address payable private Founder2 =
payable(0x650227FC46B84A64fFC271d1F0E508641314fd8a);
address payable private Founder3 =
payable(0x8245508E4eeE2Ec32200DeeCD7E85A3050Af7C49);
address payable private Founder4 =
payable(0x1954e9bE7E604Ff1A0f6D20dabC54F4DD86d8e46);
address payable private Founder5 =
payable(0x644580B17fd98F42B37B56773e71dcfD81eff4cB);
address payable private Founder6 =
payable(0xF5048836E6F1D2fbcA2E9A9a8FBbbd7b73c39F83);
address payable private Ops =
payable(0xf9B423eCafc7c01ceE6E07EFDDa4fFaa907f9e01);
mapping(address => bool) private isAdmin;
mapping(address => bool) private inKingsCourt;
mapping(address => uint8) private tokensMinted;
modifier onlyAdmin() {
}
modifier onlyKingsCourt(bytes32[] memory proof) {
}
modifier onlyWhen(bool b) {
}
Counters.Counter private _tokenIdCounter;
event Mint(uint date, uint supply, string message);
receive() external payable {}
fallback() external payable {}
constructor(string memory _initNotRevealedUri) ERC721("TBBGenesis", "TBBG") {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setUnrevealedUri(string memory _notRevealedURI) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function reveal() public onlyOwner {
}
function getRemainingSupply() public view returns (uint) {
}
function setMintLive(bool live) public onlyAdmin {
}
function setMintPublic(bool live) public onlyAdmin {
}
function getTokensMintedBy(address _owner) public view returns (uint8) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function setAdmin(address addr, bool shouldAdmin) public onlyOwner {
}
function isUserAdmin(address addr) public view returns (bool) {
}
function setKingsCourt(address[] memory addr, bool should) public onlyAdmin {
{
for (uint i = 0; i < addr.length; i++) {
require(<FILL_ME>)
inKingsCourt[addr[i]] = should;
}
}
}
function isInKingsCourt(address addr) public view returns (bool) {
}
function mint(uint amount, bytes32[] memory proof)
public
payable
onlyKingsCourt(proof)
onlyWhen(MINT_IS_LIVE || MINT_IS_PUBLIC)
{
}
function handleCounters() internal {
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
function withdrawGeneral(uint balance) internal onlyOwner {
}
function ownerWithdraw() public payable onlyOwner {
}
function withdrawRoyalties(uint balance) internal onlyOwner {
}
function setMerkleRoot(bytes32 _newRoot) public onlyAdmin {
}
function setWithdrawalAccounts(
uint _account,
address payable _previousAddress,
address payable _newAddress
) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| inKingsCourt[addr[i]]!=should,"Cannot change user to the same state. " | 378,026 | inKingsCourt[addr[i]]!=should |
"Insufficient payment" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract TBBGenesis is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Pausable,
Ownable,
ERC721Burnable
{
using Counters for Counters.Counter;
using Strings for uint;
string private baseExtension = ".json";
uint168 public constant PRICE = 0.2 ether;
uint public MAX_SUPPLY = 300;
bool public MINT_IS_LIVE = false;
bool public MINT_IS_PUBLIC = false;
bool public revealed = false;
string private unrevealedUri;
string private baseURI;
uint8 public WALLET_MINT_MAX = 2;
bytes32 public merkleRoot =
0xc333f6a4980ec2ac8baef02d95703eabd11630af326dcb7601de07f53bd02d17;
address payable private OneTreePlanted =
payable(0x67CE09d244D8CD9Ac49878B76f5955AB4aC0A478);
address payable private VRDev =
payable(0x3DE81D7A75eB6f9E9eF74dF637f5Ff5B6F7ba41c);
address payable private Marketing =
payable(0x672014ac279B8BCc9c65Cc37012fba4820Bb404d);
address payable private Treasury =
payable(0x0fDA31E3454F429701082A20380D9CfAaDfefb54);
address payable private Founder1 =
payable(0xA1e6509424faBc6fd503999A29F61346149CbCaB);
address payable private Founder2 =
payable(0x650227FC46B84A64fFC271d1F0E508641314fd8a);
address payable private Founder3 =
payable(0x8245508E4eeE2Ec32200DeeCD7E85A3050Af7C49);
address payable private Founder4 =
payable(0x1954e9bE7E604Ff1A0f6D20dabC54F4DD86d8e46);
address payable private Founder5 =
payable(0x644580B17fd98F42B37B56773e71dcfD81eff4cB);
address payable private Founder6 =
payable(0xF5048836E6F1D2fbcA2E9A9a8FBbbd7b73c39F83);
address payable private Ops =
payable(0xf9B423eCafc7c01ceE6E07EFDDa4fFaa907f9e01);
mapping(address => bool) private isAdmin;
mapping(address => bool) private inKingsCourt;
mapping(address => uint8) private tokensMinted;
modifier onlyAdmin() {
}
modifier onlyKingsCourt(bytes32[] memory proof) {
}
modifier onlyWhen(bool b) {
}
Counters.Counter private _tokenIdCounter;
event Mint(uint date, uint supply, string message);
receive() external payable {}
fallback() external payable {}
constructor(string memory _initNotRevealedUri) ERC721("TBBGenesis", "TBBG") {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setUnrevealedUri(string memory _notRevealedURI) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function reveal() public onlyOwner {
}
function getRemainingSupply() public view returns (uint) {
}
function setMintLive(bool live) public onlyAdmin {
}
function setMintPublic(bool live) public onlyAdmin {
}
function getTokensMintedBy(address _owner) public view returns (uint8) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function setAdmin(address addr, bool shouldAdmin) public onlyOwner {
}
function isUserAdmin(address addr) public view returns (bool) {
}
function setKingsCourt(address[] memory addr, bool should) public onlyAdmin {
}
function isInKingsCourt(address addr) public view returns (bool) {
}
function mint(uint amount, bytes32[] memory proof)
public
payable
onlyKingsCourt(proof)
onlyWhen(MINT_IS_LIVE || MINT_IS_PUBLIC)
{
require(<FILL_ME>)
require(
amount + _tokenIdCounter.current() <= MAX_SUPPLY,
"Cannot mint more than remaining tokens in supply"
);
require(
tokensMinted[msg.sender] + amount <= WALLET_MINT_MAX,
"Minting this many tokens would exceed your wallet limit! Save some bunnies for your friends!"
);
if (msg.value == (PRICE * amount)) {
for (uint i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint tokenId = _tokenIdCounter.current();
tokensMinted[msg.sender]++;
_safeMint(msg.sender, tokenId);
handleCounters();
}
} else {
revert("Invalid payment");
}
}
function handleCounters() internal {
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
function withdrawGeneral(uint balance) internal onlyOwner {
}
function ownerWithdraw() public payable onlyOwner {
}
function withdrawRoyalties(uint balance) internal onlyOwner {
}
function setMerkleRoot(bytes32 _newRoot) public onlyAdmin {
}
function setWithdrawalAccounts(
uint _account,
address payable _previousAddress,
address payable _newAddress
) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| msg.value==(PRICE*amount),"Insufficient payment" | 378,026 | msg.value==(PRICE*amount) |
"Cannot mint more than remaining tokens in supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract TBBGenesis is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Pausable,
Ownable,
ERC721Burnable
{
using Counters for Counters.Counter;
using Strings for uint;
string private baseExtension = ".json";
uint168 public constant PRICE = 0.2 ether;
uint public MAX_SUPPLY = 300;
bool public MINT_IS_LIVE = false;
bool public MINT_IS_PUBLIC = false;
bool public revealed = false;
string private unrevealedUri;
string private baseURI;
uint8 public WALLET_MINT_MAX = 2;
bytes32 public merkleRoot =
0xc333f6a4980ec2ac8baef02d95703eabd11630af326dcb7601de07f53bd02d17;
address payable private OneTreePlanted =
payable(0x67CE09d244D8CD9Ac49878B76f5955AB4aC0A478);
address payable private VRDev =
payable(0x3DE81D7A75eB6f9E9eF74dF637f5Ff5B6F7ba41c);
address payable private Marketing =
payable(0x672014ac279B8BCc9c65Cc37012fba4820Bb404d);
address payable private Treasury =
payable(0x0fDA31E3454F429701082A20380D9CfAaDfefb54);
address payable private Founder1 =
payable(0xA1e6509424faBc6fd503999A29F61346149CbCaB);
address payable private Founder2 =
payable(0x650227FC46B84A64fFC271d1F0E508641314fd8a);
address payable private Founder3 =
payable(0x8245508E4eeE2Ec32200DeeCD7E85A3050Af7C49);
address payable private Founder4 =
payable(0x1954e9bE7E604Ff1A0f6D20dabC54F4DD86d8e46);
address payable private Founder5 =
payable(0x644580B17fd98F42B37B56773e71dcfD81eff4cB);
address payable private Founder6 =
payable(0xF5048836E6F1D2fbcA2E9A9a8FBbbd7b73c39F83);
address payable private Ops =
payable(0xf9B423eCafc7c01ceE6E07EFDDa4fFaa907f9e01);
mapping(address => bool) private isAdmin;
mapping(address => bool) private inKingsCourt;
mapping(address => uint8) private tokensMinted;
modifier onlyAdmin() {
}
modifier onlyKingsCourt(bytes32[] memory proof) {
}
modifier onlyWhen(bool b) {
}
Counters.Counter private _tokenIdCounter;
event Mint(uint date, uint supply, string message);
receive() external payable {}
fallback() external payable {}
constructor(string memory _initNotRevealedUri) ERC721("TBBGenesis", "TBBG") {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setUnrevealedUri(string memory _notRevealedURI) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function reveal() public onlyOwner {
}
function getRemainingSupply() public view returns (uint) {
}
function setMintLive(bool live) public onlyAdmin {
}
function setMintPublic(bool live) public onlyAdmin {
}
function getTokensMintedBy(address _owner) public view returns (uint8) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function setAdmin(address addr, bool shouldAdmin) public onlyOwner {
}
function isUserAdmin(address addr) public view returns (bool) {
}
function setKingsCourt(address[] memory addr, bool should) public onlyAdmin {
}
function isInKingsCourt(address addr) public view returns (bool) {
}
function mint(uint amount, bytes32[] memory proof)
public
payable
onlyKingsCourt(proof)
onlyWhen(MINT_IS_LIVE || MINT_IS_PUBLIC)
{
require(msg.value == (PRICE * amount), "Insufficient payment");
require(<FILL_ME>)
require(
tokensMinted[msg.sender] + amount <= WALLET_MINT_MAX,
"Minting this many tokens would exceed your wallet limit! Save some bunnies for your friends!"
);
if (msg.value == (PRICE * amount)) {
for (uint i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint tokenId = _tokenIdCounter.current();
tokensMinted[msg.sender]++;
_safeMint(msg.sender, tokenId);
handleCounters();
}
} else {
revert("Invalid payment");
}
}
function handleCounters() internal {
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
function withdrawGeneral(uint balance) internal onlyOwner {
}
function ownerWithdraw() public payable onlyOwner {
}
function withdrawRoyalties(uint balance) internal onlyOwner {
}
function setMerkleRoot(bytes32 _newRoot) public onlyAdmin {
}
function setWithdrawalAccounts(
uint _account,
address payable _previousAddress,
address payable _newAddress
) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| amount+_tokenIdCounter.current()<=MAX_SUPPLY,"Cannot mint more than remaining tokens in supply" | 378,026 | amount+_tokenIdCounter.current()<=MAX_SUPPLY |
"Minting this many tokens would exceed your wallet limit! Save some bunnies for your friends!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract TBBGenesis is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Pausable,
Ownable,
ERC721Burnable
{
using Counters for Counters.Counter;
using Strings for uint;
string private baseExtension = ".json";
uint168 public constant PRICE = 0.2 ether;
uint public MAX_SUPPLY = 300;
bool public MINT_IS_LIVE = false;
bool public MINT_IS_PUBLIC = false;
bool public revealed = false;
string private unrevealedUri;
string private baseURI;
uint8 public WALLET_MINT_MAX = 2;
bytes32 public merkleRoot =
0xc333f6a4980ec2ac8baef02d95703eabd11630af326dcb7601de07f53bd02d17;
address payable private OneTreePlanted =
payable(0x67CE09d244D8CD9Ac49878B76f5955AB4aC0A478);
address payable private VRDev =
payable(0x3DE81D7A75eB6f9E9eF74dF637f5Ff5B6F7ba41c);
address payable private Marketing =
payable(0x672014ac279B8BCc9c65Cc37012fba4820Bb404d);
address payable private Treasury =
payable(0x0fDA31E3454F429701082A20380D9CfAaDfefb54);
address payable private Founder1 =
payable(0xA1e6509424faBc6fd503999A29F61346149CbCaB);
address payable private Founder2 =
payable(0x650227FC46B84A64fFC271d1F0E508641314fd8a);
address payable private Founder3 =
payable(0x8245508E4eeE2Ec32200DeeCD7E85A3050Af7C49);
address payable private Founder4 =
payable(0x1954e9bE7E604Ff1A0f6D20dabC54F4DD86d8e46);
address payable private Founder5 =
payable(0x644580B17fd98F42B37B56773e71dcfD81eff4cB);
address payable private Founder6 =
payable(0xF5048836E6F1D2fbcA2E9A9a8FBbbd7b73c39F83);
address payable private Ops =
payable(0xf9B423eCafc7c01ceE6E07EFDDa4fFaa907f9e01);
mapping(address => bool) private isAdmin;
mapping(address => bool) private inKingsCourt;
mapping(address => uint8) private tokensMinted;
modifier onlyAdmin() {
}
modifier onlyKingsCourt(bytes32[] memory proof) {
}
modifier onlyWhen(bool b) {
}
Counters.Counter private _tokenIdCounter;
event Mint(uint date, uint supply, string message);
receive() external payable {}
fallback() external payable {}
constructor(string memory _initNotRevealedUri) ERC721("TBBGenesis", "TBBG") {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setUnrevealedUri(string memory _notRevealedURI) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function reveal() public onlyOwner {
}
function getRemainingSupply() public view returns (uint) {
}
function setMintLive(bool live) public onlyAdmin {
}
function setMintPublic(bool live) public onlyAdmin {
}
function getTokensMintedBy(address _owner) public view returns (uint8) {
}
function safeMint(address to, string memory uri) public onlyOwner {
}
function setAdmin(address addr, bool shouldAdmin) public onlyOwner {
}
function isUserAdmin(address addr) public view returns (bool) {
}
function setKingsCourt(address[] memory addr, bool should) public onlyAdmin {
}
function isInKingsCourt(address addr) public view returns (bool) {
}
function mint(uint amount, bytes32[] memory proof)
public
payable
onlyKingsCourt(proof)
onlyWhen(MINT_IS_LIVE || MINT_IS_PUBLIC)
{
require(msg.value == (PRICE * amount), "Insufficient payment");
require(
amount + _tokenIdCounter.current() <= MAX_SUPPLY,
"Cannot mint more than remaining tokens in supply"
);
require(<FILL_ME>)
if (msg.value == (PRICE * amount)) {
for (uint i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint tokenId = _tokenIdCounter.current();
tokensMinted[msg.sender]++;
_safeMint(msg.sender, tokenId);
handleCounters();
}
} else {
revert("Invalid payment");
}
}
function handleCounters() internal {
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal override(ERC721, ERC721Enumerable) whenNotPaused {
}
function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function withdraw() public onlyOwner {
}
function withdrawGeneral(uint balance) internal onlyOwner {
}
function ownerWithdraw() public payable onlyOwner {
}
function withdrawRoyalties(uint balance) internal onlyOwner {
}
function setMerkleRoot(bytes32 _newRoot) public onlyAdmin {
}
function setWithdrawalAccounts(
uint _account,
address payable _previousAddress,
address payable _newAddress
) external onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| tokensMinted[msg.sender]+amount<=WALLET_MINT_MAX,"Minting this many tokens would exceed your wallet limit! Save some bunnies for your friends!" | 378,026 | tokensMinted[msg.sender]+amount<=WALLET_MINT_MAX |
"Token is Locked for Liquidty to be added" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
require(<FILL_ME>)
require(block.timestamp - _tokenCommenceTime > 86400, "Tax can be reverted only after 24hrs"); //check for 24 hours timeperiod
require(!_taxReverted, "Tax had been Reverted!"); //To prevent taxRevert more than once
_totalTaxPercent = 10;
_governingTaxes._split0 = 10;
_governingTaxes._split1 = 20;
_governingTaxes._split2 = 50;
_governingTaxes._split3 = 20;
_maxHoldAmount = _tTotal; //Removing the max hold limit of 2%
_taxReverted = true;
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| !_tokenLock,"Token is Locked for Liquidty to be added" | 378,032 | !_tokenLock |
"Tax can be reverted only after 24hrs" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
require(!_tokenLock, "Token is Locked for Liquidty to be added");
require(<FILL_ME>) //check for 24 hours timeperiod
require(!_taxReverted, "Tax had been Reverted!"); //To prevent taxRevert more than once
_totalTaxPercent = 10;
_governingTaxes._split0 = 10;
_governingTaxes._split1 = 20;
_governingTaxes._split2 = 50;
_governingTaxes._split3 = 20;
_maxHoldAmount = _tTotal; //Removing the max hold limit of 2%
_taxReverted = true;
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| block.timestamp-_tokenCommenceTime>86400,"Tax can be reverted only after 24hrs" | 378,032 | block.timestamp-_tokenCommenceTime>86400 |
"Tax had been Reverted!" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
require(!_tokenLock, "Token is Locked for Liquidty to be added");
require(block.timestamp - _tokenCommenceTime > 86400, "Tax can be reverted only after 24hrs"); //check for 24 hours timeperiod
require(<FILL_ME>) //To prevent taxRevert more than once
_totalTaxPercent = 10;
_governingTaxes._split0 = 10;
_governingTaxes._split1 = 20;
_governingTaxes._split2 = 50;
_governingTaxes._split3 = 20;
_maxHoldAmount = _tTotal; //Removing the max hold limit of 2%
_taxReverted = true;
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| !_taxReverted,"Tax had been Reverted!" | 378,032 | !_taxReverted |
"Split Percentages does not sum upto 100 !" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
require(wallet1_ != address(0) && wallet2_ != address(0), "Tax Wallets assigned zero address !");
require(totalTaxPercent_ <= 10, "Total Tax Percent Exceeds 10% !"); // Prevents owner from manipulating Tax.
require(<FILL_ME>)
_totalTaxPercent = totalTaxPercent_;
_governingTaxes._split0 = split0_;
_governingTaxes._split1 = split1_;
_governingTaxes._split2 = split2_;
_governingTaxes._split3 = split3_;
_governingTaxes._wallet1 = wallet1_;
_governingTaxes._wallet2 = wallet2_;
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| split0_+split1_+split2_+split3_==100,"Split Percentages does not sum upto 100 !" | 378,032 | split0_+split1_+split2_+split3_==100 |
"Token is Locked for Liquidty to be added" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if(_hasLimits(sender, recipient)) {
require(tAmount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount");
require(!isBlacklisted(sender) || !isBlacklisted(recipient), "Sniper Rejected");
if(!_taxReverted && !_isLiquidityPool[recipient]) {
require(balanceOf(recipient)+tAmount <= _maxHoldAmount, "Receiver address exceeds the maxHoldAmount");
}
}
uint32 _previoustotalTaxPercent;
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) //checking if Tax should be deducted from transfer
{
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 0; //removing Taxes
}
else if(!_taxReverted && _isLiquidityPool[sender]) {
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 10; //Liquisity pool Buy tax reduced to 10% from 25%
}
(uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) = _getValues(tAmount);
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient] ||
(!_taxReverted && _isLiquidityPool[sender])) _totalTaxPercent = _previoustotalTaxPercent; //restoring Taxes
_rOwned[sender] = _rOwned[sender] - rAmount;
_rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
_rOwned[burnAddress] += rFee._fee0;
_rOwned[_governingTaxes._wallet1] += rFee._fee1;
_rOwned[_governingTaxes._wallet2] += rFee._fee2;
_reflectFee(rFee._fee3, tFee._fee0+tFee._fee1+tFee._fee2+tFee._fee3);
if (_isExcluded[sender]) _tOwned[sender] = _tOwned[sender] - tAmount;
if (_isExcluded[recipient]) _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
if (_isExcluded[burnAddress]) _tOwned[burnAddress] += tFee._fee0;
if (_isExcluded[_governingTaxes._wallet1]) _tOwned[_governingTaxes._wallet1] += tFee._fee1;
if (_isExcluded[_governingTaxes._wallet2])_tOwned[_governingTaxes._wallet2] += tFee._fee2;
emit Transfer(sender, recipient, tTransferAmount);
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| (!_tokenLock)||(!_hasLimits(sender,recipient)),"Token is Locked for Liquidty to be added" | 378,032 | (!_tokenLock)||(!_hasLimits(sender,recipient)) |
"Sniper Rejected" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require((!_tokenLock) || (!_hasLimits(sender, recipient)) , "Token is Locked for Liquidty to be added");
if(_hasLimits(sender, recipient)) {
require(tAmount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount");
require(<FILL_ME>)
if(!_taxReverted && !_isLiquidityPool[recipient]) {
require(balanceOf(recipient)+tAmount <= _maxHoldAmount, "Receiver address exceeds the maxHoldAmount");
}
}
uint32 _previoustotalTaxPercent;
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) //checking if Tax should be deducted from transfer
{
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 0; //removing Taxes
}
else if(!_taxReverted && _isLiquidityPool[sender]) {
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 10; //Liquisity pool Buy tax reduced to 10% from 25%
}
(uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) = _getValues(tAmount);
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient] ||
(!_taxReverted && _isLiquidityPool[sender])) _totalTaxPercent = _previoustotalTaxPercent; //restoring Taxes
_rOwned[sender] = _rOwned[sender] - rAmount;
_rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
_rOwned[burnAddress] += rFee._fee0;
_rOwned[_governingTaxes._wallet1] += rFee._fee1;
_rOwned[_governingTaxes._wallet2] += rFee._fee2;
_reflectFee(rFee._fee3, tFee._fee0+tFee._fee1+tFee._fee2+tFee._fee3);
if (_isExcluded[sender]) _tOwned[sender] = _tOwned[sender] - tAmount;
if (_isExcluded[recipient]) _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
if (_isExcluded[burnAddress]) _tOwned[burnAddress] += tFee._fee0;
if (_isExcluded[_governingTaxes._wallet1]) _tOwned[_governingTaxes._wallet1] += tFee._fee1;
if (_isExcluded[_governingTaxes._wallet2])_tOwned[_governingTaxes._wallet2] += tFee._fee2;
emit Transfer(sender, recipient, tTransferAmount);
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| !isBlacklisted(sender)||!isBlacklisted(recipient),"Sniper Rejected" | 378,032 | !isBlacklisted(sender)||!isBlacklisted(recipient) |
"Receiver address exceeds the maxHoldAmount" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
contract YeagerInu is Context, IERC20Metadata, Ownable {
struct governingTaxes{
uint32 _split0;
uint32 _split1;
uint32 _split2;
uint32 _split3;
address _wallet1;
address _wallet2;
}
struct Fees {
uint256 _fee0;
uint256 _fee1;
uint256 _fee2;
uint256 _fee3;
}
uint32 private _totalTaxPercent;
governingTaxes private _governingTaxes;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isLiquidityPool;
mapping (address => bool) private _isBlacklisted;
uint256 public _maxTxAmount;
uint256 private _maxHoldAmount;
bool private _tokenLock = true; //Locking the token until Liquidty is added
bool private _taxReverted = false;
uint256 public _tokenCommenceTime;
uint256 private constant _startingSupply = 100_000_000_000_000_000; //100 Quadrillion
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = _startingSupply * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Yeager Inu";
string private constant _symbol = "YEAGER";
uint8 private constant _decimals = 9;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
constructor (address wallet1_, address wallet2_) {
}
function name() public pure override returns (string memory) {
}
function symbol() public pure override returns (string memory) {
}
function decimals() public pure override 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function totalFees() public view returns (uint256) {
}
function currentTaxes() public view
returns (
uint32 total_Tax_Percent,
uint32 burn_Split,
uint32 governingSplit_Wallet1,
uint32 governingSplit_Wallet2,
uint32 reflect_Split
) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function isLiquidityPool(address account) public view returns (bool) {
}
function _hasLimits(address from, address to) private view returns (bool) {
}
function setBlacklistAccount(address account, bool enabled) external onlyOwner() {
}
function setLiquidityPool(address account, bool enabled) external onlyOwner() {
}
function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() {
}
function unlockToken() external onlyOwner() {
}
function revertTax() external {
}
function setTaxes(
uint32 totalTaxPercent_,
uint32 split0_,
uint32 split1_,
uint32 split2_,
uint32 split3_,
address wallet1_,
address wallet2_
) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function reflect(uint256 tAmount) public {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _transfer(
address sender,
address recipient,
uint256 tAmount
) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require((!_tokenLock) || (!_hasLimits(sender, recipient)) , "Token is Locked for Liquidty to be added");
if(_hasLimits(sender, recipient)) {
require(tAmount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount");
require(!isBlacklisted(sender) || !isBlacklisted(recipient), "Sniper Rejected");
if(!_taxReverted && !_isLiquidityPool[recipient]) {
require(<FILL_ME>)
}
}
uint32 _previoustotalTaxPercent;
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) //checking if Tax should be deducted from transfer
{
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 0; //removing Taxes
}
else if(!_taxReverted && _isLiquidityPool[sender]) {
_previoustotalTaxPercent = _totalTaxPercent;
_totalTaxPercent = 10; //Liquisity pool Buy tax reduced to 10% from 25%
}
(uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) = _getValues(tAmount);
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient] ||
(!_taxReverted && _isLiquidityPool[sender])) _totalTaxPercent = _previoustotalTaxPercent; //restoring Taxes
_rOwned[sender] = _rOwned[sender] - rAmount;
_rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
_rOwned[burnAddress] += rFee._fee0;
_rOwned[_governingTaxes._wallet1] += rFee._fee1;
_rOwned[_governingTaxes._wallet2] += rFee._fee2;
_reflectFee(rFee._fee3, tFee._fee0+tFee._fee1+tFee._fee2+tFee._fee3);
if (_isExcluded[sender]) _tOwned[sender] = _tOwned[sender] - tAmount;
if (_isExcluded[recipient]) _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
if (_isExcluded[burnAddress]) _tOwned[burnAddress] += tFee._fee0;
if (_isExcluded[_governingTaxes._wallet1]) _tOwned[_governingTaxes._wallet1] += tFee._fee1;
if (_isExcluded[_governingTaxes._wallet2])_tOwned[_governingTaxes._wallet2] += tFee._fee2;
emit Transfer(sender, recipient, tTransferAmount);
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, Fees memory rFee, uint256 tTransferAmount, Fees memory tFee) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, Fees memory) {
}
function _getRValues(uint256 tAmount, Fees memory tFee, uint256 currentRate) private pure returns (uint256, uint256, Fees memory) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| balanceOf(recipient)+tAmount<=_maxHoldAmount,"Receiver address exceeds the maxHoldAmount" | 378,032 | balanceOf(recipient)+tAmount<=_maxHoldAmount |
null | pragma solidity 0.4.25;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
/**
* @title ViteCoinICO
* @dev ViteCoinICO accepting contributions only within a time frame.
*/
contract ViteCoinICO is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol;
string public name;
uint8 public decimals;
uint256 public fundsRaised;
uint256 public privateSaleTokens;
uint256 public preSaleTokens;
uint256 public saleTokens;
uint256 public teamAdvTokens;
uint256 public reserveTokens;
uint256 public bountyTokens;
uint256 public hardCap;
string internal minTxSize;
string internal maxTxSize;
string public TokenPrice;
uint internal _totalSupply;
address public wallet;
uint256 internal privatesaleopeningTime;
uint256 internal privatesaleclosingTime;
uint256 internal presaleopeningTime;
uint256 internal presaleclosingTime;
uint256 internal saleopeningTime;
uint256 internal saleclosingTime;
bool internal privatesaleOpen;
bool internal presaleOpen;
bool internal saleOpen;
bool internal Open;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event Burned(address burner, uint burnedAmount);
modifier onlyWhileOpen {
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor (address _owner, address _wallet) public {
}
function _setTimes() internal{
}
function _allocateTokens() internal{
}
function totalSupply() public constant returns (uint){
}
// ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
function _checkOpenings() internal{
}
function () external payable {
}
function buyTokens(address _beneficiary) public payable onlyWhileOpen {
}
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal{
}
function _getTokenAmount(uint256 _weiAmount) internal returns (uint256) {
}
function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal {
}
function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal {
}
function _forwardFunds(uint256 _amount) internal {
}
function _transfer(address to, uint tokens) internal returns (bool success) {
// prevent transfer to 0x0, use burn instead
require(to != 0x0);
require(<FILL_ME>)
require(balances[to] + tokens >= balances[to]);
balances[this] = balances[this].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(this,to,tokens);
return true;
}
function freeTokens(address _beneficiary, uint256 _tokenAmount) public onlyOwner{
}
function stopICO() public onlyOwner{
}
function multipleTokensSend (address[] _addresses, uint256[] _values) public onlyOwner{
}
function burnRemainingTokens() public onlyOwner{
}
}
| balances[this]>=tokens | 378,050 | balances[this]>=tokens |
"Governance::execute: Cannot be executed" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Governance {
// The duration of voting on a proposal
uint public constant votingPeriod = 86000;
// Time since submission before the proposal can be executed
uint public constant executionPeriod = 86000 * 2;
// The required minimum number of votes in support of a proposal for it to succeed
uint public constant quorumVotes = 5000e18;
// The minimum number of votes required for an account to create a proposal
uint public constant proposalThreshold = 100e18;
IERC20 public votingToken;
// The total number of proposals
uint public proposalCount;
// The record of all proposals ever proposed
mapping (uint => Proposal) public proposals;
// receipts[ProposalId][voter]
mapping (uint => mapping (address => Receipt)) public receipts;
// The time until which tokens used for voting will be locked
mapping (address => uint) public voteLock;
// Keeps track of locked tokens per address
mapping(address => uint) public balanceOf;
struct Proposal {
// Unique id for looking up a proposal
uint id;
// Creator of the proposal
address proposer;
// The time at which voting starts
uint startTime;
// Current number of votes in favor of this proposal
uint forVotes;
// Current number of votes in opposition to this proposal
uint againstVotes;
// Queued transaction hash
bytes32 txHash;
bool executed;
}
// Ballot receipt record for a voter
struct Receipt {
// Whether or not a vote has been cast
bool hasVoted;
// Whether or not the voter supports the proposal
bool support;
// The number of votes the voter had, which were cast
uint votes;
}
// Possible states that a proposal may be in
enum ProposalState {
Active, // 0
Defeated, // 1
PendingExecution, // 2
ReadyForExecution, // 3
Executed // 4
}
// If the votingPeriod is changed and the user votes again, the lock period will be reset.
modifier lockVotes() {
}
constructor(IERC20 _votingToken) {
}
function state(uint proposalId) public view returns (ProposalState) {
}
function execute(uint _proposalId, address _target, bytes memory _data)
public
payable
returns (bytes memory)
{
bytes32 txHash = keccak256(abi.encode(_target, _data));
Proposal storage proposal = proposals[_proposalId];
require(proposal.txHash == txHash, "Governance::execute: Invalid proposal");
require(<FILL_ME>)
(bool success, bytes memory returnData) = _target.delegatecall(_data);
require(success, "Governance::execute: Transaction execution reverted.");
proposal.executed = true;
return returnData;
}
function propose(address _target, bytes memory _data) public lockVotes returns (uint) {
}
function vote(uint _proposalId, bool _support) public lockVotes {
}
function withdraw() public {
}
function _mint(address _account, uint _amount) internal {
}
function _burn(address _account, uint _amount) internal {
}
}
| state(_proposalId)==ProposalState.ReadyForExecution,"Governance::execute: Cannot be executed" | 378,103 | state(_proposalId)==ProposalState.ReadyForExecution |
"Governance::propose: proposer votes below proposal threshold" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Governance {
// The duration of voting on a proposal
uint public constant votingPeriod = 86000;
// Time since submission before the proposal can be executed
uint public constant executionPeriod = 86000 * 2;
// The required minimum number of votes in support of a proposal for it to succeed
uint public constant quorumVotes = 5000e18;
// The minimum number of votes required for an account to create a proposal
uint public constant proposalThreshold = 100e18;
IERC20 public votingToken;
// The total number of proposals
uint public proposalCount;
// The record of all proposals ever proposed
mapping (uint => Proposal) public proposals;
// receipts[ProposalId][voter]
mapping (uint => mapping (address => Receipt)) public receipts;
// The time until which tokens used for voting will be locked
mapping (address => uint) public voteLock;
// Keeps track of locked tokens per address
mapping(address => uint) public balanceOf;
struct Proposal {
// Unique id for looking up a proposal
uint id;
// Creator of the proposal
address proposer;
// The time at which voting starts
uint startTime;
// Current number of votes in favor of this proposal
uint forVotes;
// Current number of votes in opposition to this proposal
uint againstVotes;
// Queued transaction hash
bytes32 txHash;
bool executed;
}
// Ballot receipt record for a voter
struct Receipt {
// Whether or not a vote has been cast
bool hasVoted;
// Whether or not the voter supports the proposal
bool support;
// The number of votes the voter had, which were cast
uint votes;
}
// Possible states that a proposal may be in
enum ProposalState {
Active, // 0
Defeated, // 1
PendingExecution, // 2
ReadyForExecution, // 3
Executed // 4
}
// If the votingPeriod is changed and the user votes again, the lock period will be reset.
modifier lockVotes() {
}
constructor(IERC20 _votingToken) {
}
function state(uint proposalId) public view returns (ProposalState) {
}
function execute(uint _proposalId, address _target, bytes memory _data)
public
payable
returns (bytes memory)
{
}
function propose(address _target, bytes memory _data) public lockVotes returns (uint) {
require(<FILL_ME>)
bytes32 txHash = keccak256(abi.encode(_target, _data));
proposalCount++;
Proposal memory newProposal = Proposal({
id: proposalCount,
proposer: msg.sender,
startTime: block.timestamp,
forVotes: 0,
againstVotes: 0,
txHash: txHash,
executed: false
});
proposals[newProposal.id] = newProposal;
return proposalCount;
}
function vote(uint _proposalId, bool _support) public lockVotes {
}
function withdraw() public {
}
function _mint(address _account, uint _amount) internal {
}
function _burn(address _account, uint _amount) internal {
}
}
| balanceOf[msg.sender]>=proposalThreshold,"Governance::propose: proposer votes below proposal threshold" | 378,103 | balanceOf[msg.sender]>=proposalThreshold |
"Purchase would exceed BLOOD_AIRDROP" | pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
}
pragma solidity ^0.8.0;
contract BloodMoon is ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
address payable private _PaymentAddress = payable(0x7bc8162ebf1ddA8Dc839d1e14431b157826F1B45);
address payable private _DevAddress;
uint256 private constant BLOOD_PUBLIC = 10000;
uint256 private constant BLOOD_AIRDROP = 310;
uint256 public constant BLOOD_MAX = BLOOD_PUBLIC + BLOOD_AIRDROP;
uint256 public PRICE = 70_000_000_000_000_000; // 0.07ETH
uint256 private DEV_FEE = 0;
bool private REVEAL_ENALBE = false;
uint256 private _activeDateTime = 1635656400; // Date and time (GMT): Sunday, October 31, 2021 5:00:00 AM
string private _tokenBaseURI1 = "";
string private _tokenBaseURI2 = "";
string private _tokenBaseURI3 = "";
Counters.Counter private _publicBLOOD;
Counters.Counter private _airdropBLOOD;
constructor() ERC721("Blood Moon", "BLOOD") {
}
function setPaymentAddress(address paymentAddress) external onlyOwner {
}
function setActiveDateTime(uint256 activeDateTime) external onlyOwner {
}
function setDevFee(uint256 devFee) external onlyOwner {
}
function setRevealEnabled(bool revealEnabled) external onlyOwner {
}
function setBaseURI(string memory URI1,string memory URI2,string memory URI3) external onlyOwner {
}
function setMintPrice(uint256 mintPrice) external onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 tokenId = BLOOD_PUBLIC + _airdropBLOOD.current();
if (_airdropBLOOD.current() < BLOOD_AIRDROP) {
_airdropBLOOD.increment();
_safeMint(to, tokenId);
}
}
}
function purchase(uint256 numberOfTokens) external payable {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory)
{
}
function withdraw() external onlyOwner {
}
}
| _airdropBLOOD.current()<BLOOD_AIRDROP,"Purchase would exceed BLOOD_AIRDROP" | 378,225 | _airdropBLOOD.current()<BLOOD_AIRDROP |
"Purchase would exceed BLOOD_PUBLIC" | pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
}
pragma solidity ^0.8.0;
contract BloodMoon is ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
address payable private _PaymentAddress = payable(0x7bc8162ebf1ddA8Dc839d1e14431b157826F1B45);
address payable private _DevAddress;
uint256 private constant BLOOD_PUBLIC = 10000;
uint256 private constant BLOOD_AIRDROP = 310;
uint256 public constant BLOOD_MAX = BLOOD_PUBLIC + BLOOD_AIRDROP;
uint256 public PRICE = 70_000_000_000_000_000; // 0.07ETH
uint256 private DEV_FEE = 0;
bool private REVEAL_ENALBE = false;
uint256 private _activeDateTime = 1635656400; // Date and time (GMT): Sunday, October 31, 2021 5:00:00 AM
string private _tokenBaseURI1 = "";
string private _tokenBaseURI2 = "";
string private _tokenBaseURI3 = "";
Counters.Counter private _publicBLOOD;
Counters.Counter private _airdropBLOOD;
constructor() ERC721("Blood Moon", "BLOOD") {
}
function setPaymentAddress(address paymentAddress) external onlyOwner {
}
function setActiveDateTime(uint256 activeDateTime) external onlyOwner {
}
function setDevFee(uint256 devFee) external onlyOwner {
}
function setRevealEnabled(bool revealEnabled) external onlyOwner {
}
function setBaseURI(string memory URI1,string memory URI2,string memory URI3) external onlyOwner {
}
function setMintPrice(uint256 mintPrice) external onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function purchase(uint256 numberOfTokens) external payable {
require(<FILL_ME>)
if (msg.sender != owner()) {
require(block.timestamp > _activeDateTime,"Contract is not active");
require(PRICE * numberOfTokens <= msg.value,"ETH amount is not sufficient");
uint256 feeAmount = (msg.value * DEV_FEE) / 100;
_DevAddress.transfer(feeAmount);
_PaymentAddress.transfer(msg.value - feeAmount);
}
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 tokenId = _publicBLOOD.current();
if (_publicBLOOD.current() < BLOOD_PUBLIC) {
_publicBLOOD.increment();
_safeMint(msg.sender, tokenId);
}
}
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory)
{
}
function withdraw() external onlyOwner {
}
}
| _publicBLOOD.current()<BLOOD_PUBLIC,"Purchase would exceed BLOOD_PUBLIC" | 378,225 | _publicBLOOD.current()<BLOOD_PUBLIC |
"Dog not eligible for claim" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./Ownable.sol";
import "./ERC721.sol";
contract Puppies is
Ownable,
ERC721
{
using SafeMath for uint256;
mapping(uint256 => uint256) public eligibility;
// address of Dog contract
ERC721 public dogs;
constructor(
string memory _uri,
address _dogsAddress
) ERC721("Puppies", "PUPPY") public {
}
/** INTERACTIONS **/
/**
* @notice claims a Puppy for the relevant Dog
* @param dogId the ID of the Dog to claim against
*/
function claim(uint256 dogId) external {
require(<FILL_ME>)
require(dogs.ownerOf(dogId) == _msgSender(), "Must own dog to claim");
_mint(_msgSender(), dogId);
setDogEligible(dogId, false);
}
/** ADMIN **/
/**
* @notice updates the base URI to update metadata if needed
* @param _baseURI URI of new metadata base ofolder
*/
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
/**
* @notice enables the claim of Puppies for specific Dogs
* @param dogIds the IDs of the Dogs to enable claims for
*/
function setEligibility(uint16[] calldata dogIds, bool eligible) external onlyOwner {
}
function getDogEligible(uint256 dogId) public view returns (bool) {
}
function setDogEligible(uint256 dogId, bool eligible) internal {
}
function getBucket(uint256 dogId) internal pure returns (uint256){
}
/**
* @notice force claims a Puppy for a Dog
* @param puppyId the ID of the Puppy to force claim
* @param to the address to mint the Puppy to
*/
function devRescue(uint256 puppyId, address to) external onlyOwner {
}
}
| getDogEligible(dogId),"Dog not eligible for claim" | 378,325 | getDogEligible(dogId) |
"Must own dog to claim" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./Ownable.sol";
import "./ERC721.sol";
contract Puppies is
Ownable,
ERC721
{
using SafeMath for uint256;
mapping(uint256 => uint256) public eligibility;
// address of Dog contract
ERC721 public dogs;
constructor(
string memory _uri,
address _dogsAddress
) ERC721("Puppies", "PUPPY") public {
}
/** INTERACTIONS **/
/**
* @notice claims a Puppy for the relevant Dog
* @param dogId the ID of the Dog to claim against
*/
function claim(uint256 dogId) external {
require(getDogEligible(dogId), "Dog not eligible for claim");
require(<FILL_ME>)
_mint(_msgSender(), dogId);
setDogEligible(dogId, false);
}
/** ADMIN **/
/**
* @notice updates the base URI to update metadata if needed
* @param _baseURI URI of new metadata base ofolder
*/
function setBaseURI(string calldata _baseURI) external onlyOwner {
}
/**
* @notice enables the claim of Puppies for specific Dogs
* @param dogIds the IDs of the Dogs to enable claims for
*/
function setEligibility(uint16[] calldata dogIds, bool eligible) external onlyOwner {
}
function getDogEligible(uint256 dogId) public view returns (bool) {
}
function setDogEligible(uint256 dogId, bool eligible) internal {
}
function getBucket(uint256 dogId) internal pure returns (uint256){
}
/**
* @notice force claims a Puppy for a Dog
* @param puppyId the ID of the Puppy to force claim
* @param to the address to mint the Puppy to
*/
function devRescue(uint256 puppyId, address to) external onlyOwner {
}
}
| dogs.ownerOf(dogId)==_msgSender(),"Must own dog to claim" | 378,325 | dogs.ownerOf(dogId)==_msgSender() |
'the CryptoKitties Nifty License requires you to own any kitties whose image you want to use' | pragma solidity ^0.5.8;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Helps contracts guard against reentrancy attacks.
* @author Remco Bloemen <remco@2π.com>, Eenae <[email protected]>
* @dev If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor() public {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
/**
* @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 private _owner;
event OwnershipTransferred(address previousOwner, address 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.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
contract PauserRole {
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private _pausers;
constructor () internal {
}
modifier onlyPauser() {
}
function isPauser(address account) public view returns (bool) {
}
function addPauser(address account) public onlyPauser {
}
function renouncePauser() public {
}
function _addPauser(address account) internal {
}
function _removePauser(address account) internal {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyPauser whenNotPaused {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyPauser whenPaused {
}
}
contract WCKAds is ReentrancyGuard, Ownable, Pausable {
// OpenZeppelin's SafeMath library is used for all arithmetic operations to avoid overflows/underflows.
using SafeMath for uint256;
/* ********** */
/* DATA TYPES */
/* ********** */
struct AdvertisingSlot {
uint256 kittyIdBeingAdvertised;
uint256 blockThatPriceWillResetAt;
uint256 valuationPrice;
address slotOwner;
}
/* ****** */
/* EVENTS */
/* ****** */
event AdvertisingSlotRented(
uint256 slotId,
uint256 kittyIdBeingAdvertised,
uint256 blockThatPriceWillResetAt,
uint256 valuationPrice,
address slotOwner
);
event AdvertisingSlotContentsChanged(
uint256 slotId,
uint256 newKittyIdBeingAdvertised
);
/* ******* */
/* STORAGE */
/* ******* */
mapping (uint256 => AdvertisingSlot) public advertisingSlots;
/* ********* */
/* CONSTANTS */
/* ********* */
address public kittyCoreContractAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d;
address public kittySalesContractAddress = 0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C;
address public kittySiresContractAddress = 0xC7af99Fe5513eB6710e6D5f44F9989dA40F27F26;
address public wckContractAddress = 0x09fE5f0236F0Ea5D930197DCE254d77B04128075;
uint256 public minimumPriceIncrementInBasisPoints = 500;
uint256 public maxRentalPeriodInBlocks = 604800;
uint256 public minimumRentalPrice = (10**18);
/* ********* */
/* FUNCTIONS */
/* ********* */
function getCurrentPriceToRentAdvertisingSlot(uint256 _slotId) external view returns (uint256) {
}
function ownsKitty(address _address, uint256 _kittyId) view public returns (bool) {
}
function rentAdvertisingSlot(uint256 _slotId, uint256 _newKittyIdToAdvertise, uint256 _newValuationPrice) external nonReentrant whenNotPaused {
require(<FILL_ME>)
AdvertisingSlot memory currentSlot = advertisingSlots[_slotId];
if(block.number < currentSlot.blockThatPriceWillResetAt){
require(_newValuationPrice >= _computeNextPrice(currentSlot.valuationPrice), 'you must submit a higher valuation price if the rental term has not elapsed');
ERC20(wckContractAddress).transferFrom(msg.sender, address(this), _newValuationPrice);
} else {
ERC20(wckContractAddress).transferFrom(msg.sender, address(this), minimumRentalPrice);
}
uint256 newBlockThatPriceWillResetAt = (block.number).add(maxRentalPeriodInBlocks);
AdvertisingSlot memory newAdvertisingSlot = AdvertisingSlot({
kittyIdBeingAdvertised: _newKittyIdToAdvertise,
blockThatPriceWillResetAt: newBlockThatPriceWillResetAt,
valuationPrice: _newValuationPrice,
slotOwner: msg.sender
});
advertisingSlots[_slotId] = newAdvertisingSlot;
emit AdvertisingSlotRented(
_slotId,
_newKittyIdToAdvertise,
newBlockThatPriceWillResetAt,
_newValuationPrice,
msg.sender
);
}
function changeKittyIdBeingAdvertised(uint256 _slotId, uint256 _kittyId) external nonReentrant whenNotPaused {
}
function ownerUpdateMinimumRentalPrice(uint256 _newMinimumRentalPrice) external onlyOwner {
}
function ownerUpdateMinimumPriceIncrement(uint256 _newMinimumPriceIncrementInBasisPoints) external onlyOwner {
}
function ownerUpdateMaxRentalPeriod(uint256 _newMaxRentalPeriodInBlocks) external onlyOwner {
}
function ownerWithdrawERC20(address _erc20Address, uint256 _value) external onlyOwner {
}
function ownerWithdrawEther() external onlyOwner {
}
constructor() public {}
function() external payable {}
function _computeNextPrice(uint256 _currentPrice) view internal returns (uint256) {
}
}
/// @title Interface for interacting with the previous version of the WCK contract
contract ERC20 {
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract KittyCore {
function ownerOf(uint256 _tokenId) external view returns (address owner);
}
contract KittyAuction {
function getAuction(uint256 _tokenId) external view returns (
address seller,
uint256 startingPrice,
uint256 endingPrice,
uint256 duration,
uint256 startedAt
);
}
| ownsKitty(msg.sender,_newKittyIdToAdvertise),'the CryptoKitties Nifty License requires you to own any kitties whose image you want to use' | 378,373 | ownsKitty(msg.sender,_newKittyIdToAdvertise) |
'the CryptoKitties Nifty License requires you to own any kitties whose image you want to use' | pragma solidity ^0.5.8;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Helps contracts guard against reentrancy attacks.
* @author Remco Bloemen <remco@2π.com>, Eenae <[email protected]>
* @dev If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter;
constructor() public {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
/**
* @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 private _owner;
event OwnershipTransferred(address previousOwner, address 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.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
contract PauserRole {
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private _pausers;
constructor () internal {
}
modifier onlyPauser() {
}
function isPauser(address account) public view returns (bool) {
}
function addPauser(address account) public onlyPauser {
}
function renouncePauser() public {
}
function _addPauser(address account) internal {
}
function _removePauser(address account) internal {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyPauser whenNotPaused {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyPauser whenPaused {
}
}
contract WCKAds is ReentrancyGuard, Ownable, Pausable {
// OpenZeppelin's SafeMath library is used for all arithmetic operations to avoid overflows/underflows.
using SafeMath for uint256;
/* ********** */
/* DATA TYPES */
/* ********** */
struct AdvertisingSlot {
uint256 kittyIdBeingAdvertised;
uint256 blockThatPriceWillResetAt;
uint256 valuationPrice;
address slotOwner;
}
/* ****** */
/* EVENTS */
/* ****** */
event AdvertisingSlotRented(
uint256 slotId,
uint256 kittyIdBeingAdvertised,
uint256 blockThatPriceWillResetAt,
uint256 valuationPrice,
address slotOwner
);
event AdvertisingSlotContentsChanged(
uint256 slotId,
uint256 newKittyIdBeingAdvertised
);
/* ******* */
/* STORAGE */
/* ******* */
mapping (uint256 => AdvertisingSlot) public advertisingSlots;
/* ********* */
/* CONSTANTS */
/* ********* */
address public kittyCoreContractAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d;
address public kittySalesContractAddress = 0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C;
address public kittySiresContractAddress = 0xC7af99Fe5513eB6710e6D5f44F9989dA40F27F26;
address public wckContractAddress = 0x09fE5f0236F0Ea5D930197DCE254d77B04128075;
uint256 public minimumPriceIncrementInBasisPoints = 500;
uint256 public maxRentalPeriodInBlocks = 604800;
uint256 public minimumRentalPrice = (10**18);
/* ********* */
/* FUNCTIONS */
/* ********* */
function getCurrentPriceToRentAdvertisingSlot(uint256 _slotId) external view returns (uint256) {
}
function ownsKitty(address _address, uint256 _kittyId) view public returns (bool) {
}
function rentAdvertisingSlot(uint256 _slotId, uint256 _newKittyIdToAdvertise, uint256 _newValuationPrice) external nonReentrant whenNotPaused {
}
function changeKittyIdBeingAdvertised(uint256 _slotId, uint256 _kittyId) external nonReentrant whenNotPaused {
require(<FILL_ME>)
AdvertisingSlot storage currentSlot = advertisingSlots[_slotId];
require(msg.sender == currentSlot.slotOwner, 'only the current owner of this slot can change the advertisements subject matter');
currentSlot.kittyIdBeingAdvertised = _kittyId;
emit AdvertisingSlotContentsChanged(
_slotId,
_kittyId
);
}
function ownerUpdateMinimumRentalPrice(uint256 _newMinimumRentalPrice) external onlyOwner {
}
function ownerUpdateMinimumPriceIncrement(uint256 _newMinimumPriceIncrementInBasisPoints) external onlyOwner {
}
function ownerUpdateMaxRentalPeriod(uint256 _newMaxRentalPeriodInBlocks) external onlyOwner {
}
function ownerWithdrawERC20(address _erc20Address, uint256 _value) external onlyOwner {
}
function ownerWithdrawEther() external onlyOwner {
}
constructor() public {}
function() external payable {}
function _computeNextPrice(uint256 _currentPrice) view internal returns (uint256) {
}
}
/// @title Interface for interacting with the previous version of the WCK contract
contract ERC20 {
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract KittyCore {
function ownerOf(uint256 _tokenId) external view returns (address owner);
}
contract KittyAuction {
function getAuction(uint256 _tokenId) external view returns (
address seller,
uint256 startingPrice,
uint256 endingPrice,
uint256 duration,
uint256 startedAt
);
}
| ownsKitty(msg.sender,_kittyId),'the CryptoKitties Nifty License requires you to own any kitties whose image you want to use' | 378,373 | ownsKitty(msg.sender,_kittyId) |
"Caller is not a CONTRACT ADMIN" | /*
! proof.sol
(c) 2020 Krasava Digital Solutions
Develop by BelovITLab LLC (smartcontract.ru) & Krasava Digital Solutions (krasava.pro)
authors @stupidlovejoy, @sergeytyan
License: MIT
*/
pragma solidity 0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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 Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol) public {
}
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 transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract ERC20DecimalsMock is ERC20 {
constructor (string memory name, string memory symbol, uint8 decimals) public ERC20(name, symbol) {
}
}
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 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 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 renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
}
function grantRole(bytes32 role, address account) public virtual {
}
function revokeRole(bytes32 role, address account) public virtual {
}
function renounceRole(bytes32 role, address account) public virtual {
}
function _setupRole(bytes32 role, address account) internal virtual {
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
}
function _grantRole(bytes32 role, address account) private {
}
function _revokeRole(bytes32 role, address account) private {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface OrFeed {
function getExchangeRate(string calldata from, string calldata to, string calldata venue, uint256 amount) external view returns(uint256);
}
contract Token is ERC20DecimalsMock("PROOF", "PRF", 6), Ownable, AccessControl, Pausable {
using SafeERC20 for IERC20;
struct KeyVal {uint256 key; uint256 val;}
struct User {address referrer; uint32 last_transaction;}
bytes32 public constant contract_admin = keccak256("CONTRACT_ADMIN");
bool public ethBuySwitch = true;
bool public usdtBuySwitch = true;
address[] public founders;
address[] public cashiers;
address[] public managers;
uint256 private eth_custom_rate;
uint256 private tether_rate = 1;
uint256 private project_reward;
KeyVal[] private days_percent;
KeyVal[] private refs_percent;
KeyVal[] private refs_multiply;
IERC20 public tether = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
OrFeed public orfeed = OrFeed(0x8316B082621CFedAB95bf4a44a1d4B64a6ffc336);
mapping(address => User) public users;
event Buy(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event DayPayout(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event RefPayout(address indexed addr, uint32 datetime, uint256 amount);
modifier onlyFounders() {
}
constructor() public {
}
receive() payable external whenNotPaused {
}
function _findInKeyVal(KeyVal[] memory _arr, uint256 _val) private pure returns(uint256) {
}
function mintcomp(uint256 _amount) external view returns(uint256) {
}
function _timeProfit(address _account) private returns(uint256 value) {
}
function _refReward(address _referal, address _referrer, uint256 _amount) private returns(uint256 value) {
}
function _beforeTokenTransfer(address _from, address _to, uint256) internal override {
}
function _buy(address _to, uint256 _amount) private {
}
function eth_buy_switch(bool _value) external {
require(<FILL_ME>)
ethBuySwitch = _value;
}
function usd_buy_switch(bool _value) external {
}
function eth_buy() external payable whenNotPaused {
}
function usdt_buy(uint256 _value) external whenNotPaused {
}
function eth_rate_set(uint256 _value) external onlyFounders {
}
function usdt_rate_set(uint256 _value) external onlyFounders {
}
function eth_rate_up(uint256 _value) external {
}
function usdt_rate_up(uint256 _value) external {
}
function eth_rate() external view returns(uint256) {
}
function usdt_rate() external view returns(uint256) {
}
function eth_balance() external view returns(uint256) {
}
function usdt_balance() external view returns(uint256) {
}
function balance() external view returns(uint256, uint256) {
}
function managers_set(uint256 _index, address _account) external onlyFounders {
}
function cashiers_set(uint256 _index, address _account) external onlyFounders {
}
function prf_reward() external onlyFounders {
}
function eth_withdraw(uint256 _value) external onlyFounders {
}
function usdt_withdraw(uint256 _value) external onlyFounders {
}
function pause() external onlyFounders {
}
function unpause() external onlyFounders {
}
function burn(uint256 _amount) external{
}
}
| hasRole(contract_admin,msg.sender),"Caller is not a CONTRACT ADMIN" | 378,438 | hasRole(contract_admin,msg.sender) |
"Not enough totalSuply" | /*
! proof.sol
(c) 2020 Krasava Digital Solutions
Develop by BelovITLab LLC (smartcontract.ru) & Krasava Digital Solutions (krasava.pro)
authors @stupidlovejoy, @sergeytyan
License: MIT
*/
pragma solidity 0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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 Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol) public {
}
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 transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract ERC20DecimalsMock is ERC20 {
constructor (string memory name, string memory symbol, uint8 decimals) public ERC20(name, symbol) {
}
}
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 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 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 renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
}
function grantRole(bytes32 role, address account) public virtual {
}
function revokeRole(bytes32 role, address account) public virtual {
}
function renounceRole(bytes32 role, address account) public virtual {
}
function _setupRole(bytes32 role, address account) internal virtual {
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
}
function _grantRole(bytes32 role, address account) private {
}
function _revokeRole(bytes32 role, address account) private {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface OrFeed {
function getExchangeRate(string calldata from, string calldata to, string calldata venue, uint256 amount) external view returns(uint256);
}
contract Token is ERC20DecimalsMock("PROOF", "PRF", 6), Ownable, AccessControl, Pausable {
using SafeERC20 for IERC20;
struct KeyVal {uint256 key; uint256 val;}
struct User {address referrer; uint32 last_transaction;}
bytes32 public constant contract_admin = keccak256("CONTRACT_ADMIN");
bool public ethBuySwitch = true;
bool public usdtBuySwitch = true;
address[] public founders;
address[] public cashiers;
address[] public managers;
uint256 private eth_custom_rate;
uint256 private tether_rate = 1;
uint256 private project_reward;
KeyVal[] private days_percent;
KeyVal[] private refs_percent;
KeyVal[] private refs_multiply;
IERC20 public tether = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
OrFeed public orfeed = OrFeed(0x8316B082621CFedAB95bf4a44a1d4B64a6ffc336);
mapping(address => User) public users;
event Buy(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event DayPayout(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event RefPayout(address indexed addr, uint32 datetime, uint256 amount);
modifier onlyFounders() {
}
constructor() public {
}
receive() payable external whenNotPaused {
}
function _findInKeyVal(KeyVal[] memory _arr, uint256 _val) private pure returns(uint256) {
}
function mintcomp(uint256 _amount) external view returns(uint256) {
}
function _timeProfit(address _account) private returns(uint256 value) {
}
function _refReward(address _referal, address _referrer, uint256 _amount) private returns(uint256 value) {
}
function _beforeTokenTransfer(address _from, address _to, uint256) internal override {
}
function _buy(address _to, uint256 _amount) private {
}
function eth_buy_switch(bool _value) external {
}
function usd_buy_switch(bool _value) external {
}
function eth_buy() external payable whenNotPaused {
}
function usdt_buy(uint256 _value) external whenNotPaused {
}
function eth_rate_set(uint256 _value) external onlyFounders {
}
function usdt_rate_set(uint256 _value) external onlyFounders {
}
function eth_rate_up(uint256 _value) external {
}
function usdt_rate_up(uint256 _value) external {
}
function eth_rate() external view returns(uint256) {
}
function usdt_rate() external view returns(uint256) {
}
function eth_balance() external view returns(uint256) {
}
function usdt_balance() external view returns(uint256) {
}
function balance() external view returns(uint256, uint256) {
}
function managers_set(uint256 _index, address _account) external onlyFounders {
}
function cashiers_set(uint256 _index, address _account) external onlyFounders {
}
function prf_reward() external onlyFounders {
require(<FILL_ME>)
uint256 value = (this.totalSupply() - project_reward) / 200;
for(uint8 i = 0; i < founders.length; i++) {
_mint(founders[i], value / founders.length);
}
for(uint8 i = 0; i < managers.length; i++) {
_mint(managers[i], value / managers.length);
}
project_reward = this.totalSupply();
}
function eth_withdraw(uint256 _value) external onlyFounders {
}
function usdt_withdraw(uint256 _value) external onlyFounders {
}
function pause() external onlyFounders {
}
function unpause() external onlyFounders {
}
function burn(uint256 _amount) external{
}
}
| this.totalSupply()-project_reward>=1e6,"Not enough totalSuply" | 378,438 | this.totalSupply()-project_reward>=1e6 |
"Not enough ETH" | /*
! proof.sol
(c) 2020 Krasava Digital Solutions
Develop by BelovITLab LLC (smartcontract.ru) & Krasava Digital Solutions (krasava.pro)
authors @stupidlovejoy, @sergeytyan
License: MIT
*/
pragma solidity 0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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 Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol) public {
}
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 transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract ERC20DecimalsMock is ERC20 {
constructor (string memory name, string memory symbol, uint8 decimals) public ERC20(name, symbol) {
}
}
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 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 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 renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
}
function grantRole(bytes32 role, address account) public virtual {
}
function revokeRole(bytes32 role, address account) public virtual {
}
function renounceRole(bytes32 role, address account) public virtual {
}
function _setupRole(bytes32 role, address account) internal virtual {
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
}
function _grantRole(bytes32 role, address account) private {
}
function _revokeRole(bytes32 role, address account) private {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface OrFeed {
function getExchangeRate(string calldata from, string calldata to, string calldata venue, uint256 amount) external view returns(uint256);
}
contract Token is ERC20DecimalsMock("PROOF", "PRF", 6), Ownable, AccessControl, Pausable {
using SafeERC20 for IERC20;
struct KeyVal {uint256 key; uint256 val;}
struct User {address referrer; uint32 last_transaction;}
bytes32 public constant contract_admin = keccak256("CONTRACT_ADMIN");
bool public ethBuySwitch = true;
bool public usdtBuySwitch = true;
address[] public founders;
address[] public cashiers;
address[] public managers;
uint256 private eth_custom_rate;
uint256 private tether_rate = 1;
uint256 private project_reward;
KeyVal[] private days_percent;
KeyVal[] private refs_percent;
KeyVal[] private refs_multiply;
IERC20 public tether = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
OrFeed public orfeed = OrFeed(0x8316B082621CFedAB95bf4a44a1d4B64a6ffc336);
mapping(address => User) public users;
event Buy(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event DayPayout(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event RefPayout(address indexed addr, uint32 datetime, uint256 amount);
modifier onlyFounders() {
}
constructor() public {
}
receive() payable external whenNotPaused {
}
function _findInKeyVal(KeyVal[] memory _arr, uint256 _val) private pure returns(uint256) {
}
function mintcomp(uint256 _amount) external view returns(uint256) {
}
function _timeProfit(address _account) private returns(uint256 value) {
}
function _refReward(address _referal, address _referrer, uint256 _amount) private returns(uint256 value) {
}
function _beforeTokenTransfer(address _from, address _to, uint256) internal override {
}
function _buy(address _to, uint256 _amount) private {
}
function eth_buy_switch(bool _value) external {
}
function usd_buy_switch(bool _value) external {
}
function eth_buy() external payable whenNotPaused {
}
function usdt_buy(uint256 _value) external whenNotPaused {
}
function eth_rate_set(uint256 _value) external onlyFounders {
}
function usdt_rate_set(uint256 _value) external onlyFounders {
}
function eth_rate_up(uint256 _value) external {
}
function usdt_rate_up(uint256 _value) external {
}
function eth_rate() external view returns(uint256) {
}
function usdt_rate() external view returns(uint256) {
}
function eth_balance() external view returns(uint256) {
}
function usdt_balance() external view returns(uint256) {
}
function balance() external view returns(uint256, uint256) {
}
function managers_set(uint256 _index, address _account) external onlyFounders {
}
function cashiers_set(uint256 _index, address _account) external onlyFounders {
}
function prf_reward() external onlyFounders {
}
function eth_withdraw(uint256 _value) external onlyFounders {
require(<FILL_ME>)
uint256 value = (_value > 0 ? _value : address(this).balance) / 2;
for(uint8 i = 0; i < founders.length; i++) {
payable(founders[i]).transfer(value / founders.length);
}
for(uint8 i = 0; i < cashiers.length; i++) {
payable(cashiers[i]).transfer(value / cashiers.length);
}
}
function usdt_withdraw(uint256 _value) external onlyFounders {
}
function pause() external onlyFounders {
}
function unpause() external onlyFounders {
}
function burn(uint256 _amount) external{
}
}
| address(this).balance>=1e6,"Not enough ETH" | 378,438 | address(this).balance>=1e6 |
"Not enough USDT" | /*
! proof.sol
(c) 2020 Krasava Digital Solutions
Develop by BelovITLab LLC (smartcontract.ru) & Krasava Digital Solutions (krasava.pro)
authors @stupidlovejoy, @sergeytyan
License: MIT
*/
pragma solidity 0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
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 Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol) public {
}
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 transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract ERC20DecimalsMock is ERC20 {
constructor (string memory name, string memory symbol, uint8 decimals) public ERC20(name, symbol) {
}
}
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 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 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 renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
}
function grantRole(bytes32 role, address account) public virtual {
}
function revokeRole(bytes32 role, address account) public virtual {
}
function renounceRole(bytes32 role, address account) public virtual {
}
function _setupRole(bytes32 role, address account) internal virtual {
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
}
function _grantRole(bytes32 role, address account) private {
}
function _revokeRole(bytes32 role, address account) private {
}
}
contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual whenNotPaused {
}
function _unpause() internal virtual whenPaused {
}
}
interface OrFeed {
function getExchangeRate(string calldata from, string calldata to, string calldata venue, uint256 amount) external view returns(uint256);
}
contract Token is ERC20DecimalsMock("PROOF", "PRF", 6), Ownable, AccessControl, Pausable {
using SafeERC20 for IERC20;
struct KeyVal {uint256 key; uint256 val;}
struct User {address referrer; uint32 last_transaction;}
bytes32 public constant contract_admin = keccak256("CONTRACT_ADMIN");
bool public ethBuySwitch = true;
bool public usdtBuySwitch = true;
address[] public founders;
address[] public cashiers;
address[] public managers;
uint256 private eth_custom_rate;
uint256 private tether_rate = 1;
uint256 private project_reward;
KeyVal[] private days_percent;
KeyVal[] private refs_percent;
KeyVal[] private refs_multiply;
IERC20 public tether = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
OrFeed public orfeed = OrFeed(0x8316B082621CFedAB95bf4a44a1d4B64a6ffc336);
mapping(address => User) public users;
event Buy(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event DayPayout(address indexed addr, uint32 datetime, uint256 balance, uint256 amount);
event RefPayout(address indexed addr, uint32 datetime, uint256 amount);
modifier onlyFounders() {
}
constructor() public {
}
receive() payable external whenNotPaused {
}
function _findInKeyVal(KeyVal[] memory _arr, uint256 _val) private pure returns(uint256) {
}
function mintcomp(uint256 _amount) external view returns(uint256) {
}
function _timeProfit(address _account) private returns(uint256 value) {
}
function _refReward(address _referal, address _referrer, uint256 _amount) private returns(uint256 value) {
}
function _beforeTokenTransfer(address _from, address _to, uint256) internal override {
}
function _buy(address _to, uint256 _amount) private {
}
function eth_buy_switch(bool _value) external {
}
function usd_buy_switch(bool _value) external {
}
function eth_buy() external payable whenNotPaused {
}
function usdt_buy(uint256 _value) external whenNotPaused {
}
function eth_rate_set(uint256 _value) external onlyFounders {
}
function usdt_rate_set(uint256 _value) external onlyFounders {
}
function eth_rate_up(uint256 _value) external {
}
function usdt_rate_up(uint256 _value) external {
}
function eth_rate() external view returns(uint256) {
}
function usdt_rate() external view returns(uint256) {
}
function eth_balance() external view returns(uint256) {
}
function usdt_balance() external view returns(uint256) {
}
function balance() external view returns(uint256, uint256) {
}
function managers_set(uint256 _index, address _account) external onlyFounders {
}
function cashiers_set(uint256 _index, address _account) external onlyFounders {
}
function prf_reward() external onlyFounders {
}
function eth_withdraw(uint256 _value) external onlyFounders {
}
function usdt_withdraw(uint256 _value) external onlyFounders {
require(<FILL_ME>)
uint256 value = (_value > 0 ? _value : tether.balanceOf(address(this))) / 2;
for(uint8 i = 0; i < founders.length; i++) {
tether.safeTransfer(founders[i], value / founders.length);
}
for(uint8 i = 0; i < cashiers.length; i++) {
tether.safeTransfer(cashiers[i], value / cashiers.length);
}
}
function pause() external onlyFounders {
}
function unpause() external onlyFounders {
}
function burn(uint256 _amount) external{
}
}
| tether.balanceOf(address(this))>=1e6,"Not enough USDT" | 378,438 | tether.balanceOf(address(this))>=1e6 |
'to upgrade level 2, need at least 3 children' | // SPDX-License-Identifier: SimPL-2.0
pragma solidity ^0.6.2;
contract ToBeElonMusk {
string public name = "ToBeElonMusk";
string public symbol = "BEMUSK";
uint8 public decimals = 18;
// from WETH
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Deposit(address indexed dst, uint wad);
event Withdrawal(address indexed src, uint wad);
event DepositTo(address indexed src, address indexed dst, uint toLevel, uint wad);
event NewUser(address indexed src, address indexed parent);
event Upgrade(address indexed src, uint toLevel);
event MissOrder(address indexed src, address indexed dst, uint toLevel);
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
// main data
mapping (address => uint) public userLevel; // user => level
mapping (address => address) public userTree; // child => parent
mapping (address => uint) public childrenCount; // parnet => childrenCount
mapping (address => mapping (uint => uint)) public userLevelReceivedAmount; // {user => {level => amount}}
mapping (address => mapping (uint => uint)) public userLevelReceivedOrderCount; // {user => {level => success order num}}
mapping (address => mapping (uint => uint)) public userLevelMissedOrderCount; // {parent => {level => missed order num}}
// address[9] public initedUser; // 9 address from level 1-> 9
address public king; // level 9
address public farmer; // level 1
uint public price;
uint public maxLevel;
address private owner;
uint private maxLoopTimes;
bool public stopped = false;
// stoppable
modifier stoppable() {
}
function stop() public onlyOwner {
}
function start() public onlyOwner {
}
modifier onlyOwner() {
}
// constructor () public {
// owner = msg.sender;
// }
constructor (address[] memory _initedUser, uint _price) public {
}
function init (address[] memory _initedUser, uint _price) public onlyOwner {
}
function initPrice (uint _price) public onlyOwner {
}
function findMyKing (address cur) view private returns (address) {
}
function depositTo (address to, uint toLevel, uint value) private {
}
function missOrder (address to, uint level) private {
}
function isFull (address to, uint level) view private returns (bool) {
}
function maxReceiveAtLevel (uint level) view private returns (uint) {
}
function canTotalReceive () view private returns (uint) {
}
function payForUpgrade (address me, uint value) private returns (bool) {
require(value == price && price != 0, 'value error');
uint myLevel = userLevel[me];
uint toLevel = myLevel + 1;
require(toLevel <= maxLevel, 'cannot upgrade');
require(<FILL_ME>)
uint i = 0;
address parent = me;
bool found = false;
while(i++ < maxLoopTimes) {
parent = userTree[parent];
if (parent == address(0)) {
break;
}
if (userLevel[parent] == toLevel && !isFull(parent, toLevel)) {
found = true;
break;
}
else {
missOrder(parent, toLevel);
}
}
if (!found) {
parent = king;
}
depositTo(parent, toLevel, value);
userLevel[me] = toLevel;
emit Upgrade(me, toLevel);
return true;
}
function payForNew (address me, address to, uint value) private returns (bool) {
}
// pay to contract direct
// function() public payable {
// pay(address(0));
// }
function pay(address to) public payable stoppable returns (address) {
}
function deposit() public payable stoppable {
}
function withdraw(uint wad) public stoppable {
}
function totalSupply() public view returns (uint) {
}
function approve(address guy, uint wad) public stoppable returns (bool) {
}
function transfer(address dst, uint wad) public stoppable returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
stoppable
returns (bool)
{
}
}
| !(toLevel==2&&userLevelReceivedOrderCount[me][1]<3),'to upgrade level 2, need at least 3 children' | 378,548 | !(toLevel==2&&userLevelReceivedOrderCount[me][1]<3) |
"compound: not able to compound" | //** DePo MasterChef Contract */
//** Author Alex Hong : DePo Finance 2021.10 */
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
contract DePoMasterChef is OwnableUpgradeable, ReentrancyGuardUpgradeable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 rewardLockedUp; // Reward locked up.
uint256 nextHarvestUntil; // When can the user harvest again.
//
// We do some fancy math here. Basically, any point in time, the amount of DePos
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accDePoPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accDePoPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. DePos to distribute per block.
uint256 lastRewardBlock; // Last block number that DePos distribution occurs.
uint256 accDePoPerShare; // Accumulated DePos per share, times 1e12. See below.
uint16 depositFeeBP; // Deposit fee in basis points
uint256 harvestInterval; // Harvest interval in seconds
}
// The DePo TOKEN!
IERC20 public depo;
// Deposit Fee address
address public feeAddress;
// Reward tokens holder address
address public rewardHolder;
// DePos tokens created per block. 0.5 DePo per block. 10% to depo charity ( address )
uint256 public depoPerBlock;
// Bonus muliplier for early depo makers.
uint256 public constant BONUS_MULTIPLIER = 1;
// Max harvest interval: 14 days.
uint256 public constant MAXIMUM_HARVEST_INTERVAL = 10 days;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
// The block number when DePos mining starts.
uint256 public startBlock;
// Total locked up rewards
uint256 public totalLockedUpRewards;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event Compound(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(
address indexed user,
uint256 indexed pid,
uint256 amount
);
event EmissionRateUpdated(
address indexed caller,
uint256 previousAmount,
uint256 newAmount
);
event RewardLockedUp(
address indexed user,
uint256 indexed pid,
uint256 amountLockedUp
);
function initialize(
address _depo,
address _feeAddress,
address _rewardHolder,
uint256 _startBlock,
uint256 _depoPerBlock
) public initializer {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
uint16 _depositFeeBP,
uint256 _harvestInterval,
bool _withUpdate
) public onlyOwner {
}
// Update the given pool's DePos allocation point and deposit fee. Can only be called by the owner.
function set(
uint256 _pid,
uint256 _allocPoint,
uint16 _depositFeeBP,
uint256 _harvestInterval,
bool _withUpdate
) public onlyOwner {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to)
public
pure
returns (uint256)
{
}
// View function to see pending DePos on frontend.
function pendingDePo(uint256 _pid, address _user)
external
view
returns (uint256)
{
}
// View function to see if user can harvest DePos.
function canHarvest(uint256 _pid, address _user)
public
view
returns (bool)
{
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to MasterChef for DePos allocation.
function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
}
// Withdraw LP tokens from MasterChef.
function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
}
// Compound tokens to DePo pool.
function compound(uint256 _pid) public nonReentrant {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(<FILL_ME>)
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accDePoPerShare).div(1e12).sub(
user.rewardDebt
);
safeDePoTransferFrom(rewardHolder, address(this), pending);
user.amount = user.amount.add(pending);
user.rewardDebt = user.amount.mul(pool.accDePoPerShare).div(1e12);
emit Compound(msg.sender, _pid, pending);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public nonReentrant {
}
// Pay or lockup pending DePos.
function payOrLockupPendingDePo(uint256 _pid) internal {
}
// Safe DePo transfer function, just in case if rounding error causes pool to not have enough depos.
function safeDePoTransferFrom(
address _from,
address _to,
uint256 _amount
) internal {
}
function setFeeAddress(address _feeAddress) public {
}
function setRewardHolder(address _rewardHolder) public {
}
// Pancake has to add hidden dummy pools in order to alter the emission, here we make it simple and transparent to all.
function updateEmissionRate(uint256 _depoPerBlock) public onlyOwner {
}
}
| address(pool.lpToken)==address(depo),"compound: not able to compound" | 378,608 | address(pool.lpToken)==address(depo) |
"Aloe: Too early" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "./libraries/Equations.sol";
import "./libraries/FullMath.sol";
import "./libraries/TickMath.sol";
import "./libraries/UINT512.sol";
import "./interfaces/IAloePredictions.sol";
import "./AloePredictions.sol";
/// @title Aloe predictions market to run on Mainnet during the hackathon
/// @author Aloe Capital LLC
contract AloePredictionsMainnet is AloePredictions {
constructor(IUniswapV3Pool _UNI_POOL) AloePredictions(IERC20(address(0)), _UNI_POOL) {}
/// @dev Same as base class `advance()`, but without calling `aggregate()`. There should
/// be no proposals on Mainnet yet.
function advance() external override lock {
require(<FILL_ME>)
epochStartTime = uint32(block.timestamp);
if (epoch != 0) {
(Bounds memory groundTruth, bool shouldInvertPricesNext) = fetchGroundTruth();
emit FetchedGroundTruth(groundTruth.lower, groundTruth.upper, didInvertPrices);
summaries[epoch - 1].groundTruth = groundTruth;
didInvertPrices = shouldInvertPrices;
shouldInvertPrices = shouldInvertPricesNext;
}
epoch++;
emit Advanced(epoch, uint32(block.timestamp));
}
}
| uint32(block.timestamp)>epochExpectedEndTime(),"Aloe: Too early" | 378,646 | uint32(block.timestamp)>epochExpectedEndTime() |
null | pragma solidity ^0.4.24;
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal view returns (uint256) {
}
function safePercent(uint256 a, uint256 b) internal view returns (uint256) {
}
function assert(bool assertion) internal view {
}
}
contract SettingInterface {
/* 奖金比例(百分百) */
function sponsorRate() public view returns (uint256 value);
function firstRate() public view returns (uint256 value);
function lastRate() public view returns (uint256 value);
function gameMaxRate() public view returns (uint256 value);
function keyRate() public view returns (uint256 value);
function shareRate() public view returns (uint256 value);
function superRate() public view returns (uint256 value);
function leaderRate() public view returns (uint256 value);
function auctioneerRate() public view returns (uint256 value);
function withdrawFeeRate() public view returns (uint256 value);
}
contract richMan is SafeMath{
uint constant mantissaOne = 10**18;
uint constant mantissaOneTenth = 10**17;
uint constant mantissaOneHundredth = 10**16;
address public admin;
address public finance;
uint256 public lastRemainAmount = 0;
uint256 startAmount = 5 * mantissaOne;
uint256 minAmount = mantissaOneHundredth;
uint256 initTimer = 600;
SettingInterface setting;
/* 游戏轮数 */
uint32 public currentGameCount;
/* 畅享节点 */
mapping (uint32 => mapping (address => uint256)) public shareNode;
/* 超级节点 */
mapping (uint32 => mapping (address => uint256)) public superNode;
/* 团长 */
mapping (uint32 => mapping (address => uint256)) public leaderShip;
/* 拍卖师 */
mapping (uint32 => mapping (address => uint256)) public auctioneer;
/* 推荐奖 */
mapping (uint32 => mapping (address => uint256)) public sponsorCommission;
/* 奖金地址 */
mapping (uint32 => mapping (address => bool)) public commissionAddress;
/* 用户投资金额 */
mapping (uint32 => mapping (address => uint256)) public userInvestment;
/* 用户提现 */
mapping (uint32 => mapping (address => bool)) public userWithdrawFlag;
/* 游戏前10名 */
mapping (uint32 => address[]) public firstAddress;
/* 游戏后10名 */
mapping (uint32 => address[]) public lastAddress;
/* 游戏最高投资 */
struct MaxPlay {
address user;
uint256 amount;
}
mapping (uint32 => MaxPlay) public gameMax;
constructor() public {
}
/* 游戏结构体
* timer=倒计时,计数器单位为秒
lastTime=最近一次成功参与游戏时间
minAmount=最小投资金额
doubleAmount=最小投资金额翻倍数量
totalAmount=本轮游戏奖金池
status=0游戏未开始,1游戏进行中,2游戏结算完
*/
struct Game {
uint256 timer;
uint256 lastTime;
uint256 minAmount;
uint256 doubleAmount;
uint256 investmentAmount;
uint256 initAmount;
uint256 totalKey;
uint8 status;
}
/* */
mapping (uint32 => Game) public game;
event SetAdmin(address newAdmin);
event SetFinance(address newFinance);
event PlayGame(address user, address sponsor, uint256 value);
event WithdrawCommission(address user, uint32 gameCount, uint256 amount);
event CalculateGame(uint32 gameCount, uint256 amount);
function setAdmin(address newAdmin){
}
function setSetting(address value){
}
function setFinance(address newFinance){
}
function() payable public {
// require(msg.value >= startAmount);
require(msg.sender == admin);
require(<FILL_ME>)
currentGameCount += 1;
game[currentGameCount].timer = initTimer;
game[currentGameCount].lastTime = now;
game[currentGameCount].minAmount = minAmount;
game[currentGameCount].doubleAmount = startAmount * 2;
game[currentGameCount].investmentAmount = lastRemainAmount;
game[currentGameCount].initAmount = msg.value;
game[currentGameCount].totalKey = 0;
game[currentGameCount].status = 1;
}
function settTimer(uint32 gameCount) internal {
}
function updateSponsorCommission(uint32 gameCount, address sponsorUser, uint256 amount) internal {
}
function updateAmountMax(uint32 gameCount, address user, uint256 amount) internal {
}
function updateFirstAddress(uint32 gameCount, address user) internal {
}
function updateLastAddress(uint32 gameCount, address user) internal {
}
function updateInvestment(uint32 gameCount, address user, uint256 amount) internal{
}
function playGame(uint32 gameCount, address sponsorUser) payable public {
}
function firstAddressLength(uint32 gameCount) public view returns (uint256){
}
function lastAddressLength(uint32 gameCount) public view returns (uint256){
}
function calculateFirstAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateLastAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateAmountMax(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyNumber(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyCommission(uint32 gameCount, address user) public view returns(uint256){
}
function calculateCommission(uint32 gameCount, address user) public view returns (uint256){
}
function commissionGameCount(address user)public view returns (uint256[]){
}
function withdrawCommission(uint32 gameCount) public{
}
function recycle(uint256 value) public {
}
function calculateGame(address[] shareUsers,
address[] superUsers,
address[] auctioneerUsers,
address[] leaderUsers,
uint32 gameCount) public{
}
}
| game[currentGameCount].status==2 | 378,650 | game[currentGameCount].status==2 |
null | pragma solidity ^0.4.24;
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal view returns (uint256) {
}
function safePercent(uint256 a, uint256 b) internal view returns (uint256) {
}
function assert(bool assertion) internal view {
}
}
contract SettingInterface {
/* 奖金比例(百分百) */
function sponsorRate() public view returns (uint256 value);
function firstRate() public view returns (uint256 value);
function lastRate() public view returns (uint256 value);
function gameMaxRate() public view returns (uint256 value);
function keyRate() public view returns (uint256 value);
function shareRate() public view returns (uint256 value);
function superRate() public view returns (uint256 value);
function leaderRate() public view returns (uint256 value);
function auctioneerRate() public view returns (uint256 value);
function withdrawFeeRate() public view returns (uint256 value);
}
contract richMan is SafeMath{
uint constant mantissaOne = 10**18;
uint constant mantissaOneTenth = 10**17;
uint constant mantissaOneHundredth = 10**16;
address public admin;
address public finance;
uint256 public lastRemainAmount = 0;
uint256 startAmount = 5 * mantissaOne;
uint256 minAmount = mantissaOneHundredth;
uint256 initTimer = 600;
SettingInterface setting;
/* 游戏轮数 */
uint32 public currentGameCount;
/* 畅享节点 */
mapping (uint32 => mapping (address => uint256)) public shareNode;
/* 超级节点 */
mapping (uint32 => mapping (address => uint256)) public superNode;
/* 团长 */
mapping (uint32 => mapping (address => uint256)) public leaderShip;
/* 拍卖师 */
mapping (uint32 => mapping (address => uint256)) public auctioneer;
/* 推荐奖 */
mapping (uint32 => mapping (address => uint256)) public sponsorCommission;
/* 奖金地址 */
mapping (uint32 => mapping (address => bool)) public commissionAddress;
/* 用户投资金额 */
mapping (uint32 => mapping (address => uint256)) public userInvestment;
/* 用户提现 */
mapping (uint32 => mapping (address => bool)) public userWithdrawFlag;
/* 游戏前10名 */
mapping (uint32 => address[]) public firstAddress;
/* 游戏后10名 */
mapping (uint32 => address[]) public lastAddress;
/* 游戏最高投资 */
struct MaxPlay {
address user;
uint256 amount;
}
mapping (uint32 => MaxPlay) public gameMax;
constructor() public {
}
/* 游戏结构体
* timer=倒计时,计数器单位为秒
lastTime=最近一次成功参与游戏时间
minAmount=最小投资金额
doubleAmount=最小投资金额翻倍数量
totalAmount=本轮游戏奖金池
status=0游戏未开始,1游戏进行中,2游戏结算完
*/
struct Game {
uint256 timer;
uint256 lastTime;
uint256 minAmount;
uint256 doubleAmount;
uint256 investmentAmount;
uint256 initAmount;
uint256 totalKey;
uint8 status;
}
/* */
mapping (uint32 => Game) public game;
event SetAdmin(address newAdmin);
event SetFinance(address newFinance);
event PlayGame(address user, address sponsor, uint256 value);
event WithdrawCommission(address user, uint32 gameCount, uint256 amount);
event CalculateGame(uint32 gameCount, uint256 amount);
function setAdmin(address newAdmin){
}
function setSetting(address value){
}
function setFinance(address newFinance){
}
function() payable public {
}
function settTimer(uint32 gameCount) internal {
}
function updateSponsorCommission(uint32 gameCount, address sponsorUser, uint256 amount) internal {
}
function updateAmountMax(uint32 gameCount, address user, uint256 amount) internal {
}
function updateFirstAddress(uint32 gameCount, address user) internal {
}
function updateLastAddress(uint32 gameCount, address user) internal {
}
function updateInvestment(uint32 gameCount, address user, uint256 amount) internal{
}
function playGame(uint32 gameCount, address sponsorUser) payable public {
require(<FILL_ME>)
require(game[gameCount].timer >= safeSub(now, game[gameCount].lastTime));
require(msg.value >= game[gameCount].minAmount);
uint256 [7] memory doubleList = [320*mantissaOne, 160*mantissaOne, 80*mantissaOne, 40*mantissaOne, 20*mantissaOne, 10*mantissaOne, 5*mantissaOne];
uint256 [7] memory minList = [100*mantissaOneHundredth, 60*mantissaOneHundredth, 20*mantissaOneHundredth, 10*mantissaOneHundredth, 6*mantissaOneHundredth, 2*mantissaOneHundredth, 1*mantissaOneHundredth];
settTimer(gameCount);
updateSponsorCommission(gameCount, sponsorUser, msg.value);
updateAmountMax(gameCount, msg.sender, msg.value);
updateInvestment(gameCount, msg.sender, msg.value);
updateFirstAddress(gameCount, msg.sender);
updateLastAddress(gameCount, msg.sender);
game[gameCount].investmentAmount += msg.value;
for(uint256 i = 0; i < doubleList.length; i++ ){
if (safeAdd(game[gameCount].investmentAmount, game[gameCount].initAmount) >= doubleList[i]){
if (game[gameCount].minAmount != minList[i]){
game[gameCount].minAmount = minList[i];
}
break;
}
}
emit PlayGame(msg.sender, sponsorUser, msg.value);
}
function firstAddressLength(uint32 gameCount) public view returns (uint256){
}
function lastAddressLength(uint32 gameCount) public view returns (uint256){
}
function calculateFirstAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateLastAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateAmountMax(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyNumber(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyCommission(uint32 gameCount, address user) public view returns(uint256){
}
function calculateCommission(uint32 gameCount, address user) public view returns (uint256){
}
function commissionGameCount(address user)public view returns (uint256[]){
}
function withdrawCommission(uint32 gameCount) public{
}
function recycle(uint256 value) public {
}
function calculateGame(address[] shareUsers,
address[] superUsers,
address[] auctioneerUsers,
address[] leaderUsers,
uint32 gameCount) public{
}
}
| game[gameCount].status==1 | 378,650 | game[gameCount].status==1 |
null | pragma solidity ^0.4.24;
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal view returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal view returns (uint256) {
}
function safePercent(uint256 a, uint256 b) internal view returns (uint256) {
}
function assert(bool assertion) internal view {
}
}
contract SettingInterface {
/* 奖金比例(百分百) */
function sponsorRate() public view returns (uint256 value);
function firstRate() public view returns (uint256 value);
function lastRate() public view returns (uint256 value);
function gameMaxRate() public view returns (uint256 value);
function keyRate() public view returns (uint256 value);
function shareRate() public view returns (uint256 value);
function superRate() public view returns (uint256 value);
function leaderRate() public view returns (uint256 value);
function auctioneerRate() public view returns (uint256 value);
function withdrawFeeRate() public view returns (uint256 value);
}
contract richMan is SafeMath{
uint constant mantissaOne = 10**18;
uint constant mantissaOneTenth = 10**17;
uint constant mantissaOneHundredth = 10**16;
address public admin;
address public finance;
uint256 public lastRemainAmount = 0;
uint256 startAmount = 5 * mantissaOne;
uint256 minAmount = mantissaOneHundredth;
uint256 initTimer = 600;
SettingInterface setting;
/* 游戏轮数 */
uint32 public currentGameCount;
/* 畅享节点 */
mapping (uint32 => mapping (address => uint256)) public shareNode;
/* 超级节点 */
mapping (uint32 => mapping (address => uint256)) public superNode;
/* 团长 */
mapping (uint32 => mapping (address => uint256)) public leaderShip;
/* 拍卖师 */
mapping (uint32 => mapping (address => uint256)) public auctioneer;
/* 推荐奖 */
mapping (uint32 => mapping (address => uint256)) public sponsorCommission;
/* 奖金地址 */
mapping (uint32 => mapping (address => bool)) public commissionAddress;
/* 用户投资金额 */
mapping (uint32 => mapping (address => uint256)) public userInvestment;
/* 用户提现 */
mapping (uint32 => mapping (address => bool)) public userWithdrawFlag;
/* 游戏前10名 */
mapping (uint32 => address[]) public firstAddress;
/* 游戏后10名 */
mapping (uint32 => address[]) public lastAddress;
/* 游戏最高投资 */
struct MaxPlay {
address user;
uint256 amount;
}
mapping (uint32 => MaxPlay) public gameMax;
constructor() public {
}
/* 游戏结构体
* timer=倒计时,计数器单位为秒
lastTime=最近一次成功参与游戏时间
minAmount=最小投资金额
doubleAmount=最小投资金额翻倍数量
totalAmount=本轮游戏奖金池
status=0游戏未开始,1游戏进行中,2游戏结算完
*/
struct Game {
uint256 timer;
uint256 lastTime;
uint256 minAmount;
uint256 doubleAmount;
uint256 investmentAmount;
uint256 initAmount;
uint256 totalKey;
uint8 status;
}
/* */
mapping (uint32 => Game) public game;
event SetAdmin(address newAdmin);
event SetFinance(address newFinance);
event PlayGame(address user, address sponsor, uint256 value);
event WithdrawCommission(address user, uint32 gameCount, uint256 amount);
event CalculateGame(uint32 gameCount, uint256 amount);
function setAdmin(address newAdmin){
}
function setSetting(address value){
}
function setFinance(address newFinance){
}
function() payable public {
}
function settTimer(uint32 gameCount) internal {
}
function updateSponsorCommission(uint32 gameCount, address sponsorUser, uint256 amount) internal {
}
function updateAmountMax(uint32 gameCount, address user, uint256 amount) internal {
}
function updateFirstAddress(uint32 gameCount, address user) internal {
}
function updateLastAddress(uint32 gameCount, address user) internal {
}
function updateInvestment(uint32 gameCount, address user, uint256 amount) internal{
}
function playGame(uint32 gameCount, address sponsorUser) payable public {
require(game[gameCount].status == 1);
require(<FILL_ME>)
require(msg.value >= game[gameCount].minAmount);
uint256 [7] memory doubleList = [320*mantissaOne, 160*mantissaOne, 80*mantissaOne, 40*mantissaOne, 20*mantissaOne, 10*mantissaOne, 5*mantissaOne];
uint256 [7] memory minList = [100*mantissaOneHundredth, 60*mantissaOneHundredth, 20*mantissaOneHundredth, 10*mantissaOneHundredth, 6*mantissaOneHundredth, 2*mantissaOneHundredth, 1*mantissaOneHundredth];
settTimer(gameCount);
updateSponsorCommission(gameCount, sponsorUser, msg.value);
updateAmountMax(gameCount, msg.sender, msg.value);
updateInvestment(gameCount, msg.sender, msg.value);
updateFirstAddress(gameCount, msg.sender);
updateLastAddress(gameCount, msg.sender);
game[gameCount].investmentAmount += msg.value;
for(uint256 i = 0; i < doubleList.length; i++ ){
if (safeAdd(game[gameCount].investmentAmount, game[gameCount].initAmount) >= doubleList[i]){
if (game[gameCount].minAmount != minList[i]){
game[gameCount].minAmount = minList[i];
}
break;
}
}
emit PlayGame(msg.sender, sponsorUser, msg.value);
}
function firstAddressLength(uint32 gameCount) public view returns (uint256){
}
function lastAddressLength(uint32 gameCount) public view returns (uint256){
}
function calculateFirstAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateLastAddress(uint32 gameCount, address user) public view returns(uint256){
}
function calculateAmountMax(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyNumber(uint32 gameCount, address user) public view returns(uint256){
}
function calculateKeyCommission(uint32 gameCount, address user) public view returns(uint256){
}
function calculateCommission(uint32 gameCount, address user) public view returns (uint256){
}
function commissionGameCount(address user)public view returns (uint256[]){
}
function withdrawCommission(uint32 gameCount) public{
}
function recycle(uint256 value) public {
}
function calculateGame(address[] shareUsers,
address[] superUsers,
address[] auctioneerUsers,
address[] leaderUsers,
uint32 gameCount) public{
}
}
| game[gameCount].timer>=safeSub(now,game[gameCount].lastTime) | 378,650 | game[gameCount].timer>=safeSub(now,game[gameCount].lastTime) |
"Must have a mintpass" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9 <0.9.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.0/contracts/token/ERC721/ERC721.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.0/contracts/token/ERC1155/IERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.0/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.0/contracts/utils/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.0/contracts/utils/Counters.sol";
/**
* @title Coodles contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation.
* Optimized to no longer use ERC721Enumarable , but still provide a totalSupply() implementation.
* @author @FrankPoncelet
*
*/
contract Coodles is Ownable, ERC721 {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenSupply;
uint256 public tokenPrice = 0.045 ether;
uint256 public budgetFrank = 31.9968 ether;
uint256 public budgetSpencer = 9.59904 ether;
uint256 public budgetSimStone = 1.5 ether;
uint256 public constant MAX_TOKENS=8888;
uint public constant MAX_PURCHASE = 26; // set 1 to high to avoid some gas
uint public constant MAX_RESERVE = 26; // set 1 to high to avoid some gas
bool public saleIsActive;
bool public preSaleIsActive;
bool public notIncreased=true;
// Base URI for Meta data
string private _baseTokenURI;
address public coolCats = 0x1A92f7381B9F03921564a437210bB9396471050C;
address public doodles = 0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e;
address public mintpass = 0xD6cF1cdceE148E59e8c9d5E19CFEe3881892959e;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address private constant FRANK = 0xF40Fd88ac59A206D009A07F8c09828a01e2ACC0d;
address private constant SPENCER = 0x9840aECDcE9A75711942922357EB70eC44DF015F;
address private constant SIMSTONE = 0x4d33c6485c8cd80E04b46eb5372DeA1D24D88B44;
address private constant VAULT = 0xE6232CE1d78500DC9377daaE7DD87A609d2E8259;
event priceChange(address _by, uint256 price);
event PaymentReleased(address to, uint256 amount);
constructor() ERC721("Coodles", "CDL") {
}
/**
* Change the OS proxy if ever needed.
*/
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
/**
* Used to mint Tokens to the teamMembers
*/
function reserveTokens(address to,uint numberOfTokens) public onlyOwner {
}
function reserveTokens() external onlyOwner {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Set the base token URI
*/
function setBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Pause sale if active, make active if paused
*/
function flipPreSaleState() public onlyOwner {
}
/**
* Set mintPass contract address
*/
function setDoodlePass(address newAddress) external onlyOwner {
}
/**
* Set mintPass contract address
*/
function setMintPass(address newAddress) external onlyOwner {
}
/**
* Set mintPass contract address
*/
function setCoolCatPass(address newAddress) external onlyOwner {
}
/**
* Set price
*/
function setPrice(uint256 price) public onlyOwner {
}
function mint(uint256 numberOfTokens) external payable {
}
function preSalemint(uint256 numberOfTokens) external payable {
require(preSaleIsActive, "Sale must be active to mint Tokens");
require(<FILL_ME>)
iternalMint(numberOfTokens);
}
function hasMintPass(address sender) public view returns (bool){
}
function iternalMint(uint256 numberOfTokens) private{
}
function withdraw() public onlyOwner {
}
function calculateWithdraw(uint256 budget, uint256 proposal) private pure returns (uint256){
}
function _withdraw(address _address, uint256 _amount) private {
}
/**
* @dev Gets the total amount of tokens stored by the contract.
* @return uint256 representing the total amount of tokens
*/
function totalSupply() public view returns (uint256) {
}
/**
* override isApprovedForAll to allow the OS Proxie to list without fees.
*/
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
// contract can recieve Ether
fallback() external payable { }
receive() external payable { }
}
| hasMintPass(msg.sender),"Must have a mintpass" | 378,761 | hasMintPass(msg.sender) |
null | /**
* This code is used to deploy AABC Token in Ethereum network
**/
pragma solidity ^0.4.23;
/**
* @title SafeMath
* @dev Simpler version of ERC20 interface
*/
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);
function allowance(address owner, address spender) public view returns (uint256);
function transferAllowed(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
address owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev 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) {
}
/**
* @dev Transfer tokens from one address to another based on allowance
* @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 transferAllowed(address _from, address _to, uint256 _value) public returns (bool){
}
/**
* @dev Transfer tokens from one address to another with transaction fee paid by owner
* @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 onlyOwner returns (bool){
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256){
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is BasicToken {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool mintingFinished = false;
modifier canMint() {
}
modifier hasMintPermission() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(
address _to,
uint256 _amount
)
hasMintPermission
canMint
public
returns (bool)
{
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
contract FreezableToken is BasicToken {
// freezing chains
mapping (bytes32 => uint64) internal chains;
// freezing amounts for each chain
mapping (bytes32 => uint) internal freezings;
// total freezing balance per address
mapping (address => uint) internal freezingBalance;
event Freezed(address indexed to, uint64 release, uint amount);
event Released(address indexed owner, uint amount);
/**
* @dev Gets the balance of the specified address include freezing tokens.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Gets the balance of the specified address without freezing tokens.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function actualBalanceOf(address _owner) public view returns (uint256 balance) {
}
function freezingBalanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev gets freezing count
* @param _addr Address of freeze tokens owner.
*/
function freezingCount(address _addr) public view returns (uint count) {
}
/**
* @dev gets freezing end date and freezing balance for the freezing portion specified by index.
* @param _addr Address of freeze tokens owner.
* @param _index Freezing portion index. It ordered by release date descending.
*/
function getFreezing(address _addr, uint _index) public view returns (uint64 _release, uint _balance) {
}
/**
* @dev freeze your tokens to the specified address.
* Be careful, gas usage is not deterministic,
* and depends on how many freezes _to address already has.
* @param _to Address to which token will be freeze.
* @param _amount Amount of token to freeze.
* @param _until Release date, must be in future.
*/
function freezeTo(address _to, uint _amount, uint64 _until) public {
}
/**
* @dev release first available freezing tokens.
*/
function releaseOnce() public {
}
/**
* @dev release all available for release freezing tokens. Gas usage is not deterministic!
* @return how many tokens was released
*/
function releaseAll() public returns (uint tokens) {
}
function toKey(address _addr, uint _release) internal pure returns (bytes32 result) {
}
function freeze(address _to, uint64 _until) internal {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned
*/
contract BurnableToken is BasicToken {
event Burn(address indexed owner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(address _owner, uint256 _value) public onlyOwner {
}
function _burn(address _who, uint256 _value) internal {
}
function burnFrom(address _owner, uint256 _value) public {
require(<FILL_ME>)
require(_value <= allowed[msg.sender][_owner]);
balances[_owner] -= _value;
allowed[msg.sender][_owner] -= _value;
totalSupply_ -= _value;
}
function destroy() public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is BasicToken {
// event Pause();
// event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract FreezableMintableToken is FreezableToken, MintableToken {
/**
* @dev Mint the specified amount of token to the specified address and freeze it until the specified date.
* Be careful, gas usage is not deterministic,
* and depends on how many freezes _to address already has.
* @param _to Address to which token will be freeze.
* @param _amount Amount of token to mint and freeze.
* @param _until Release date, must be in future.
* @return A boolean that indicates if the operation was successful.
*/
function mintAndFreeze(address _to, uint _amount, uint64 _until) public onlyOwner canMint returns (bool) {
}
}
contract Consts {
uint8 constant Token_Decimals = 6;
uint constant Initial_Supply = 30000000000 * (10 ** uint(Token_Decimals));
string constant Token_Name = "Asset and Arbitrage Coin";
string constant Token_Symbol = "AABC";
bool constant PAUSED = false;
address TARGET_USER = msg.sender;
bool constant CONTINUE_MINTING = true;
}
contract MainToken is Consts, FreezableMintableToken, BurnableToken, Pausable
{
event Initialized();
bool initialized = false;
constructor() public {
}
function name() public pure returns (string _name) {
}
function symbol() public pure returns (string _symbol) {
}
function decimals() public pure returns (uint8 _decimals) {
}
function init() private {
}
}
| balanceOf(_owner)>=_value | 378,777 | balanceOf(_owner)>=_value |
null | pragma solidity ^0.8.0;
contract ColorPaths is ERC721, Ownable, ColorHelper {
// List of colors in circulation
// mapping color -> score (leaderboard)
mapping(string => uint) internal _leaderboard;
// mapping color -> token ID
mapping(string => uint) internal _colorIds;
// Mapping Color -> Path
mapping(string => string) internal _colorPaths;
// Mapping id => color
mapping(uint => string) internal _idColor;
// Max and total supply
uint public maxSupply = 100;
uint internal totalSupply = 0;
// is minting open?
bool internal openMinting = false;
// Owner of the Colors contract (msg.sender)
address contractOwner;
constructor() ERC721("ColorPaths", "PATHS") {
}
function preMint(address preMintAddress) public onlyOwner() {
}
function donePremint() public onlyOwner() {
}
function mint() public payable {
require(openMinting == true, "Minting is not open yet, follow my twitter for more information @0xshaintgod");
require(totalSupply < maxSupply);
require(colors.length != 0);
require(<FILL_ME>)
string memory color = colors[ColorHelper._index];
_colorPaths[color] = generatePaths(msg.sender, color, ColorHelper._index);
_safeMint(msg.sender, ColorHelper._index);
mintTracker(color);
}
function mintTracker(string memory color) internal {
}
function addScore(string memory color, uint score) public onlyOwner() {
}
// Utils
function getOwnerCount(address account) public view returns (uint) {
}
function getTotalSupply() public view returns (uint) {
}
function getColorOwner(string memory color) public view returns(address) {
}
function getScore(string memory color) public view returns(uint) {
}
function getId(string memory color) public view returns(uint) {
}
function getPath(string memory color) public view returns(string memory) {
}
function getIdOwner(uint _tokenId) public view returns(address) {
}
function getMetaData(uint _tokenId) public view returns(uint, uint, string memory, string memory, address) {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| balanceOf(msg.sender)<2 | 378,844 | balanceOf(msg.sender)<2 |
"Only managers can call this function" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/InfluenceSettings.sol";
import "./lib/Procedural.sol";
import "./interfaces/IAsteroidToken.sol";
import "./interfaces/IAsteroidFeatures.sol";
/**
* @dev Contract that generates randomized perks based on when the asteroid is "scanned" by its owner. Perks
* are specific to certain types of asteroids, have varying degrees of rarity and can stack.
*/
contract AsteroidScans is Pausable, Ownable {
using Procedural for bytes32;
IAsteroidToken internal token;
IAsteroidFeatures internal features;
// Mapping indicating allowed managers
mapping (address => bool) private _managers;
/**
* @dev This is a bit-packed set of:
* << 0: the order purchased for scan boosts
* << 64: Bit-packed number with 15 bits. The first indicates whether the asteroid
* has been scanned, with the remainder pertaining to specific bonuses.
* << 128: The block number to use for the randomization hash
*/
mapping (uint => uint) internal scanInfo;
/**
* @dev Tracks the scan order to manage awarding early boosts to bonuses
*/
uint public scanOrderCount = 0;
event ScanStarted(uint indexed asteroidId);
event AsteroidScanned(uint indexed asteroidId, uint bonuses);
constructor(IAsteroidToken _token, IAsteroidFeatures _features) {
}
// Modifier to check if calling contract has the correct minting role
modifier onlyManagers {
require(<FILL_ME>)
_;
}
/**
* @dev Add a new account / contract that can mint / burn asteroids
* @param _manager Address of the new manager
*/
function addManager(address _manager) external onlyOwner {
}
/**
* @dev Remove a current manager
* @param _manager Address of the manager to be removed
*/
function removeManager(address _manager) external onlyOwner {
}
/**
* @dev Checks if an address is a manager
* @param _manager Address of contract / account to check
*/
function isManager(address _manager) public view returns (bool) {
}
/**
* @dev Sets the order the asteroid should receive boosts to bonuses
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function recordScanOrder(uint _asteroidId) external onlyManagers {
}
/**
* @dev Returns the scan order for managing boosts for a particular asteroid
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function getScanOrder(uint _asteroidId) external view returns(uint) {
}
/**
* @dev Method to pre-scan a set of asteroids to be offered during pre-sale. This method may only be run
* before any sale purchases have been made.
* @param _asteroidIds An array of asteroid ERC721 token IDs
* @param _bonuses An array of bit-packed bonuses corresponding to _asteroidIds
*/
function setInitialBonuses(uint[] calldata _asteroidIds, uint[] calldata _bonuses) external onlyOwner {
}
/**
* @dev Starts the scan and defines the future blockhash to use for
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function startScan(uint _asteroidId) external whenNotPaused {
}
/**
* @dev Returns a set of 0 or more perks for the asteroid randomized by time / owner address
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function finalizeScan(uint _asteroidId) external whenNotPaused {
}
/**
* @dev Query for the results of an asteroid scan
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function retrieveScan(uint _asteroidId) external view returns (uint) {
}
}
| isManager(_msgSender()),"Only managers can call this function" | 378,932 | isManager(_msgSender()) |
"Only owner can scan asteroid" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/InfluenceSettings.sol";
import "./lib/Procedural.sol";
import "./interfaces/IAsteroidToken.sol";
import "./interfaces/IAsteroidFeatures.sol";
/**
* @dev Contract that generates randomized perks based on when the asteroid is "scanned" by its owner. Perks
* are specific to certain types of asteroids, have varying degrees of rarity and can stack.
*/
contract AsteroidScans is Pausable, Ownable {
using Procedural for bytes32;
IAsteroidToken internal token;
IAsteroidFeatures internal features;
// Mapping indicating allowed managers
mapping (address => bool) private _managers;
/**
* @dev This is a bit-packed set of:
* << 0: the order purchased for scan boosts
* << 64: Bit-packed number with 15 bits. The first indicates whether the asteroid
* has been scanned, with the remainder pertaining to specific bonuses.
* << 128: The block number to use for the randomization hash
*/
mapping (uint => uint) internal scanInfo;
/**
* @dev Tracks the scan order to manage awarding early boosts to bonuses
*/
uint public scanOrderCount = 0;
event ScanStarted(uint indexed asteroidId);
event AsteroidScanned(uint indexed asteroidId, uint bonuses);
constructor(IAsteroidToken _token, IAsteroidFeatures _features) {
}
// Modifier to check if calling contract has the correct minting role
modifier onlyManagers {
}
/**
* @dev Add a new account / contract that can mint / burn asteroids
* @param _manager Address of the new manager
*/
function addManager(address _manager) external onlyOwner {
}
/**
* @dev Remove a current manager
* @param _manager Address of the manager to be removed
*/
function removeManager(address _manager) external onlyOwner {
}
/**
* @dev Checks if an address is a manager
* @param _manager Address of contract / account to check
*/
function isManager(address _manager) public view returns (bool) {
}
/**
* @dev Sets the order the asteroid should receive boosts to bonuses
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function recordScanOrder(uint _asteroidId) external onlyManagers {
}
/**
* @dev Returns the scan order for managing boosts for a particular asteroid
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function getScanOrder(uint _asteroidId) external view returns(uint) {
}
/**
* @dev Method to pre-scan a set of asteroids to be offered during pre-sale. This method may only be run
* before any sale purchases have been made.
* @param _asteroidIds An array of asteroid ERC721 token IDs
* @param _bonuses An array of bit-packed bonuses corresponding to _asteroidIds
*/
function setInitialBonuses(uint[] calldata _asteroidIds, uint[] calldata _bonuses) external onlyOwner {
}
/**
* @dev Starts the scan and defines the future blockhash to use for
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function startScan(uint _asteroidId) external whenNotPaused {
require(<FILL_ME>)
require(uint(uint64(scanInfo[_asteroidId] >> 64)) == 0, "Asteroid has already been scanned");
require(uint(uint64(scanInfo[_asteroidId] >> 128)) == 0, "Asteroid scanning has already started");
scanInfo[_asteroidId] |= (block.number + 1) << 128;
emit ScanStarted(_asteroidId);
}
/**
* @dev Returns a set of 0 or more perks for the asteroid randomized by time / owner address
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function finalizeScan(uint _asteroidId) external whenNotPaused {
}
/**
* @dev Query for the results of an asteroid scan
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function retrieveScan(uint _asteroidId) external view returns (uint) {
}
}
| token.ownerOf(_asteroidId)==_msgSender(),"Only owner can scan asteroid" | 378,932 | token.ownerOf(_asteroidId)==_msgSender() |
"Asteroid has already been scanned" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/InfluenceSettings.sol";
import "./lib/Procedural.sol";
import "./interfaces/IAsteroidToken.sol";
import "./interfaces/IAsteroidFeatures.sol";
/**
* @dev Contract that generates randomized perks based on when the asteroid is "scanned" by its owner. Perks
* are specific to certain types of asteroids, have varying degrees of rarity and can stack.
*/
contract AsteroidScans is Pausable, Ownable {
using Procedural for bytes32;
IAsteroidToken internal token;
IAsteroidFeatures internal features;
// Mapping indicating allowed managers
mapping (address => bool) private _managers;
/**
* @dev This is a bit-packed set of:
* << 0: the order purchased for scan boosts
* << 64: Bit-packed number with 15 bits. The first indicates whether the asteroid
* has been scanned, with the remainder pertaining to specific bonuses.
* << 128: The block number to use for the randomization hash
*/
mapping (uint => uint) internal scanInfo;
/**
* @dev Tracks the scan order to manage awarding early boosts to bonuses
*/
uint public scanOrderCount = 0;
event ScanStarted(uint indexed asteroidId);
event AsteroidScanned(uint indexed asteroidId, uint bonuses);
constructor(IAsteroidToken _token, IAsteroidFeatures _features) {
}
// Modifier to check if calling contract has the correct minting role
modifier onlyManagers {
}
/**
* @dev Add a new account / contract that can mint / burn asteroids
* @param _manager Address of the new manager
*/
function addManager(address _manager) external onlyOwner {
}
/**
* @dev Remove a current manager
* @param _manager Address of the manager to be removed
*/
function removeManager(address _manager) external onlyOwner {
}
/**
* @dev Checks if an address is a manager
* @param _manager Address of contract / account to check
*/
function isManager(address _manager) public view returns (bool) {
}
/**
* @dev Sets the order the asteroid should receive boosts to bonuses
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function recordScanOrder(uint _asteroidId) external onlyManagers {
}
/**
* @dev Returns the scan order for managing boosts for a particular asteroid
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function getScanOrder(uint _asteroidId) external view returns(uint) {
}
/**
* @dev Method to pre-scan a set of asteroids to be offered during pre-sale. This method may only be run
* before any sale purchases have been made.
* @param _asteroidIds An array of asteroid ERC721 token IDs
* @param _bonuses An array of bit-packed bonuses corresponding to _asteroidIds
*/
function setInitialBonuses(uint[] calldata _asteroidIds, uint[] calldata _bonuses) external onlyOwner {
}
/**
* @dev Starts the scan and defines the future blockhash to use for
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function startScan(uint _asteroidId) external whenNotPaused {
require(token.ownerOf(_asteroidId) == _msgSender(), "Only owner can scan asteroid");
require(<FILL_ME>)
require(uint(uint64(scanInfo[_asteroidId] >> 128)) == 0, "Asteroid scanning has already started");
scanInfo[_asteroidId] |= (block.number + 1) << 128;
emit ScanStarted(_asteroidId);
}
/**
* @dev Returns a set of 0 or more perks for the asteroid randomized by time / owner address
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function finalizeScan(uint _asteroidId) external whenNotPaused {
}
/**
* @dev Query for the results of an asteroid scan
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function retrieveScan(uint _asteroidId) external view returns (uint) {
}
}
| uint(uint64(scanInfo[_asteroidId]>>64))==0,"Asteroid has already been scanned" | 378,932 | uint(uint64(scanInfo[_asteroidId]>>64))==0 |
"Asteroid scanning has already started" | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/InfluenceSettings.sol";
import "./lib/Procedural.sol";
import "./interfaces/IAsteroidToken.sol";
import "./interfaces/IAsteroidFeatures.sol";
/**
* @dev Contract that generates randomized perks based on when the asteroid is "scanned" by its owner. Perks
* are specific to certain types of asteroids, have varying degrees of rarity and can stack.
*/
contract AsteroidScans is Pausable, Ownable {
using Procedural for bytes32;
IAsteroidToken internal token;
IAsteroidFeatures internal features;
// Mapping indicating allowed managers
mapping (address => bool) private _managers;
/**
* @dev This is a bit-packed set of:
* << 0: the order purchased for scan boosts
* << 64: Bit-packed number with 15 bits. The first indicates whether the asteroid
* has been scanned, with the remainder pertaining to specific bonuses.
* << 128: The block number to use for the randomization hash
*/
mapping (uint => uint) internal scanInfo;
/**
* @dev Tracks the scan order to manage awarding early boosts to bonuses
*/
uint public scanOrderCount = 0;
event ScanStarted(uint indexed asteroidId);
event AsteroidScanned(uint indexed asteroidId, uint bonuses);
constructor(IAsteroidToken _token, IAsteroidFeatures _features) {
}
// Modifier to check if calling contract has the correct minting role
modifier onlyManagers {
}
/**
* @dev Add a new account / contract that can mint / burn asteroids
* @param _manager Address of the new manager
*/
function addManager(address _manager) external onlyOwner {
}
/**
* @dev Remove a current manager
* @param _manager Address of the manager to be removed
*/
function removeManager(address _manager) external onlyOwner {
}
/**
* @dev Checks if an address is a manager
* @param _manager Address of contract / account to check
*/
function isManager(address _manager) public view returns (bool) {
}
/**
* @dev Sets the order the asteroid should receive boosts to bonuses
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function recordScanOrder(uint _asteroidId) external onlyManagers {
}
/**
* @dev Returns the scan order for managing boosts for a particular asteroid
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function getScanOrder(uint _asteroidId) external view returns(uint) {
}
/**
* @dev Method to pre-scan a set of asteroids to be offered during pre-sale. This method may only be run
* before any sale purchases have been made.
* @param _asteroidIds An array of asteroid ERC721 token IDs
* @param _bonuses An array of bit-packed bonuses corresponding to _asteroidIds
*/
function setInitialBonuses(uint[] calldata _asteroidIds, uint[] calldata _bonuses) external onlyOwner {
}
/**
* @dev Starts the scan and defines the future blockhash to use for
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function startScan(uint _asteroidId) external whenNotPaused {
require(token.ownerOf(_asteroidId) == _msgSender(), "Only owner can scan asteroid");
require(uint(uint64(scanInfo[_asteroidId] >> 64)) == 0, "Asteroid has already been scanned");
require(<FILL_ME>)
scanInfo[_asteroidId] |= (block.number + 1) << 128;
emit ScanStarted(_asteroidId);
}
/**
* @dev Returns a set of 0 or more perks for the asteroid randomized by time / owner address
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function finalizeScan(uint _asteroidId) external whenNotPaused {
}
/**
* @dev Query for the results of an asteroid scan
* @param _asteroidId The ERC721 token ID of the asteroid
*/
function retrieveScan(uint _asteroidId) external view returns (uint) {
}
}
| uint(uint64(scanInfo[_asteroidId]>>128))==0,"Asteroid scanning has already started" | 378,932 | uint(uint64(scanInfo[_asteroidId]>>128))==0 |
null | pragma solidity ^0.4.24;
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
*/
contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
// allows execution by the owner only
modifier onlyOwner() {
}
modifier onlyNewOwner() {
}
/**
@dev allows transferring the contract ownership
the new owner still needs to accept the transfer
can only be called by the contract owner
@param _newOwner new contract owner
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
@dev used by a new owner to accept an ownership transfer
*/
function acceptOwnership() public onlyNewOwner {
}
}
/*
ERC20 Token interface
*/
contract ERC20 {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function sendwithgas(address _from, address _to, uint256 _value, uint256 _fee) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
interface TokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}
contract NiceCoin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mapping(address => uint256)) internal allowed;
mapping(address => bool) public save;
event Burn(address indexed owner, uint256 value);
event Mint(uint256 value);
event Freeze(address indexed holder);
event Unfreeze(address indexed holder);
event Save(address indexed holder);
modifier notFrozen(address _holder) {
}
constructor() public {
}
function () public payable {
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @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, uint _value) internal {
}
/**
* @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 notFrozen(msg.sender) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _holder The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _holder) public view returns (uint256 balance) {
}
/**
* ERC20 Token Transfer
*/
function sendwithgas(address _from, address _to, uint256 _value, uint256 _fee) public onlyOwner notFrozen(_from) 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 notFrozen(_from) returns (bool) {
}
/**
* @dev Approve the passed address to _spender 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 _holder allowed to a spender.
* @param _holder 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 _holder, address _spender) public view returns (uint256) {
}
/**
* Freeze Account.
*/
function freezeAccount(address _holder) public onlyOwner returns (bool) {
}
/**
* Unfreeze Account.
*/
function unfreezeAccount(address _holder) public onlyOwner returns (bool) {
}
/**
* Token Burn.
*/
function burn(uint256 _value) public onlyOwner returns (bool) {
}
/**
* Token Address All Burn.
*/
function burn_address(address _target) public onlyOwner returns (bool){
}
/**
* Token Mint.
*/
function mint(uint256 _amount) public onlyOwner returns (bool) {
}
/**
* @dev Internal function to determine if an address is a contract
* @param addr The address being queried
* @return True if `_addr` is a contract
*/
function isContract(address addr) internal view returns (bool) {
}
/**
* AnimalGo Game character save, AnimalGo image save
*
*/
function AnimalgoSave(address _holder) public view returns(bool){
require(<FILL_ME>)
save[_holder] = true;
emit Save(_holder);
return true;
}
}
| !save[_holder] | 378,983 | !save[_holder] |
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(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization
* control functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the
* sender account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function balanceOf(address who) public view returns (uint);
// ERC223 functions and events
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title NAMINORI
* @author NAMINORI
* @dev NAMINORI is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract NAMINORI is ERC223, Ownable {
using SafeMath for uint256;
string public name = "NAMINORI";
string public symbol = "NAMI";
uint8 public decimals = 8;
uint256 public initialSupply = 30e9 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
mapping (address => uint) balances;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed burner, uint256 value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
function NAMINORI() public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint balance) {
}
modifier onlyPayloadSize(uint256 size){
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
require(targets.length > 0);
for (uint i = 0; i < targets.length; i++) {
require(<FILL_ME>)
frozenAccount[targets[i]] = isFrozen;
FrozenFunds(targets[i], isFrozen);
}
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
function transfer(address _to, uint _value) public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev token fallback function
*/
function() payable public {
}
}
| targets[i]!=0x0 | 379,132 | targets[i]!=0x0 |
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(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization
* control functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the
* sender account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function balanceOf(address who) public view returns (uint);
// ERC223 functions and events
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title NAMINORI
* @author NAMINORI
* @dev NAMINORI is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract NAMINORI is ERC223, Ownable {
using SafeMath for uint256;
string public name = "NAMINORI";
string public symbol = "NAMI";
uint8 public decimals = 8;
uint256 public initialSupply = 30e9 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
mapping (address => uint) balances;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed burner, uint256 value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
function NAMINORI() public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint balance) {
}
modifier onlyPayloadSize(uint256 size){
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
function transfer(address _to, uint _value) public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
require(amount > 0
&& addresses.length > 0
&& frozenAccount[msg.sender] == false
&& now > unlockUnixTime[msg.sender]);
amount = SafeMath.mul(amount, 1e8);
uint256 totalAmount = SafeMath.mul(amount, addresses.length);
require(balances[msg.sender] >= totalAmount);
for (uint i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
balances[addresses[i]] = SafeMath.add(balances[addresses[i]], amount);
Transfer(msg.sender, addresses[i], amount);
}
balances[msg.sender] = SafeMath.sub(balances[msg.sender], totalAmount);
return true;
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev token fallback function
*/
function() payable public {
}
}
| addresses[i]!=0x0&&frozenAccount[addresses[i]]==false&&now>unlockUnixTime[addresses[i]] | 379,132 | addresses[i]!=0x0&&frozenAccount[addresses[i]]==false&&now>unlockUnixTime[addresses[i]] |
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(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization
* control functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the
* sender account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function balanceOf(address who) public view returns (uint);
// ERC223 functions and events
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title NAMINORI
* @author NAMINORI
* @dev NAMINORI is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract NAMINORI is ERC223, Ownable {
using SafeMath for uint256;
string public name = "NAMINORI";
string public symbol = "NAMI";
uint8 public decimals = 8;
uint256 public initialSupply = 30e9 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
mapping (address => uint) balances;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed burner, uint256 value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
function NAMINORI() public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint balance) {
}
modifier onlyPayloadSize(uint256 size){
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
function transfer(address _to, uint _value) public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
require(addresses.length > 0
&& addresses.length == amounts.length);
uint256 totalAmount = 0;
for (uint i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
amounts[i] = SafeMath.mul(amounts[i], 1e8);
require(balances[addresses[i]] >= amounts[i]);
balances[addresses[i]] = SafeMath.sub(balances[addresses[i]], amounts[i]);
totalAmount = SafeMath.add(totalAmount, amounts[i]);
Transfer(addresses[i], msg.sender, amounts[i]);
}
balances[msg.sender] = SafeMath.add(balances[msg.sender], totalAmount);
return true;
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev token fallback function
*/
function() payable public {
}
}
| amounts[i]>0&&addresses[i]!=0x0&&frozenAccount[addresses[i]]==false&&now>unlockUnixTime[addresses[i]] | 379,132 | amounts[i]>0&&addresses[i]!=0x0&&frozenAccount[addresses[i]]==false&&now>unlockUnixTime[addresses[i]] |
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(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization
* control functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the
* sender account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function balanceOf(address who) public view returns (uint);
// ERC223 functions and events
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title NAMINORI
* @author NAMINORI
* @dev NAMINORI is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract NAMINORI is ERC223, Ownable {
using SafeMath for uint256;
string public name = "NAMINORI";
string public symbol = "NAMI";
uint8 public decimals = 8;
uint256 public initialSupply = 30e9 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
mapping (address => uint) balances;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed burner, uint256 value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
function NAMINORI() public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint balance) {
}
modifier onlyPayloadSize(uint256 size){
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
function transfer(address _to, uint _value) public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
require(addresses.length > 0
&& addresses.length == amounts.length);
uint256 totalAmount = 0;
for (uint i = 0; i < addresses.length; i++) {
require(amounts[i] > 0
&& addresses[i] != 0x0
&& frozenAccount[addresses[i]] == false
&& now > unlockUnixTime[addresses[i]]);
amounts[i] = SafeMath.mul(amounts[i], 1e8);
require(<FILL_ME>)
balances[addresses[i]] = SafeMath.sub(balances[addresses[i]], amounts[i]);
totalAmount = SafeMath.add(totalAmount, amounts[i]);
Transfer(addresses[i], msg.sender, amounts[i]);
}
balances[msg.sender] = SafeMath.add(balances[msg.sender], totalAmount);
return true;
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev token fallback function
*/
function() payable public {
}
}
| balances[addresses[i]]>=amounts[i] | 379,132 | balances[addresses[i]]>=amounts[i] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.