comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"You bought so early! Please wait a bit to sell or transfer." | // SPDX-License-Identifier: MIT
/*
TG: https://t.me/MetaApeDAO
WEB: https://www.metaapedao.com/
TW: https://twitter.com/MetaApeDAOToken
*/
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract MetaApeDAO is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) public _isExcludedFromSellLock;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
mapping (address => uint) public sellLock;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1e12 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public _reflectionFee = 2;
uint256 public _tokensFee = 10;
uint256 private _swapTokensAt;
uint256 private _maxTokensToSwapForFees;
address payable private _feeAddrWallet1;
address payable private _feeAddrWallet2;
address payable private _liquidityWallet;
string private constant _name = "MetaApeDAO";
string private constant _symbol = "$MAD";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
uint private tradingOpenTime;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxWalletAmount = _tTotal;
event MaxWalletAmountUpdated(uint _maxWalletAmount);
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setSwapTokensAt(uint256 amount) external onlyOwner() {
}
function setMaxTokensToSwapForFees(uint256 amount) external onlyOwner() {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function excludeFromSellLock(address user) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
require(!bots[from] && !bots[to]);
if (
from == uniswapV2Pair &&
to != address(uniswapV2Router) &&
!_isExcludedFromFee[to] &&
cooldownEnabled) {
require(balanceOf(to) + amount <= _maxWalletAmount);
// Cooldown
require(cooldown[to] < block.timestamp);
cooldown[to] = block.timestamp + (15 seconds);
if(!_isExcludedFromSellLock[to] && sellLock[to] == 0) {
uint elapsed = block.timestamp - tradingOpenTime;
if(elapsed < 30) {
uint256 sellLockDuration = (30 - elapsed) * 240;
sellLock[to] = block.timestamp + sellLockDuration;
}
}
}
else if(!_isExcludedFromSellLock[from]) {
require(<FILL_ME>)
}
uint256 swapAmount = balanceOf(address(this));
if(swapAmount > _maxTokensToSwapForFees) {
swapAmount = _maxTokensToSwapForFees;
}
if (swapAmount >= _swapTokensAt &&
!inSwap &&
from != uniswapV2Pair &&
swapEnabled) {
inSwap = true;
uint256 tokensForLiquidity = swapAmount / 10;
swapTokensForEth(swapAmount - tokensForLiquidity);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(contractETHBalance.mul(8).div(9));
contractETHBalance = address(this).balance;
if(contractETHBalance > 0 && tokensForLiquidity > 0) {
addLiquidity(contractETHBalance, tokensForLiquidity);
}
}
inSwap = false;
}
}
_tokenTransfer(from,to,amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function addLiquidity(uint256 value, uint256 tokens) private {
}
function openTrading(address[] memory lockSells, uint duration) external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function removeStrictWalletLimit() public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _getTokenFee() private view returns (uint256) {
}
function _getReflectionFee() private view returns (uint256) {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function manualswap() public {
}
function manualsend() public {
}
function manualswapsend() external {
}
function _getValues(uint256 tAmount, uint256 tokenFee) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| sellLock[from]<block.timestamp,"You bought so early! Please wait a bit to sell or transfer." | 48,224 | sellLock[from]<block.timestamp |
"Not enough ether in contract." | pragma solidity >=0.8.0 <0.9.0;
//SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
contract SmartContract is ReentrancyGuard, Ownable, IERC721Receiver, IERC1155Receiver {
uint256 public perc_gasFee = 5;
uint256 public gasFee721 = 130000;
uint256 public gasFee1155S = 85000;
uint256 public gasFee1155B = 130000;
address public vault = address(0);
function supportsInterface(bytes4 interfaceID) public virtual override view returns (bool) {
}
function setVault(address newVault) onlyOwner public {
}
function setPercentageGas(uint256 percentage) onlyOwner public {
}
function _gasReturn(uint256 gasFee, uint256 perc, uint256 gasPrice) internal pure returns (uint256) {
}
function onERC721Received(
address,
address from,
uint256 tokenId,
bytes calldata
) public virtual override returns (bytes4) {
require(vault != address(0), "Vault cannot be the 0x0 address");
uint256 gasReturn = (((gasFee721 * perc_gasFee) / 100) * tx.gasprice);
require(<FILL_ME>)
IERC721(msg.sender).safeTransferFrom(address(this), vault, tokenId);
(bool sent, ) = payable(from).call{ value: gasReturn}("");
require(sent, "Failed to send ether.");
return this.onERC721Received.selector;
}
function onERC1155Received(
address,
address from,
uint256 id,
uint256 value,
bytes calldata data
) public virtual override returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) public virtual override returns (bytes4) {
}
function recieve () external payable { }
}
| address(this).balance>gasReturn,"Not enough ether in contract." | 48,231 | address(this).balance>gasReturn |
"SynthetixUniswapLpRestake::init: reinitialize staking address forbidden" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../utils/DFH/Automate.sol";
import "../utils/DFH/IStorage.sol";
import "../utils/Uniswap/IUniswapV2Router02.sol";
import "../utils/Uniswap/IUniswapV2Pair.sol";
import "../utils/Synthetix/IStaking.sol";
import {ERC20Tools} from "../utils/ERC20Tools.sol";
// solhint-disable not-rely-on-time
contract SynthetixUniswapLpRestake is Automate {
using ERC20Tools for IERC20;
IStaking public staking;
address public liquidityRouter;
uint16 public slippage;
uint16 public deadline;
// solhint-disable-next-line no-empty-blocks
constructor(address _info) Automate(_info) {}
function init(
address _staking,
address _liquidityRouter,
uint16 _slippage,
uint16 _deadline
) external initializer {
require(<FILL_ME>)
staking = IStaking(_staking);
require(
!_initialized || liquidityRouter == _liquidityRouter,
"SynthetixUniswapLpRestake::init: reinitialize liquidity router address forbidden"
);
liquidityRouter = _liquidityRouter;
slippage = _slippage;
deadline = _deadline;
}
function deposit() external onlyOwner {
}
function refund() external onlyOwner {
}
function _swap(
address[2] memory path,
uint256[2] memory amount,
uint256 _deadline
) internal returns (uint256) {
}
function _addLiquidity(
address[2] memory path,
uint256[4] memory amount,
uint256 _deadline
) internal {
}
function run(
uint256 gasFee,
uint256 _deadline,
uint256[2] memory _outMin
) external bill(gasFee, "BondappetitSynthetixLPRestake") {
}
}
| !_initialized||address(staking)==_staking,"SynthetixUniswapLpRestake::init: reinitialize staking address forbidden" | 48,303 | !_initialized||address(staking)==_staking |
"SynthetixUniswapLpRestake::init: reinitialize liquidity router address forbidden" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../utils/DFH/Automate.sol";
import "../utils/DFH/IStorage.sol";
import "../utils/Uniswap/IUniswapV2Router02.sol";
import "../utils/Uniswap/IUniswapV2Pair.sol";
import "../utils/Synthetix/IStaking.sol";
import {ERC20Tools} from "../utils/ERC20Tools.sol";
// solhint-disable not-rely-on-time
contract SynthetixUniswapLpRestake is Automate {
using ERC20Tools for IERC20;
IStaking public staking;
address public liquidityRouter;
uint16 public slippage;
uint16 public deadline;
// solhint-disable-next-line no-empty-blocks
constructor(address _info) Automate(_info) {}
function init(
address _staking,
address _liquidityRouter,
uint16 _slippage,
uint16 _deadline
) external initializer {
require(
!_initialized || address(staking) == _staking,
"SynthetixUniswapLpRestake::init: reinitialize staking address forbidden"
);
staking = IStaking(_staking);
require(<FILL_ME>)
liquidityRouter = _liquidityRouter;
slippage = _slippage;
deadline = _deadline;
}
function deposit() external onlyOwner {
}
function refund() external onlyOwner {
}
function _swap(
address[2] memory path,
uint256[2] memory amount,
uint256 _deadline
) internal returns (uint256) {
}
function _addLiquidity(
address[2] memory path,
uint256[4] memory amount,
uint256 _deadline
) internal {
}
function run(
uint256 gasFee,
uint256 _deadline,
uint256[2] memory _outMin
) external bill(gasFee, "BondappetitSynthetixLPRestake") {
}
}
| !_initialized||liquidityRouter==_liquidityRouter,"SynthetixUniswapLpRestake::init: reinitialize liquidity router address forbidden" | 48,303 | !_initialized||liquidityRouter==_liquidityRouter |
"SynthetixUniswapLpRestake::run: no earned" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../utils/DFH/Automate.sol";
import "../utils/DFH/IStorage.sol";
import "../utils/Uniswap/IUniswapV2Router02.sol";
import "../utils/Uniswap/IUniswapV2Pair.sol";
import "../utils/Synthetix/IStaking.sol";
import {ERC20Tools} from "../utils/ERC20Tools.sol";
// solhint-disable not-rely-on-time
contract SynthetixUniswapLpRestake is Automate {
using ERC20Tools for IERC20;
IStaking public staking;
address public liquidityRouter;
uint16 public slippage;
uint16 public deadline;
// solhint-disable-next-line no-empty-blocks
constructor(address _info) Automate(_info) {}
function init(
address _staking,
address _liquidityRouter,
uint16 _slippage,
uint16 _deadline
) external initializer {
}
function deposit() external onlyOwner {
}
function refund() external onlyOwner {
}
function _swap(
address[2] memory path,
uint256[2] memory amount,
uint256 _deadline
) internal returns (uint256) {
}
function _addLiquidity(
address[2] memory path,
uint256[4] memory amount,
uint256 _deadline
) internal {
}
function run(
uint256 gasFee,
uint256 _deadline,
uint256[2] memory _outMin
) external bill(gasFee, "BondappetitSynthetixLPRestake") {
IStaking _staking = staking; // gas optimization
require(<FILL_ME>)
_staking.getReward();
address rewardToken = _staking.rewardsToken();
uint256 rewardAmount = IERC20(rewardToken).balanceOf(address(this));
IERC20(rewardToken).safeApprove(liquidityRouter, rewardAmount);
IUniswapV2Pair stakingToken = IUniswapV2Pair(_staking.stakingToken());
address[2] memory tokens = [stakingToken.token0(), stakingToken.token1()];
uint256[4] memory amount = [
_swap([rewardToken, tokens[0]], [rewardAmount / 2, _outMin[0]], _deadline),
_swap([rewardToken, tokens[1]], [rewardAmount - rewardAmount / 2, _outMin[1]], _deadline),
0,
0
];
_addLiquidity([tokens[0], tokens[1]], amount, _deadline);
uint256 stakingAmount = stakingToken.balanceOf(address(this));
IERC20(stakingToken).safeApprove(address(_staking), stakingAmount);
_staking.stake(stakingAmount);
}
}
| _staking.earned(address(this))>0,"SynthetixUniswapLpRestake::run: no earned" | 48,303 | _staking.earned(address(this))>0 |
null | pragma solidity 0.5.6;
contract P3XRoll {
using SafeMath for uint256;
struct Bet {
uint256 amount;
uint256 chance;
uint256 blocknumber;
bool isOpen;
}
mapping(address => Bet) public bets;
uint256 public numberOfBets;
mapping(address => uint256) private playerVault;
uint256 public pot;
uint256 constant public MIN_BET = 1e18; // 1 P3X
uint256 constant private MAX_PROFIT_DIVISOR = 100;
event Win(address indexed player, uint256 indexed roll, uint256 indexed amount);
event Loss(address indexed player, uint256 indexed roll, uint256 indexed amount);
event Expiration(address indexed player, uint256 indexed amount);
address constant private P3X_ADDRESS = address(0x058a144951e062FC14f310057D2Fd9ef0Cf5095b);
IP3X constant private p3xContract = IP3X(P3X_ADDRESS);
address constant private DEV = address(0x1EB2acB92624DA2e601EEb77e2508b32E49012ef);
//shareholder setup
struct Shareholder {
uint256 tokens;
uint256 outstandingDividends;
uint256 lastDividendPoints;
}
uint256 constant private MAX_SUPPLY = 20000e18;
uint256 public totalSupply;
mapping(address => Shareholder) public shareholders;
bool public minting = true;
uint256 constant private POINT_MULTIPLIER = 10e18;
uint256 private totalDividendPoints;
uint256 public totalOutstandingDividends;
uint256 constant private DIVIDEND_FETCH_TIME = 1 hours;
uint256 private lastDividendsFetched;
event Mint(address indexed player, uint256 indexed amount);
modifier updateDividends()
{
}
function() external payable {}
function tokenFallback(address player, uint256 amount, bytes calldata data)
external
updateDividends
{
}
function playFromVault(uint256 amount, uint256 chance)
external
updateDividends
{
}
function placeBet(address player, uint256 amount, uint256 chance)
private
{
}
function fetchResult()
external
updateDividends
{
require(<FILL_ME>)
fetch(msg.sender);
}
function fetch(address player)
private
{
}
function withdrawEarnings()
external
updateDividends
{
}
function withdrawDividends()
external
{
}
function fundPot(address player, uint256 amount)
private
{
}
function mint(address player, uint256 amount)
private
{
}
function updateOutstandingDividends(Shareholder storage shareholder)
private
{
}
function fetchDividendsFromP3X()
public
{
}
//
// VIEW FUNCTIONS
//
function maximumProfit()
public
view
returns(uint256)
{
}
function potentialProfit(uint256 amount, uint256 chance)
public
view
returns(uint256)
{
}
function hasActiveBet(address player)
public
view
returns(bool)
{
}
function myEarnings()
external
view
returns(uint256)
{
}
function myDividends()
external
view
returns(uint256)
{
}
function myTokens()
external
view
returns(uint256)
{
}
function myTokenShare()
external
view
returns(uint256)
{
}
function myP3XBalance()
external
view
returns(uint256)
{
}
function fetchableDividendsFromP3X()
external
view
returns(uint256)
{
}
function mintableTokens()
external
view
returns(uint256)
{
}
function timeUntilNextDividendFetching()
external
view
returns(uint256)
{
}
}
interface IP3X {
function transfer(address to, uint256 value) external returns(bool);
function transfer(address to, uint value, bytes calldata data) external returns(bool ok);
function buy(address referrerAddress) payable external returns(uint256);
function balanceOf(address tokenOwner) external view returns(uint);
function dividendsOf(address customerAddress, bool includeReferralBonus) external view returns(uint256);
function withdraw() external;
}
library SafeMath {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
}
}
| hasActiveBet(msg.sender) | 48,486 | hasActiveBet(msg.sender) |
"Contract has not been prepared for launch and user is not owner" | pragma solidity ^0.8.4;
// SPDX-License-Identifier: Apache-2.0
import "./SafeMath.sol";
import "./Address.sol";
import "./RewardsToken.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router.sol";
import "./IRewardsTracker.sol";
contract PeepsPay is RewardsToken {
using SafeMath for uint256;
using Address for address;
// Supply, limits and fees
uint256 private constant REWARDS_TRACKER_IDENTIFIER = 4;
uint256 private constant TOTAL_SUPPLY = 1000000000000 * (10**9);
uint256 public maxTxAmount = TOTAL_SUPPLY.mul(2).div(1000); // 2%
uint256 private platformFee = 75; // 0.75%
uint256 private _previousPlatformFee = platformFee;
uint256 public devFee = 525; // 5.25%
uint256 private _previousDevFee = devFee;
uint256 public rewardsFee = 600; // 6%
uint256 private _previousRewardsFee = rewardsFee;
uint256 public launchSellFee = 775; // 7.75%
uint256 private _previousLaunchSellFee = launchSellFee;
address payable private _platformWalletAddress =
payable(0xF83Ba7773Acc6F87Ea53Ff8B6B9C6a979fef63AD);
address payable private _devWalletAddress =
payable(0x4327B5B2F7CcAA445816Da43150697f1Bc5A892d);
uint256 public launchSellFeeDeadline = 0;
IRewardsTracker private _rewardsTracker;
// Fallback to generic transfer. On by default
bool public useGenericTransfer = true;
// Prepared for launch
bool private preparedForLaunch = false;
// Exclusions
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcludedFromMaxTx;
// Token -> ETH swap support
IUniswapV2Router public uniswapV2Router;
address public uniswapV2Pair;
bool currentlySwapping;
bool public swapAndRedirectEthFeesEnabled = true;
uint256 private minTokensBeforeSwap = 100000000 * 10**9;
// Events and modifiers
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndRedirectEthFeesUpdated(bool enabled);
event OnSwapAndRedirectEthFees(
uint256 tokensSwapped,
uint256 ethToDevWallet
);
event MaxTxAmountUpdated(uint256 maxTxAmount);
event GenericTransferChanged(bool useGenericTransfer);
event ExcludeFromFees(address wallet);
event IncludeInFees(address wallet);
event DevWalletUpdated(address newDevWallet);
event RewardsTrackerUpdated(address newRewardsTracker);
event RouterUpdated(address newRouterAddress);
event FeesChanged(uint256 newDevFee, uint256 newRewardsFee);
event LaunchFeeUpdated(uint256 newLaunchSellFee);
modifier lockTheSwap() {
}
constructor() ERC20("PeepsPay", "PeepsPay") {
}
function decimals() public view virtual override returns (uint8) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual override {
// launch preparation
require(<FILL_ME>)
// fallback implementation
if (useGenericTransfer) {
super._transfer(from, to, amount);
return;
}
if (
!_isExcludedFromMaxTx[from] &&
!_isExcludedFromMaxTx[to] // by default false
) {
require(
amount <= maxTxAmount,
"Transfer amount exceeds the maxTxAmount"
);
}
// sell penalty
uint256 baseDevFee = devFee;
if (launchSellFeeDeadline >= block.timestamp && to == uniswapV2Pair) {
devFee = devFee.add(launchSellFee);
}
// start swap to ETH
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinTokenBalance = contractTokenBalance >= minTokensBeforeSwap;
if (
overMinTokenBalance &&
!currentlySwapping &&
from != uniswapV2Pair &&
swapAndRedirectEthFeesEnabled
) {
// add dev fee
swapAndRedirectEthFees(contractTokenBalance);
}
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
removeAllFee();
}
(uint256 tTransferAmount, uint256 tFee) = _getValues(amount);
_balances[from] = _balances[from].sub(amount);
_balances[to] = _balances[to].add(tTransferAmount);
_takeFee(tFee);
if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
restoreAllFee();
}
// restore dev fee
devFee = baseDevFee;
emit Transfer(from, to, tTransferAmount);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (uint256, uint256)
{
}
function _takeFee(uint256 fee) private {
}
function calculateFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function swapAndRedirectEthFees(uint256 contractTokenBalance)
private
lockTheSwap
{
}
function sendEthToWallet(address wallet, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function prepareForLaunch() external onlyOwner {
}
function setUseGenericTransfer(bool genericTransfer) external onlyOwner {
}
// for 0.5% input 5, for 1% input 10
function setMaxTxPercent(uint256 newMaxTx) external onlyOwner {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setFees(uint256 newDevFee, uint256 newRewardsFee) external onlyOwner {
}
function setLaunchSellFee(uint256 newLaunchSellFee) external onlyOwner {
}
function setDevWallet(address payable newDevWallet)
external
onlyOwner
{
}
function setRewardsTracker(address payable newRewardsTracker)
external
onlyOwner
{
}
function setRouterAddress(address newRouter) external onlyOwner {
}
function setSwapAndRedirectEthFeesEnabled(bool enabled) external onlyOwner {
}
function setMinTokensBeforeSwap(uint256 minTokens) external onlyOwner {
}
// emergency claim functions
function manualSwap() external onlyOwner {
}
function manualSend() external onlyOwner {
}
}
| preparedForLaunch||_msgSender()==owner(),"Contract has not been prepared for launch and user is not owner" | 48,511 | preparedForLaunch||_msgSender()==owner() |
"Already prepared for launch" | pragma solidity ^0.8.4;
// SPDX-License-Identifier: Apache-2.0
import "./SafeMath.sol";
import "./Address.sol";
import "./RewardsToken.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router.sol";
import "./IRewardsTracker.sol";
contract PeepsPay is RewardsToken {
using SafeMath for uint256;
using Address for address;
// Supply, limits and fees
uint256 private constant REWARDS_TRACKER_IDENTIFIER = 4;
uint256 private constant TOTAL_SUPPLY = 1000000000000 * (10**9);
uint256 public maxTxAmount = TOTAL_SUPPLY.mul(2).div(1000); // 2%
uint256 private platformFee = 75; // 0.75%
uint256 private _previousPlatformFee = platformFee;
uint256 public devFee = 525; // 5.25%
uint256 private _previousDevFee = devFee;
uint256 public rewardsFee = 600; // 6%
uint256 private _previousRewardsFee = rewardsFee;
uint256 public launchSellFee = 775; // 7.75%
uint256 private _previousLaunchSellFee = launchSellFee;
address payable private _platformWalletAddress =
payable(0xF83Ba7773Acc6F87Ea53Ff8B6B9C6a979fef63AD);
address payable private _devWalletAddress =
payable(0x4327B5B2F7CcAA445816Da43150697f1Bc5A892d);
uint256 public launchSellFeeDeadline = 0;
IRewardsTracker private _rewardsTracker;
// Fallback to generic transfer. On by default
bool public useGenericTransfer = true;
// Prepared for launch
bool private preparedForLaunch = false;
// Exclusions
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcludedFromMaxTx;
// Token -> ETH swap support
IUniswapV2Router public uniswapV2Router;
address public uniswapV2Pair;
bool currentlySwapping;
bool public swapAndRedirectEthFeesEnabled = true;
uint256 private minTokensBeforeSwap = 100000000 * 10**9;
// Events and modifiers
event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event SwapAndRedirectEthFeesUpdated(bool enabled);
event OnSwapAndRedirectEthFees(
uint256 tokensSwapped,
uint256 ethToDevWallet
);
event MaxTxAmountUpdated(uint256 maxTxAmount);
event GenericTransferChanged(bool useGenericTransfer);
event ExcludeFromFees(address wallet);
event IncludeInFees(address wallet);
event DevWalletUpdated(address newDevWallet);
event RewardsTrackerUpdated(address newRewardsTracker);
event RouterUpdated(address newRouterAddress);
event FeesChanged(uint256 newDevFee, uint256 newRewardsFee);
event LaunchFeeUpdated(uint256 newLaunchSellFee);
modifier lockTheSwap() {
}
constructor() ERC20("PeepsPay", "PeepsPay") {
}
function decimals() public view virtual override returns (uint8) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual override {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (uint256, uint256)
{
}
function _takeFee(uint256 fee) private {
}
function calculateFee(uint256 _amount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function swapAndRedirectEthFees(uint256 contractTokenBalance)
private
lockTheSwap
{
}
function sendEthToWallet(address wallet, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function prepareForLaunch() external onlyOwner {
require(<FILL_ME>)
// ready for launch
preparedForLaunch = true;
// sell penalty for the first 24 hours
launchSellFeeDeadline = block.timestamp + 3 days;
}
function setUseGenericTransfer(bool genericTransfer) external onlyOwner {
}
// for 0.5% input 5, for 1% input 10
function setMaxTxPercent(uint256 newMaxTx) external onlyOwner {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setFees(uint256 newDevFee, uint256 newRewardsFee) external onlyOwner {
}
function setLaunchSellFee(uint256 newLaunchSellFee) external onlyOwner {
}
function setDevWallet(address payable newDevWallet)
external
onlyOwner
{
}
function setRewardsTracker(address payable newRewardsTracker)
external
onlyOwner
{
}
function setRouterAddress(address newRouter) external onlyOwner {
}
function setSwapAndRedirectEthFeesEnabled(bool enabled) external onlyOwner {
}
function setMinTokensBeforeSwap(uint256 minTokens) external onlyOwner {
}
// emergency claim functions
function manualSwap() external onlyOwner {
}
function manualSend() external onlyOwner {
}
}
| !preparedForLaunch,"Already prepared for launch" | 48,511 | !preparedForLaunch |
"APENOUT: The new dividend tracker must be owned by the APENOUT token contract" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./DividendPayingToken.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router.sol";
// import "hardhat/console.sol";
contract APENOUT is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
APENOUTDividendTracker public dividendTracker;
uint256 public swapTokensAtAmount = 200000 * (10**18);
uint256 public constant taxIn = 10;
uint256 public constant taxOut = 30;
uint256 public constant ethRewardsFee = 70;
uint256 public constant devFee = 10;
uint256 public constant marketingFee = 10;
uint256 public constant buyBackFee = 10;
uint256 public constant totalFee = 100;
address payable devAddress = payable(0x82B6c2499d2b5170dE86aF1492D8E8F5026E4ae5);
address payable buyBackAddress = payable(0x3Ba091BDD1d500b37F43bEA198976EecD0eF02A0);
address payable marketingAddress = payable(0xf548B5eA73a7d5fbb9C4Fb6be6040F790E4B6e62);
uint256 public tradingEnabledTimestamp = 1657685042;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
// addresses that can make transfers before presale is over
mapping (address => bool) private canTransferBeforeTradingIsEnabled;
mapping (uint256 => mapping(address => uint256)) public dailyTransfers;
mapping(uint256 => uint256) public maxDailySells;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event UpdateDividendTracker(address indexed newAddress, address indexed oldAddress);
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);
event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SendDividends(
uint256 tokensSwapped,
uint256 amount
);
event ProcessedDividendTracker(
uint256 iterations,
uint256 claims,
uint256 lastProcessedIndex,
bool indexed automatic,
uint256 gas,
address indexed processor
);
constructor() ERC20("APENOUT", "APENOUT") {
}
receive() external payable {
}
function setTradingStartTime(uint256 _tradingEnabledTimestamp) public onlyOwner {
}
function updateDividendTracker(address newAddress) public onlyOwner {
require(newAddress != address(dividendTracker), "APENOUT: The dividend tracker already has that address");
APENOUTDividendTracker newDividendTracker = APENOUTDividendTracker(payable(newAddress));
require(<FILL_ME>)
newDividendTracker.excludeFromDividends(address(newDividendTracker));
newDividendTracker.excludeFromDividends(address(this));
newDividendTracker.excludeFromDividends(owner());
newDividendTracker.excludeFromDividends(address(uniswapV2Router));
newDividendTracker.excludeFromDividends(address(uniswapV2Pair));
emit UpdateDividendTracker(newAddress, address(dividendTracker));
dividendTracker = newDividendTracker;
}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function allowPreTrading(address account, bool allowed) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setDevAddress(address payable _devAddress) external {
}
function setMarketingAddress(address payable _marketingAddress) external {
}
function setBuyBackAddress(address payable _buyBackAddress) external onlyOwner {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function getTotalDividendsDistributed() external view returns (uint256) {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function withdrawableDividendOf(address account) public view returns(uint256) {
}
function dividendTokenBalanceOf(address account) public view returns (uint256) {
}
function getAccountDividendsInfo(address account)
external view returns (
address,
uint256,
uint256,
uint256
) {
}
function claim() external {
}
function getTradingIsEnabled() public view returns (bool) {
}
function getMaxTxFrom() internal view returns (uint256) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
// function used to liquidate tokens held by contract in the event that the contract holds too many tokens
function liquidateContractTokens(uint256 tokenAmount, uint256 amountOutMin) external {
}
function distributeEth(uint256 tokenAmount, uint256 amountOutMin) internal {
}
function swapTokensForEth(uint256 tokenAmount, uint256 amountOutMin) private {
}
}
contract APENOUTDividendTracker is DividendPayingToken, Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
uint256 public lastProcessedIndex;
mapping (address => bool) public excludedFromDividends;
uint256 public minimumTokenBalanceForDividends;
event ExcludeFromDividends(address indexed account);
constructor() DividendPayingToken() {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function excludeFromDividends(address account) external onlyOwner {
}
function getAccount(address _account)
public view returns (
address account,
uint256 withdrawableDividends,
uint256 totalDividends,
uint256 withdrawnDividends
) {
}
function setBalance(address payable account, uint256 newBalance) external onlyOwner {
}
function processAccount(address payable account) public onlyOwner returns (bool) {
}
}
| newDividendTracker.owner()==address(this),"APENOUT: The new dividend tracker must be owned by the APENOUT token contract" | 48,562 | newDividendTracker.owner()==address(this) |
"APENOUT: Pre trading is already the value of 'excluded'" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./DividendPayingToken.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router.sol";
// import "hardhat/console.sol";
contract APENOUT is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
APENOUTDividendTracker public dividendTracker;
uint256 public swapTokensAtAmount = 200000 * (10**18);
uint256 public constant taxIn = 10;
uint256 public constant taxOut = 30;
uint256 public constant ethRewardsFee = 70;
uint256 public constant devFee = 10;
uint256 public constant marketingFee = 10;
uint256 public constant buyBackFee = 10;
uint256 public constant totalFee = 100;
address payable devAddress = payable(0x82B6c2499d2b5170dE86aF1492D8E8F5026E4ae5);
address payable buyBackAddress = payable(0x3Ba091BDD1d500b37F43bEA198976EecD0eF02A0);
address payable marketingAddress = payable(0xf548B5eA73a7d5fbb9C4Fb6be6040F790E4B6e62);
uint256 public tradingEnabledTimestamp = 1657685042;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
// addresses that can make transfers before presale is over
mapping (address => bool) private canTransferBeforeTradingIsEnabled;
mapping (uint256 => mapping(address => uint256)) public dailyTransfers;
mapping(uint256 => uint256) public maxDailySells;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event UpdateDividendTracker(address indexed newAddress, address indexed oldAddress);
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);
event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SendDividends(
uint256 tokensSwapped,
uint256 amount
);
event ProcessedDividendTracker(
uint256 iterations,
uint256 claims,
uint256 lastProcessedIndex,
bool indexed automatic,
uint256 gas,
address indexed processor
);
constructor() ERC20("APENOUT", "APENOUT") {
}
receive() external payable {
}
function setTradingStartTime(uint256 _tradingEnabledTimestamp) public onlyOwner {
}
function updateDividendTracker(address newAddress) public onlyOwner {
}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function allowPreTrading(address account, bool allowed) public onlyOwner {
// used for owner and pre sale addresses
require(<FILL_ME>)
canTransferBeforeTradingIsEnabled[account] = allowed;
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setDevAddress(address payable _devAddress) external {
}
function setMarketingAddress(address payable _marketingAddress) external {
}
function setBuyBackAddress(address payable _buyBackAddress) external onlyOwner {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function getTotalDividendsDistributed() external view returns (uint256) {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function withdrawableDividendOf(address account) public view returns(uint256) {
}
function dividendTokenBalanceOf(address account) public view returns (uint256) {
}
function getAccountDividendsInfo(address account)
external view returns (
address,
uint256,
uint256,
uint256
) {
}
function claim() external {
}
function getTradingIsEnabled() public view returns (bool) {
}
function getMaxTxFrom() internal view returns (uint256) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
// function used to liquidate tokens held by contract in the event that the contract holds too many tokens
function liquidateContractTokens(uint256 tokenAmount, uint256 amountOutMin) external {
}
function distributeEth(uint256 tokenAmount, uint256 amountOutMin) internal {
}
function swapTokensForEth(uint256 tokenAmount, uint256 amountOutMin) private {
}
}
contract APENOUTDividendTracker is DividendPayingToken, Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
uint256 public lastProcessedIndex;
mapping (address => bool) public excludedFromDividends;
uint256 public minimumTokenBalanceForDividends;
event ExcludeFromDividends(address indexed account);
constructor() DividendPayingToken() {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function excludeFromDividends(address account) external onlyOwner {
}
function getAccount(address _account)
public view returns (
address account,
uint256 withdrawableDividends,
uint256 totalDividends,
uint256 withdrawnDividends
) {
}
function setBalance(address payable account, uint256 newBalance) external onlyOwner {
}
function processAccount(address payable account) public onlyOwner returns (bool) {
}
}
| canTransferBeforeTradingIsEnabled[account]!=allowed,"APENOUT: Pre trading is already the value of 'excluded'" | 48,562 | canTransferBeforeTradingIsEnabled[account]!=allowed |
"APENOUT: This account has exceeded max daily limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./DividendPayingToken.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router.sol";
// import "hardhat/console.sol";
contract APENOUT is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
APENOUTDividendTracker public dividendTracker;
uint256 public swapTokensAtAmount = 200000 * (10**18);
uint256 public constant taxIn = 10;
uint256 public constant taxOut = 30;
uint256 public constant ethRewardsFee = 70;
uint256 public constant devFee = 10;
uint256 public constant marketingFee = 10;
uint256 public constant buyBackFee = 10;
uint256 public constant totalFee = 100;
address payable devAddress = payable(0x82B6c2499d2b5170dE86aF1492D8E8F5026E4ae5);
address payable buyBackAddress = payable(0x3Ba091BDD1d500b37F43bEA198976EecD0eF02A0);
address payable marketingAddress = payable(0xf548B5eA73a7d5fbb9C4Fb6be6040F790E4B6e62);
uint256 public tradingEnabledTimestamp = 1657685042;
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
// addresses that can make transfers before presale is over
mapping (address => bool) private canTransferBeforeTradingIsEnabled;
mapping (uint256 => mapping(address => uint256)) public dailyTransfers;
mapping(uint256 => uint256) public maxDailySells;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event UpdateDividendTracker(address indexed newAddress, address indexed oldAddress);
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);
event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
event SendDividends(
uint256 tokensSwapped,
uint256 amount
);
event ProcessedDividendTracker(
uint256 iterations,
uint256 claims,
uint256 lastProcessedIndex,
bool indexed automatic,
uint256 gas,
address indexed processor
);
constructor() ERC20("APENOUT", "APENOUT") {
}
receive() external payable {
}
function setTradingStartTime(uint256 _tradingEnabledTimestamp) public onlyOwner {
}
function updateDividendTracker(address newAddress) public onlyOwner {
}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function allowPreTrading(address account, bool allowed) public onlyOwner {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setDevAddress(address payable _devAddress) external {
}
function setMarketingAddress(address payable _marketingAddress) external {
}
function setBuyBackAddress(address payable _buyBackAddress) external onlyOwner {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function getTotalDividendsDistributed() external view returns (uint256) {
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function withdrawableDividendOf(address account) public view returns(uint256) {
}
function dividendTokenBalanceOf(address account) public view returns (uint256) {
}
function getAccountDividendsInfo(address account)
external view returns (
address,
uint256,
uint256,
uint256
) {
}
function claim() external {
}
function getTradingIsEnabled() public view returns (bool) {
}
function getMaxTxFrom() internal view returns (uint256) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
bool tradingIsEnabled = getTradingIsEnabled();
bool isBuying = automatedMarketMakerPairs[from];
bool isSelling = automatedMarketMakerPairs[to];
if(!tradingIsEnabled) {
require(canTransferBeforeTradingIsEnabled[from], "APENOUT: This account cannot send tokens until trading is enabled");
}
if(amount == 0) {
super._transfer(from, to, 0);
return;
}
// make sure that the sender has not exceeded their daily transfer limit
// automated market pairs do not have a daily transfer limit
if (!_isExcludedFromFees[from] && !automatedMarketMakerPairs[from]) {
uint256 maxTxFrom = getMaxTxFrom();
uint256 day = block.timestamp.div(1 days).add(1);
require(<FILL_ME>)
dailyTransfers[day][from] = dailyTransfers[day][from].add(amount);
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if(
tradingIsEnabled &&
canSwap &&
!swapping &&
isSelling
) {
swapping = true;
distributeEth(contractTokenBalance, 0);
swapping = false;
}
bool takeTax = (isSelling || isBuying) && !swapping && !_isExcludedFromFees[from] && !_isExcludedFromFees[to];
if(takeTax) {
uint256 tax = isBuying ? amount.mul(taxIn).div(100) : amount.mul(taxOut).div(100);
amount = amount.sub(tax);
super._transfer(from, address(this), tax);
}
super._transfer(from, to, amount);
try dividendTracker.setBalance(payable(from), balanceOf(from)) {} catch {}
try dividendTracker.setBalance(payable(to), balanceOf(to)) {} catch {}
}
// function used to liquidate tokens held by contract in the event that the contract holds too many tokens
function liquidateContractTokens(uint256 tokenAmount, uint256 amountOutMin) external {
}
function distributeEth(uint256 tokenAmount, uint256 amountOutMin) internal {
}
function swapTokensForEth(uint256 tokenAmount, uint256 amountOutMin) private {
}
}
contract APENOUTDividendTracker is DividendPayingToken, Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
uint256 public lastProcessedIndex;
mapping (address => bool) public excludedFromDividends;
uint256 public minimumTokenBalanceForDividends;
event ExcludeFromDividends(address indexed account);
constructor() DividendPayingToken() {
}
function setMinimumTokenBalanceForDividends(uint256 _minimumTokenBalanceForDividends) external onlyOwner {
}
function excludeFromDividends(address account) external onlyOwner {
}
function getAccount(address _account)
public view returns (
address account,
uint256 withdrawableDividends,
uint256 totalDividends,
uint256 withdrawnDividends
) {
}
function setBalance(address payable account, uint256 newBalance) external onlyOwner {
}
function processAccount(address payable account) public onlyOwner returns (bool) {
}
}
| dailyTransfers[day][from].add(amount)<=maxTxFrom,"APENOUT: This account has exceeded max daily limit" | 48,562 | dailyTransfers[day][from].add(amount)<=maxTxFrom |
"Account is blacklisted" | pragma solidity ^0.8.10;
contract HeyShiba is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
struct BuyFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
struct SellFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
bool private swapping;
BuyFee public buyFee;
SellFee public sellFee;
uint256 public swapTokensAtAmount = 1 * 10**3 * (10**18); //0.01% of the supply
uint256 public maxBuyAmount = 1 * 10**6 * 10**18; // 0.1% of the supply
uint256 public maxSellAmount = 1 * 10**6 * 10**18; //0. 1% of the supply
uint256 public maxWalletAmount = 1 * 10**7 * 10**18; // 1% of the supply (antiwhale)
uint16 private totalBuyFee;
uint16 private totalSellFee;
bool public swapEnabled;
bool private isTradingEnabled;
uint256 public tradingStartBlock;
uint8 public constant BLOCKCOUNT = 100;
address payable _marketingWallet = payable(address(0x39AF977Ed6c878507Dbc799C14fbc91Efd46C23E)); // marketingWallet
address payable _ecosystemWallet = payable(address(0x3A4926D401fDfc63A8FA78bC44FAc3429D20c9CD)); // ecosystemWallet
address payable _devWallet = payable(address(0x58550ec20AA8D496eCdB8Fb8aa9231Da79850c98)); // devWallet
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedFromLimit;
mapping(address => bool) public _isBlackListed;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event GasForProcessingUpdated(
uint256 indexed newValue,
uint256 indexed oldValue
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
constructor() ERC20("Hey Shiba", "$HeyShib") {
}
receive() external payable {}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function claimStuckTokens(address _token) external onlyOwner {
}
function excludefromLimit(address account, bool excluded)
external
onlyOwner
{
}
function setBlackList(address addr, bool value) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setBuyFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function setSellFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function setEcosystemWallet(address newWallet) external onlyOwner {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
function setSwapEnabled(bool value) external onlyOwner {
}
function setMaxWallet(uint256 amount) external onlyOwner {
}
function setMaxBuyAmount(uint256 amount) external onlyOwner {
}
function setMaxSellAmount(uint256 amount) external onlyOwner {
}
function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "Token: transfer from the zero address");
require(to != address(0), "Token: transfer to the zero address");
require(<FILL_ME>)
require( isTradingEnabled || _isExcludedFromFees[from],
"Trading not enabled yet"
);
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinimumTokenBalance = contractTokenBalance >=
swapTokensAtAmount;
if (
swapEnabled &&
!swapping &&
from != uniswapV2Pair &&
overMinimumTokenBalance
) {
contractTokenBalance = swapTokensAtAmount;
uint16 totalFee = totalBuyFee + totalSellFee;
uint256 swapTokens = contractTokenBalance
.mul(buyFee.liquidityFee + sellFee.liquidityFee)
.div(totalFee);
swapAndLiquify(swapTokens);
uint256 feeTokens = contractTokenBalance - swapTokens;
swapAndSendToMarketingAndEcosystem(feeTokens);
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
uint256 fees;
if (automatedMarketMakerPairs[to]) {
fees = totalSellFee;
} else if (automatedMarketMakerPairs[from]) {
fees = totalBuyFee;
}
if (!_isExcludedFromLimit[from] && !_isExcludedFromLimit[to]) {
if (automatedMarketMakerPairs[to]) {
require(amount <= maxSellAmount, "Sell exceeds limit");
} else if (automatedMarketMakerPairs[from]) {
require(amount <= maxBuyAmount, "Buy exceeds limit");
if (block.number < tradingStartBlock + BLOCKCOUNT) {
_isBlackListed[to] = true;
}
}
if (!automatedMarketMakerPairs[to]) {
require(
balanceOf(to) + amount <= maxWalletAmount,
"Balance exceeds limit"
);
}
}
uint256 feeAmount = amount.mul(fees).div(100);
amount = amount.sub(feeAmount);
super._transfer(from, address(this), feeAmount);
}
super._transfer(from, to, amount);
}
function swapAndSendToMarketingAndEcosystem(uint256 tokens) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| !_isBlackListed[from]&&!_isBlackListed[to],"Account is blacklisted" | 48,584 | !_isBlackListed[from]&&!_isBlackListed[to] |
"Trading not enabled yet" | pragma solidity ^0.8.10;
contract HeyShiba is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
struct BuyFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
struct SellFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
bool private swapping;
BuyFee public buyFee;
SellFee public sellFee;
uint256 public swapTokensAtAmount = 1 * 10**3 * (10**18); //0.01% of the supply
uint256 public maxBuyAmount = 1 * 10**6 * 10**18; // 0.1% of the supply
uint256 public maxSellAmount = 1 * 10**6 * 10**18; //0. 1% of the supply
uint256 public maxWalletAmount = 1 * 10**7 * 10**18; // 1% of the supply (antiwhale)
uint16 private totalBuyFee;
uint16 private totalSellFee;
bool public swapEnabled;
bool private isTradingEnabled;
uint256 public tradingStartBlock;
uint8 public constant BLOCKCOUNT = 100;
address payable _marketingWallet = payable(address(0x39AF977Ed6c878507Dbc799C14fbc91Efd46C23E)); // marketingWallet
address payable _ecosystemWallet = payable(address(0x3A4926D401fDfc63A8FA78bC44FAc3429D20c9CD)); // ecosystemWallet
address payable _devWallet = payable(address(0x58550ec20AA8D496eCdB8Fb8aa9231Da79850c98)); // devWallet
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedFromLimit;
mapping(address => bool) public _isBlackListed;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event GasForProcessingUpdated(
uint256 indexed newValue,
uint256 indexed oldValue
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
constructor() ERC20("Hey Shiba", "$HeyShib") {
}
receive() external payable {}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function claimStuckTokens(address _token) external onlyOwner {
}
function excludefromLimit(address account, bool excluded)
external
onlyOwner
{
}
function setBlackList(address addr, bool value) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setBuyFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function setSellFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function setEcosystemWallet(address newWallet) external onlyOwner {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
function setSwapEnabled(bool value) external onlyOwner {
}
function setMaxWallet(uint256 amount) external onlyOwner {
}
function setMaxBuyAmount(uint256 amount) external onlyOwner {
}
function setMaxSellAmount(uint256 amount) external onlyOwner {
}
function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "Token: transfer from the zero address");
require(to != address(0), "Token: transfer to the zero address");
require(
!_isBlackListed[from] && !_isBlackListed[to],
"Account is blacklisted"
);
require(<FILL_ME>)
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinimumTokenBalance = contractTokenBalance >=
swapTokensAtAmount;
if (
swapEnabled &&
!swapping &&
from != uniswapV2Pair &&
overMinimumTokenBalance
) {
contractTokenBalance = swapTokensAtAmount;
uint16 totalFee = totalBuyFee + totalSellFee;
uint256 swapTokens = contractTokenBalance
.mul(buyFee.liquidityFee + sellFee.liquidityFee)
.div(totalFee);
swapAndLiquify(swapTokens);
uint256 feeTokens = contractTokenBalance - swapTokens;
swapAndSendToMarketingAndEcosystem(feeTokens);
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
uint256 fees;
if (automatedMarketMakerPairs[to]) {
fees = totalSellFee;
} else if (automatedMarketMakerPairs[from]) {
fees = totalBuyFee;
}
if (!_isExcludedFromLimit[from] && !_isExcludedFromLimit[to]) {
if (automatedMarketMakerPairs[to]) {
require(amount <= maxSellAmount, "Sell exceeds limit");
} else if (automatedMarketMakerPairs[from]) {
require(amount <= maxBuyAmount, "Buy exceeds limit");
if (block.number < tradingStartBlock + BLOCKCOUNT) {
_isBlackListed[to] = true;
}
}
if (!automatedMarketMakerPairs[to]) {
require(
balanceOf(to) + amount <= maxWalletAmount,
"Balance exceeds limit"
);
}
}
uint256 feeAmount = amount.mul(fees).div(100);
amount = amount.sub(feeAmount);
super._transfer(from, address(this), feeAmount);
}
super._transfer(from, to, amount);
}
function swapAndSendToMarketingAndEcosystem(uint256 tokens) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| isTradingEnabled||_isExcludedFromFees[from],"Trading not enabled yet" | 48,584 | isTradingEnabled||_isExcludedFromFees[from] |
"Balance exceeds limit" | pragma solidity ^0.8.10;
contract HeyShiba is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
struct BuyFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
struct SellFee {
uint16 marketingFee;
uint16 liquidityFee;
uint16 ecosystemFee;
}
bool private swapping;
BuyFee public buyFee;
SellFee public sellFee;
uint256 public swapTokensAtAmount = 1 * 10**3 * (10**18); //0.01% of the supply
uint256 public maxBuyAmount = 1 * 10**6 * 10**18; // 0.1% of the supply
uint256 public maxSellAmount = 1 * 10**6 * 10**18; //0. 1% of the supply
uint256 public maxWalletAmount = 1 * 10**7 * 10**18; // 1% of the supply (antiwhale)
uint16 private totalBuyFee;
uint16 private totalSellFee;
bool public swapEnabled;
bool private isTradingEnabled;
uint256 public tradingStartBlock;
uint8 public constant BLOCKCOUNT = 100;
address payable _marketingWallet = payable(address(0x39AF977Ed6c878507Dbc799C14fbc91Efd46C23E)); // marketingWallet
address payable _ecosystemWallet = payable(address(0x3A4926D401fDfc63A8FA78bC44FAc3429D20c9CD)); // ecosystemWallet
address payable _devWallet = payable(address(0x58550ec20AA8D496eCdB8Fb8aa9231Da79850c98)); // devWallet
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedFromLimit;
mapping(address => bool) public _isBlackListed;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(
address indexed newAddress,
address indexed oldAddress
);
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event GasForProcessingUpdated(
uint256 indexed newValue,
uint256 indexed oldValue
);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap() {
}
constructor() ERC20("Hey Shiba", "$HeyShib") {
}
receive() external payable {}
function updateUniswapV2Router(address newAddress) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function claimStuckTokens(address _token) external onlyOwner {
}
function excludefromLimit(address account, bool excluded)
external
onlyOwner
{
}
function setBlackList(address addr, bool value) external onlyOwner {
}
function enableTrading() external onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setBuyFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function setSellFee(
uint16 marketing,
uint16 liquidity,
uint16 ecosystem
) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function setEcosystemWallet(address newWallet) external onlyOwner {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
function setSwapEnabled(bool value) external onlyOwner {
}
function setMaxWallet(uint256 amount) external onlyOwner {
}
function setMaxBuyAmount(uint256 amount) external onlyOwner {
}
function setMaxSellAmount(uint256 amount) external onlyOwner {
}
function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "Token: transfer from the zero address");
require(to != address(0), "Token: transfer to the zero address");
require(
!_isBlackListed[from] && !_isBlackListed[to],
"Account is blacklisted"
);
require( isTradingEnabled || _isExcludedFromFees[from],
"Trading not enabled yet"
);
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinimumTokenBalance = contractTokenBalance >=
swapTokensAtAmount;
if (
swapEnabled &&
!swapping &&
from != uniswapV2Pair &&
overMinimumTokenBalance
) {
contractTokenBalance = swapTokensAtAmount;
uint16 totalFee = totalBuyFee + totalSellFee;
uint256 swapTokens = contractTokenBalance
.mul(buyFee.liquidityFee + sellFee.liquidityFee)
.div(totalFee);
swapAndLiquify(swapTokens);
uint256 feeTokens = contractTokenBalance - swapTokens;
swapAndSendToMarketingAndEcosystem(feeTokens);
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
uint256 fees;
if (automatedMarketMakerPairs[to]) {
fees = totalSellFee;
} else if (automatedMarketMakerPairs[from]) {
fees = totalBuyFee;
}
if (!_isExcludedFromLimit[from] && !_isExcludedFromLimit[to]) {
if (automatedMarketMakerPairs[to]) {
require(amount <= maxSellAmount, "Sell exceeds limit");
} else if (automatedMarketMakerPairs[from]) {
require(amount <= maxBuyAmount, "Buy exceeds limit");
if (block.number < tradingStartBlock + BLOCKCOUNT) {
_isBlackListed[to] = true;
}
}
if (!automatedMarketMakerPairs[to]) {
require(<FILL_ME>)
}
}
uint256 feeAmount = amount.mul(fees).div(100);
amount = amount.sub(feeAmount);
super._transfer(from, address(this), feeAmount);
}
super._transfer(from, to, amount);
}
function swapAndSendToMarketingAndEcosystem(uint256 tokens) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
}
| balanceOf(to)+amount<=maxWalletAmount,"Balance exceeds limit" | 48,584 | balanceOf(to)+amount<=maxWalletAmount |
"not enough to mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _mintAmount; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
}
function publicMint(uint256 count) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| totalSupply()+_mintAmount<MAX_SUPPLY,"not enough to mint" | 48,669 | totalSupply()+_mintAmount<MAX_SUPPLY |
"Invalid Merkle Tree proof supplied." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
string memory payload = string(abi.encodePacked(_msgSender()));
require(<FILL_ME>)
require(
addressToMinted[_msgSender()] + count <= MAX_MINT_AMOUNT,
"Exceeds whitelist supply"
);
require(count * cost == msg.value, "Invalid funds provided.");
addressToMinted[_msgSender()] += count;
for (uint256 i; i < count; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function publicMint(uint256 count) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _verify(_leaf(payload),proof),"Invalid Merkle Tree proof supplied." | 48,669 | _verify(_leaf(payload),proof) |
"Exceeds whitelist supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
string memory payload = string(abi.encodePacked(_msgSender()));
require(
_verify(_leaf(payload), proof),
"Invalid Merkle Tree proof supplied."
);
require(<FILL_ME>)
require(count * cost == msg.value, "Invalid funds provided.");
addressToMinted[_msgSender()] += count;
for (uint256 i; i < count; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function publicMint(uint256 count) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| addressToMinted[_msgSender()]+count<=MAX_MINT_AMOUNT,"Exceeds whitelist supply" | 48,669 | addressToMinted[_msgSender()]+count<=MAX_MINT_AMOUNT |
"Invalid funds provided." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
string memory payload = string(abi.encodePacked(_msgSender()));
require(
_verify(_leaf(payload), proof),
"Invalid Merkle Tree proof supplied."
);
require(
addressToMinted[_msgSender()] + count <= MAX_MINT_AMOUNT,
"Exceeds whitelist supply"
);
require(<FILL_ME>)
addressToMinted[_msgSender()] += count;
for (uint256 i; i < count; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function publicMint(uint256 count) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| count*cost==msg.value,"Invalid funds provided." | 48,669 | count*cost==msg.value |
"Public mint is not open" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
}
function publicMint(uint256 count) public payable {
require(<FILL_ME>)
require(totalSupply() + count < MAX_SUPPLY, "Exceeds max supply.");
require(count < MAX_MINT_AMOUNT, "Exceeds max per transaction.");
require(count * cost == msg.value, "Invalid funds provided.");
for (uint256 i; i < count; i++) {
_safeMint(_msgSender(), totalSupply());
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| !onlyWhitelisted,"Public mint is not open" | 48,669 | !onlyWhitelisted |
"Exceeds max supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Metaflag is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
bool public onlyWhitelisted = true;
address public proxyRegistryAddress;
string private _baseURIExtended =
"ipfs://QmXHDUHAK2szMUeNHtX6BpkKLCq1Au1tbZCsJ3r3tR4t88/";
bytes32 public whitelistMerkleRoot;
uint256 public cost = 0.04 ether;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant MAX_MINT_AMOUNT = 10;
mapping(address => bool) public projectProxy;
mapping(address => uint256) public addressToMinted;
constructor(address _proxyRegistryAddress) ERC721("Metaflag", "MFG") {
}
function _baseURI() internal view override returns (string memory) {
}
//OnlyOwner
function setBaseURI(string memory _baseTokenURI) public onlyOwner {
}
function setPrice(uint256 price) public onlyOwner {
}
function changeOnlyWhitelisted() public onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot)
external
onlyOwner
{
}
function teamMint(uint256 _mintAmount) external onlyOwner {
}
function _leaf(string memory payload) internal pure returns (bytes32) {
}
function _verify(bytes32 leaf, bytes32[] memory proof)
internal
view
returns (bool)
{
}
// public
function whitelistMint(uint256 count, bytes32[] calldata proof)
public
payable
{
}
function publicMint(uint256 count) public payable {
require(!onlyWhitelisted, "Public mint is not open");
require(<FILL_ME>)
require(count < MAX_MINT_AMOUNT, "Exceeds max per transaction.");
require(count * cost == msg.value, "Invalid funds provided.");
for (uint256 i; i < count; i++) {
_safeMint(_msgSender(), totalSupply());
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
// The following functions are overrides required by Solidity.
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
contract OwnableDelegateProxy {}
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| totalSupply()+count<MAX_SUPPLY,"Exceeds max supply." | 48,669 | totalSupply()+count<MAX_SUPPLY |
"Purchase would exceed max supply of CoolPengs" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
// Genetically modified for blockchain . Some wear hats, some wear sweaters and some even smoke!
// 10,000 have been adapted on blockchain
// Website - https://www.coolpenguins.club
// Core DEV - @wasithedev
pragma solidity ^0.7.0;
pragma abicoder v2;
contract COOLPENGUINS is ERC721, Ownable {
using SafeMath for uint256;
string public COOLPENGS_PROVENANCE = "";
uint256 public COOLPENGSPRICE = 25000000000000000; // 0.025 ETH
uint public constant MAXCOOLPENGSPURCHASE = 20;
uint256 public constant MAX_COOLPENGS = 10000;
bool public saleIsActive = false;
// Reserve up to 100 COOLPENGS for DEV AND GIVEAWAYS
uint public COOLPENGSRESERVE = 100;
constructor() ERC721("COOL PENGUINS", "PENGS") { }
function withdraw() public onlyOwner {
}
function RESERVEPENGS(address _to, uint256 _reserveAmount) public onlyOwner {
}
function setPengsPrice(uint256 NewPengsPrice) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function MINTCOOLPENGS(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint a COOLPENGUIN");
require(numberOfTokens > 0 && numberOfTokens <= MAXCOOLPENGSPURCHASE, "You can only mint 20 PENGS at a time");
require(<FILL_ME>)
require(msg.value >= COOLPENGSPRICE.mul(numberOfTokens), "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_COOLPENGS) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| totalSupply().add(numberOfTokens)<=MAX_COOLPENGS,"Purchase would exceed max supply of CoolPengs" | 48,674 | totalSupply().add(numberOfTokens)<=MAX_COOLPENGS |
"Only admin is allowed" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| StringUtils.equal(admins[_msgSender()],"superAdmin")||StringUtils.equal(admins[_msgSender()],"dev")||StringUtils.equal(admins[_msgSender()],"fee")||StringUtils.equal(admins[_msgSender()],"admin"),"Only admin is allowed" | 48,721 | StringUtils.equal(admins[_msgSender()],"superAdmin")||StringUtils.equal(admins[_msgSender()],"dev")||StringUtils.equal(admins[_msgSender()],"fee")||StringUtils.equal(admins[_msgSender()],"admin") |
"TokenismAdminWhitelist: caller does not have the Manager role" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
require(<FILL_ME>)
_;
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| isWhitelistedManager(_msgSender())||StringUtils.equal(admins[_msgSender()],"superAdmin")||StringUtils.equal(admins[_msgSender()],"dev")||StringUtils.equal(admins[_msgSender()],"fee")||StringUtils.equal(admins[_msgSender()],"admin"),"TokenismAdminWhitelist: caller does not have the Manager role" | 48,721 | isWhitelistedManager(_msgSender())||StringUtils.equal(admins[_msgSender()],"superAdmin")||StringUtils.equal(admins[_msgSender()],"dev")||StringUtils.equal(admins[_msgSender()],"fee")||StringUtils.equal(admins[_msgSender()],"admin") |
"TokenismAdminWhitelist: caller does not have the Manager role" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
require(<FILL_ME>)
whitelistInfoManager storage newManager = whitelistManagers[_wallet];
_managerWhitelisteds.add(_wallet);
newManager.wallet = _wallet;
newManager.role = _role;
newManager.valid = true;
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| StringUtils.equal(_role,"finance")||StringUtils.equal(_role,"signer")||StringUtils.equal(_role,"assets"),"TokenismAdminWhitelist: caller does not have the Manager role" | 48,721 | StringUtils.equal(_role,"finance")||StringUtils.equal(_role,"signer")||StringUtils.equal(_role,"assets") |
"Only super admin can add admin" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
// admin = _newAdmin;
require(<FILL_ME>)
admins[_newAdmin] = "superAdmin";
admins[superAdmin] = "";
superAdmin = _newAdmin;
return true;
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| _msgSender()==superAdmin,"Only super admin can add admin" | 48,721 | _msgSender()==superAdmin |
"Only super admin can add admin" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
require(<FILL_ME>)
require(
StringUtils.equal(_role, "dev") ||
StringUtils.equal(_role, "fee") ||
StringUtils.equal(_role, "admin"),
"undefind admin role"
);
admins[_newAdmin] = _role;
return true;
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| _msgSender()==superAdmin||Address.isContract(_newAdmin),"Only super admin can add admin" | 48,721 | _msgSender()==superAdmin||Address.isContract(_newAdmin) |
"undefind admin role" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
require(_msgSender() == superAdmin || Address.isContract(_newAdmin) , "Only super admin can add admin");
require(<FILL_ME>)
admins[_newAdmin] = _role;
return true;
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| StringUtils.equal(_role,"dev")||StringUtils.equal(_role,"fee")||StringUtils.equal(_role,"admin"),"undefind admin role" | 48,721 | StringUtils.equal(_role,"dev")||StringUtils.equal(_role,"fee")||StringUtils.equal(_role,"admin") |
"Please Enter Valid User Type" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
require(<FILL_ME>)
whitelistInfo storage u = whitelistUsers[_wallet];
u.userType = _userType;
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| StringUtils.equal(_userType,'Basic')||StringUtils.equal(_userType,'Premium'),"Please Enter Valid User Type" | 48,721 | StringUtils.equal(_userType,'Basic')||StringUtils.equal(_userType,'Premium') |
"only superAdmin can destroy Contract" | pragma solidity ^0.5.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
library StringUtils {
/// @dev Does a byte-by-byte lexicographical comparison of two strings.
/// @return a negative number if `_a` is smaller, zero if they are equal
/// and a positive numbe if `_b` is smaller.
function compare(string memory _a, string memory _b)
internal
pure
returns (int256)
{
}
/// @dev Compares two strings and returns true iff they are equal.
function equal(string memory _a, string memory _b)
internal
pure
returns (bool)
{
}
/// @dev Finds the index of the first occurrence of _needle in _haystack
function indexOf(string memory _haystack, string memory _needle)
internal
pure
returns (int256)
{
}
// function toBytes(address a)
// internal
// pure
// returns (bytes memory) {
// return abi.encodePacked(a);
// }
}
/**
* @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) {
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
}
}
contract TokenismAdminWhitelist is Context {
using Roles for Roles.Role;
Roles.Role private _managerWhitelisteds;
// Add multiple admins option
mapping(address => string) public admins;
address superAdmin;
address feeAddress;
// Setting FeeStatus and fee Percent by Tokenism
// uint8 feeStatus;
// uint8 feePercent;
bool public accreditationCheck = true;
struct whitelistInfoManager {
address wallet;
string role;
bool valid;
}
mapping(address => whitelistInfoManager) whitelistManagers;
constructor() public {
}
function addSuperAdmin(address _superAdmin) public {
}
modifier onlyAdmin() {
}
modifier onlyManager() {
}
// Update Accredential Status
function updateAccreditationCheck(bool status) public onlyManager {
}
// Roles
function addWhitelistedManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function getManagerRole(address _wallet)
public
view
returns (string memory)
{
}
function updateRoleManager(address _wallet, string memory _role)
public
onlyAdmin
{
}
function isWhitelistedManager(address _wallet) public view returns (bool) {
}
// Only Super Admin
function removeWhitelistedManager(address _wallet) public onlyAdmin {
}
function transferOwnership(address _newAdmin)
public
returns (bool)
{
}
function addAdmin(address _newAdmin, string memory _role)
public
onlyAdmin
returns (bool)
{
}
// Function Add Fee Address
function addFeeAddress(address _feeAddress) public {
}
function getFeeAddress()public view returns(address){
}
// // Fee On off functionality
// function setFeeStatus(uint8 option) public returns(bool){ // Fee option must be 0, 1
// require(msg.sender == superAdmin, "Only SuperAdmin on off fee");
// require(option == 1 || option == 0, "Wrong option call only 1 for on and 0 for off");
// require(feePercent > 0, "addPlatformFee! You must have set platform fee to on fee");
// feeStatus = option;
// return true;
// }
// // Get Fee Status
// return feeStatus;
// }
// // Add Fee Percent or change Fee Percentage on Tokenism Platform
// function addPlatformFee(uint8 _fee)public returns(bool){
// require(msg.sender == superAdmin, "Only SuperAmin change Platform Fee");
// require(_fee > 0 && _fee < 100, "Wrong Percentage! Fee must be greater 0 and less than 100");
// feePercent = _fee;
// return true;
// }
// return feePercent;
// }
function isAdmin(address _calle)public view returns(bool) {
}
function isSuperAdmin(address _calle) public view returns(bool){
}
function isManager(address _calle)public returns(bool) {
}
}
contract TokenismWhitelist is Context, TokenismAdminWhitelist {
using Roles for Roles.Role;
Roles.Role private _userWhitelisteds;
mapping(string=> bool) public symbolsDef;
struct whitelistInfo {
bool valid;
address wallet;
bool kycVerified;
bool accredationVerified;
uint256 accredationExpiry;
uint256 taxWithholding;
string userType;
bool suspend;
}
mapping(address => whitelistInfo) public whitelistUsers;
address[] public userList;
// userTypes = Basic || Premium
function addWhitelistedUser(address _wallet, bool _kycVerified, bool _accredationVerified, uint256 _accredationExpiry) public onlyManager {
}
function getWhitelistedUser(address _wallet) public view returns (address, bool, bool, uint256, uint256){
}
function updateKycWhitelistedUser(address _wallet, bool _kycVerified) public onlyManager {
}
function updateAccredationWhitelistedUser(address _wallet, uint256 _accredationExpiry) public onlyManager {
}
function updateTaxWhitelistedUser(address _wallet, uint256 _taxWithholding) public onlyManager {
}
function suspendUser(address _wallet) public onlyManager {
}
function activeUser(address _wallet) public onlyManager {
}
function updateUserType(address _wallet, string memory _userType) public onlyManager {
}
// Check user status
function isWhitelistedUser(address wallet) public view returns (uint) {
}
function removeWhitelistedUser(address _wallet) public onlyManager {
}
/* Symbols Deployed Add to Contract */
function addSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
// On destroy Symbol Removed
function removeSymbols(string calldata _symbols)
external
onlyManager
returns(bool){
}
function closeTokenismWhitelist() public {
require(<FILL_ME>)
selfdestruct(msg.sender);
}
function storedAllData()public view onlyAdmin returns(
address[] memory _userList,
bool[] memory _validity,
bool[] memory _kycVery,
bool[] memory _accredationVery,
uint256[] memory _accredationExpir,
uint256[] memory _taxWithHold,
uint256[] memory _userTypes
)
{
}
function userType(address _caller) public view returns(bool){
}
}
| StringUtils.equal(admins[_msgSender()],"superAdmin"),"only superAdmin can destroy Contract" | 48,721 | StringUtils.equal(admins[_msgSender()],"superAdmin") |
"!depositAt" | contract SVault is ERC20 {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public governance;
address public pendingGovernance;
address public controller;
IERC20 public eToken;
uint256 public harvestTime;
uint256 public harvestReward;
uint256 public harvestBalance;
uint256 public harvestPeriod;
mapping(address => uint256) public depositAt;
event Deposit(address indexed account, uint256 amount, uint256 share);
event Withdraw(address indexed account, uint256 amount, uint256 share);
constructor(address _eToken, address _controller) public ERC20(
string(abi.encodePacked("sunder ", ERC20(_eToken).name())),
string(abi.encodePacked("s", ERC20(_eToken).symbol()))) {
}
function acceptGovernance() external {
}
function setPendingGovernance(address _pendingGovernance) external {
}
function setController(address _controller) external {
}
function depositAll() external {
}
function deposit(uint256 _amount) public {
}
function withdrawAll() external {
}
// No rebalance implementation for lower fees and faster swaps
function withdraw(uint256 _shares) public {
require(<FILL_ME>)
uint256 _amount = (eTokenBalance().mul(_shares)).div(totalSupply());
_burn(msg.sender, _shares);
eToken.safeTransfer(msg.sender, _amount);
emit Withdraw(msg.sender, _amount, _shares);
}
function eTokenBalance() public view returns (uint256) {
}
function getPricePerFullShare() public view returns (uint256) {
}
function annualRewardPerShare() public view returns (uint256) {
}
function setHarvestInfo(uint256 _harvestReward) external {
}
function sweep(address _token) external {
}
}
| depositAt[msg.sender]<block.number,"!depositAt" | 48,757 | depositAt[msg.sender]<block.number |
"eToken = _token" | contract SVault is ERC20 {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public governance;
address public pendingGovernance;
address public controller;
IERC20 public eToken;
uint256 public harvestTime;
uint256 public harvestReward;
uint256 public harvestBalance;
uint256 public harvestPeriod;
mapping(address => uint256) public depositAt;
event Deposit(address indexed account, uint256 amount, uint256 share);
event Withdraw(address indexed account, uint256 amount, uint256 share);
constructor(address _eToken, address _controller) public ERC20(
string(abi.encodePacked("sunder ", ERC20(_eToken).name())),
string(abi.encodePacked("s", ERC20(_eToken).symbol()))) {
}
function acceptGovernance() external {
}
function setPendingGovernance(address _pendingGovernance) external {
}
function setController(address _controller) external {
}
function depositAll() external {
}
function deposit(uint256 _amount) public {
}
function withdrawAll() external {
}
// No rebalance implementation for lower fees and faster swaps
function withdraw(uint256 _shares) public {
}
function eTokenBalance() public view returns (uint256) {
}
function getPricePerFullShare() public view returns (uint256) {
}
function annualRewardPerShare() public view returns (uint256) {
}
function setHarvestInfo(uint256 _harvestReward) external {
}
function sweep(address _token) external {
require(msg.sender == governance, "!governance");
require(<FILL_ME>)
uint256 _balance = IERC20(_token).balanceOf(address(this));
address _rewards = IController(controller).rewards();
IERC20(_token).safeTransfer(_rewards, _balance);
}
}
| address(eToken)!=_token,"eToken = _token" | 48,757 | address(eToken)!=_token |
null | /*
SNET SAVE
fully decentralized AGI earning platform
How does it work
User buys in with AGI and receives SNET
SNET enables the user to collect dividends in AGI instant on every transaction that is happening on the platform
10% of every buyIn are distributed amongst all existing SNET holders.
10% are beeing distributed on every sell amongst all remaining SNET holders.
This makes our Platform sustainable and will therefore run forever.
REMINDER: Developers have at no time access to userfunds thatswhy you need to make sure you keep your private keys safe.
Developers will also NEVER ask you for your privatekeys or any personal Information.
Developers dont have any access to contract balance or any AGI or SNET inside the contract other than their own personal funds.
SNET save is on the ETHEREUM Blockchain and it will run and do forever what it was programmed to do. TRUST THE CODE.
SNETSAVE is 100% decentralized and 100% safe to use
All payments are beeing paid out instant in AGI (SingularityNET ERC20 token)
If you have any Questions please visit our telgram and discord channels
*/
pragma solidity ^0.4.26;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract TOKEN {
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);
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Snet is Ownable {
mapping(address => bool) internal ambassadors_;
uint256 constant internal ambassadorMaxPurchase_ = 100000e8;
mapping(address => uint256) internal ambassadorAccumulatedQuota_;
bool public onlyAmbassadors = true;
uint256 ACTIVATION_TIME = 1580684400;
modifier antiEarlyWhale(uint256 _amountOfAGI, address _customerAddress){
if (now >= ACTIVATION_TIME) {
onlyAmbassadors = false;
}
if (onlyAmbassadors) {
require(<FILL_ME>)
ambassadorAccumulatedQuota_[_customerAddress] = SafeMath.add(ambassadorAccumulatedQuota_[_customerAddress], _amountOfAGI);
_;
} else {
if(now < (ACTIVATION_TIME + 60 seconds)) {
require(tx.gasprice <= 0.1 szabo);
}
onlyAmbassadors = false;
_;
}
}
modifier onlyTokenHolders {
}
modifier onlyDivis {
}
event onDistribute(
address indexed customerAddress,
uint256 price
);
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingAGI,
uint256 tokensMinted,
address indexed referredBy,
uint timestamp
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 agiEarned,
uint timestamp
);
event onReinvestment(
address indexed customerAddress,
uint256 agiReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 agiWithdrawn
);
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
string public name = "SnetSave";
string public symbol = "SNET";
uint8 constant public decimals = 8;
uint256 internal entryFee_ = 10;
uint256 internal transferFee_ = 1;
uint256 internal exitFee_ = 10;
uint256 internal referralFee_ = 20; // 20% of the 10% buy or sell fees makes it 2%
uint256 internal maintenanceFee_ = 20; // 20% of the 10% buy or sell fees makes it 2%
address internal maintenanceAddress1;
address internal maintenanceAddress2;
uint256 constant internal magnitude = 2 ** 64;
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => uint256) internal invested_;
uint256 internal tokenSupply_;
uint256 internal profitPerShare_;
uint256 public stakingRequirement = 100e8;
uint256 public totalHolder = 0;
uint256 public totalDonation = 0;
TOKEN erc20;
constructor() public {
}
function updateMaintenanceAddress1(address maintenance) public {
}
function updateMaintenanceAddress2(address maintenance) public {
}
function checkAndTransferAGI(uint256 _amount) private {
}
function distribute(uint256 _amount) public returns (uint256) {
}
function buy(uint256 _amount, address _referredBy) public returns (uint256) {
}
function buyFor(uint256 _amount, address _customerAddress, address _referredBy) public returns (uint256) {
}
function() payable public {
}
function reinvest() onlyDivis public {
}
function exit() external {
}
function withdraw() onlyDivis public {
}
function sell(uint256 _amountOfTokens) onlyTokenHolders public {
}
function transfer(address _toAddress, uint256 _amountOfTokens) onlyTokenHolders external returns (bool){
}
function setName(string _name) onlyOwner public
{
}
function setSymbol(string _symbol) onlyOwner public
{
}
function totalAgiBalance() public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function myTokens() public view returns (uint256) {
}
function myDividends(bool _includeReferralBonus) public view returns (uint256) {
}
function balanceOf(address _customerAddress) public view returns (uint256) {
}
function dividendsOf(address _customerAddress) public view returns (uint256) {
}
function sellPrice() public view returns (uint256) {
}
function buyPrice() public view returns (uint256) {
}
function calculateTokensReceived(uint256 _agiToSpend) public view returns (uint256) {
}
function calculateAgiReceived(uint256 _tokensToSell) public view returns (uint256) {
}
function getInvested() public view returns (uint256) {
}
function purchaseTokens(address _referredBy, address _customerAddress, uint256 _incomingAGI) internal antiEarlyWhale(_incomingAGI, _customerAddress) returns (uint256) {
}
}
| (ambassadors_[_customerAddress]==true&&(ambassadorAccumulatedQuota_[_customerAddress]+_amountOfAGI)<=ambassadorMaxPurchase_) | 48,764 | (ambassadors_[_customerAddress]==true&&(ambassadorAccumulatedQuota_[_customerAddress]+_amountOfAGI)<=ambassadorMaxPurchase_) |
"DragonToken: bad CID" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./structs/DragonInfo.sol";
import "./access/BaseAccessControl.sol";
contract DragonToken is ERC721, BaseAccessControl {
using Address for address;
using Counters for Counters.Counter;
Counters.Counter private _dragonIds;
// Mapping token id to dragon details
mapping(uint => uint) private _info;
// Mapping token id to cid
mapping(uint => string) private _cids;
string private _defaultMetadataCid;
address private _dragonCreator;
constructor(string memory defaultCid, address accessControl)
ERC721("CryptoDragons", "CD")
BaseAccessControl(accessControl) {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function dragonCreatorAddress() public view returns(address) {
}
function setDragonCreatorAddress(address newAddress) external onlyRole(CEO_ROLE) {
}
function hasMetadataCid(uint tokenId) public view returns(bool) {
}
function setMetadataCid(uint tokenId, string calldata cid) external onlyRole(COO_ROLE) {
require(<FILL_ME>)
require(!hasMetadataCid(tokenId), "DragonToken: CID is already set");
_cids[tokenId] = cid;
}
function defaultMetadataCid() public view returns (string memory){
}
function setDefaultMetadataCid(string calldata newDefaultCid) external onlyRole(COO_ROLE) {
}
function dragonInfo(uint dragonId) public view returns (DragonInfo.Details memory) {
}
function strengthOf(uint dragonId) external view returns (uint) {
}
function isSiblings(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function isParent(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function mint(address to, DragonInfo.Details calldata info) external returns (uint) {
}
function setStrength(uint dragonId) external returns (uint) {
}
}
| bytes(cid).length>=46,"DragonToken: bad CID" | 48,799 | bytes(cid).length>=46 |
"DragonToken: CID is already set" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./structs/DragonInfo.sol";
import "./access/BaseAccessControl.sol";
contract DragonToken is ERC721, BaseAccessControl {
using Address for address;
using Counters for Counters.Counter;
Counters.Counter private _dragonIds;
// Mapping token id to dragon details
mapping(uint => uint) private _info;
// Mapping token id to cid
mapping(uint => string) private _cids;
string private _defaultMetadataCid;
address private _dragonCreator;
constructor(string memory defaultCid, address accessControl)
ERC721("CryptoDragons", "CD")
BaseAccessControl(accessControl) {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function dragonCreatorAddress() public view returns(address) {
}
function setDragonCreatorAddress(address newAddress) external onlyRole(CEO_ROLE) {
}
function hasMetadataCid(uint tokenId) public view returns(bool) {
}
function setMetadataCid(uint tokenId, string calldata cid) external onlyRole(COO_ROLE) {
require(bytes(cid).length >= 46, "DragonToken: bad CID");
require(<FILL_ME>)
_cids[tokenId] = cid;
}
function defaultMetadataCid() public view returns (string memory){
}
function setDefaultMetadataCid(string calldata newDefaultCid) external onlyRole(COO_ROLE) {
}
function dragonInfo(uint dragonId) public view returns (DragonInfo.Details memory) {
}
function strengthOf(uint dragonId) external view returns (uint) {
}
function isSiblings(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function isParent(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function mint(address to, DragonInfo.Details calldata info) external returns (uint) {
}
function setStrength(uint dragonId) external returns (uint) {
}
}
| !hasMetadataCid(tokenId),"DragonToken: CID is already set" | 48,799 | !hasMetadataCid(tokenId) |
"DragonToken: not enough privileges to call the method" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./structs/DragonInfo.sol";
import "./access/BaseAccessControl.sol";
contract DragonToken is ERC721, BaseAccessControl {
using Address for address;
using Counters for Counters.Counter;
Counters.Counter private _dragonIds;
// Mapping token id to dragon details
mapping(uint => uint) private _info;
// Mapping token id to cid
mapping(uint => string) private _cids;
string private _defaultMetadataCid;
address private _dragonCreator;
constructor(string memory defaultCid, address accessControl)
ERC721("CryptoDragons", "CD")
BaseAccessControl(accessControl) {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function dragonCreatorAddress() public view returns(address) {
}
function setDragonCreatorAddress(address newAddress) external onlyRole(CEO_ROLE) {
}
function hasMetadataCid(uint tokenId) public view returns(bool) {
}
function setMetadataCid(uint tokenId, string calldata cid) external onlyRole(COO_ROLE) {
}
function defaultMetadataCid() public view returns (string memory){
}
function setDefaultMetadataCid(string calldata newDefaultCid) external onlyRole(COO_ROLE) {
}
function dragonInfo(uint dragonId) public view returns (DragonInfo.Details memory) {
}
function strengthOf(uint dragonId) external view returns (uint) {
}
function isSiblings(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function isParent(uint dragon1Id, uint dragon2Id) external view returns (bool) {
}
function mint(address to, DragonInfo.Details calldata info) external returns (uint) {
require(<FILL_ME>)
_dragonIds.increment();
uint newDragonId = uint(_dragonIds.current());
_info[newDragonId] = DragonInfo.getValue(info);
_mint(to, newDragonId);
return newDragonId;
}
function setStrength(uint dragonId) external returns (uint) {
}
}
| _msgSender()==dragonCreatorAddress(),"DragonToken: not enough privileges to call the method" | 48,799 | _msgSender()==dragonCreatorAddress() |
null | pragma solidity 0.5.13;
/**
* @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.
*/
constructor () public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address => bool) public allowedAddresses;
mapping(address => bool) public lockedAddresses;
bool public locked = false;
function allowAddress(address _addr, bool _allowed) public onlyOwner {
}
function lockAddress(address _addr, bool _locked) public onlyOwner {
}
function setLocked(bool _locked) public onlyOwner {
}
function canTransfer(address _addr) public view 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 balance) {
}
}
/**
* @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
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0) && _to != address(this));
require(<FILL_ME>)
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
/**
* @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 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue)
public
returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue)
public
returns (bool success) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
}
contract AIRToken is BurnableToken {
string public constant name = "AIR Token";
string public constant symbol = "AIR";
uint public constant decimals = 18;
// there is no problem in using * here instead of .mul()
uint256 public constant initialSupply = 4000000000 * (10 ** uint256(decimals));
// Constructors
constructor () public {
}
}
| canTransfer(msg.sender)&&canTransfer(_from) | 48,816 | canTransfer(msg.sender)&&canTransfer(_from) |
null | pragma solidity ^0.5.8;
//Change the contract name to your token name
contract unixToken {
// Name your custom token
string public constant name = "Unix Token";
// Name your custom token symbol
string public constant symbol = "UNIX";
uint8 public constant decimals = 18;
// Contract owner will be your Link account
address public owner;
address public treasury;
uint256 public totalSupply;
mapping (address => mapping (address => uint256)) private allowed;
mapping (address => uint256) private balances;
event Approval(address indexed tokenholder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() public {
}
function () external payable {
}
function allowance(address _tokenholder, address _spender) public view returns (uint256 remaining) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function balanceOf(address _tokenholder) public view returns (uint256 balance) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
require(_spender != address(0));
require(_spender != msg.sender);
require(<FILL_ME>)
allowed[msg.sender][_spender] = allowed[msg.sender][_spender] + _addedValue;
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function transferOwnership(address _newOwner) public {
}
function transferableTokens(address holder) public view returns (uint256) {
}
}
| allowed[msg.sender][_spender]<=allowed[msg.sender][_spender]+_addedValue | 48,846 | allowed[msg.sender][_spender]<=allowed[msg.sender][_spender]+_addedValue |
null | pragma solidity ^0.5.8;
//Change the contract name to your token name
contract unixToken {
// Name your custom token
string public constant name = "Unix Token";
// Name your custom token symbol
string public constant symbol = "UNIX";
uint8 public constant decimals = 18;
// Contract owner will be your Link account
address public owner;
address public treasury;
uint256 public totalSupply;
mapping (address => mapping (address => uint256)) private allowed;
mapping (address => uint256) private balances;
event Approval(address indexed tokenholder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() public {
}
function () external payable {
}
function allowance(address _tokenholder, address _spender) public view returns (uint256 remaining) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function balanceOf(address _tokenholder) public view returns (uint256 balance) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != msg.sender);
require(_to != address(0));
require(_to != address(this));
require(<FILL_ME>)
require(balances[_to] <= balances[_to] + _value);
require(_value <= transferableTokens(msg.sender));
balances[msg.sender] = balances[msg.sender] - _value;
balances[_to] = balances[_to] + _value;
emit Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function transferOwnership(address _newOwner) public {
}
function transferableTokens(address holder) public view returns (uint256) {
}
}
| balances[msg.sender]-_value<=balances[msg.sender] | 48,846 | balances[msg.sender]-_value<=balances[msg.sender] |
null | pragma solidity ^0.5.8;
//Change the contract name to your token name
contract unixToken {
// Name your custom token
string public constant name = "Unix Token";
// Name your custom token symbol
string public constant symbol = "UNIX";
uint8 public constant decimals = 18;
// Contract owner will be your Link account
address public owner;
address public treasury;
uint256 public totalSupply;
mapping (address => mapping (address => uint256)) private allowed;
mapping (address => uint256) private balances;
event Approval(address indexed tokenholder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() public {
}
function () external payable {
}
function allowance(address _tokenholder, address _spender) public view returns (uint256 remaining) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function balanceOf(address _tokenholder) public view returns (uint256 balance) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != msg.sender);
require(_to != address(0));
require(_to != address(this));
require(balances[msg.sender] - _value <= balances[msg.sender]);
require(<FILL_ME>)
require(_value <= transferableTokens(msg.sender));
balances[msg.sender] = balances[msg.sender] - _value;
balances[_to] = balances[_to] + _value;
emit Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function transferOwnership(address _newOwner) public {
}
function transferableTokens(address holder) public view returns (uint256) {
}
}
| balances[_to]<=balances[_to]+_value | 48,846 | balances[_to]<=balances[_to]+_value |
null | pragma solidity ^0.5.8;
//Change the contract name to your token name
contract unixToken {
// Name your custom token
string public constant name = "Unix Token";
// Name your custom token symbol
string public constant symbol = "UNIX";
uint8 public constant decimals = 18;
// Contract owner will be your Link account
address public owner;
address public treasury;
uint256 public totalSupply;
mapping (address => mapping (address => uint256)) private allowed;
mapping (address => uint256) private balances;
event Approval(address indexed tokenholder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() public {
}
function () external payable {
}
function allowance(address _tokenholder, address _spender) public view returns (uint256 remaining) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function balanceOf(address _tokenholder) public view returns (uint256 balance) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_from != address(0));
require(_from != address(this));
require(_to != _from);
require(_to != address(0));
require(_to != address(this));
require(_value <= transferableTokens(_from));
require(<FILL_ME>)
require(balances[_from] - _value <= balances[_from]);
require(balances[_to] <= balances[_to] + _value);
allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value;
balances[_from] = balances[_from] - _value;
balances[_to] = balances[_to] + _value;
emit Transfer(_from, _to, _value);
return true;
}
function transferOwnership(address _newOwner) public {
}
function transferableTokens(address holder) public view returns (uint256) {
}
}
| allowed[_from][msg.sender]-_value<=allowed[_from][msg.sender] | 48,846 | allowed[_from][msg.sender]-_value<=allowed[_from][msg.sender] |
null | pragma solidity ^0.5.8;
//Change the contract name to your token name
contract unixToken {
// Name your custom token
string public constant name = "Unix Token";
// Name your custom token symbol
string public constant symbol = "UNIX";
uint8 public constant decimals = 18;
// Contract owner will be your Link account
address public owner;
address public treasury;
uint256 public totalSupply;
mapping (address => mapping (address => uint256)) private allowed;
mapping (address => uint256) private balances;
event Approval(address indexed tokenholder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() public {
}
function () external payable {
}
function allowance(address _tokenholder, address _spender) public view returns (uint256 remaining) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function balanceOf(address _tokenholder) public view returns (uint256 balance) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_from != address(0));
require(_from != address(this));
require(_to != _from);
require(_to != address(0));
require(_to != address(this));
require(_value <= transferableTokens(_from));
require(allowed[_from][msg.sender] - _value <= allowed[_from][msg.sender]);
require(<FILL_ME>)
require(balances[_to] <= balances[_to] + _value);
allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value;
balances[_from] = balances[_from] - _value;
balances[_to] = balances[_to] + _value;
emit Transfer(_from, _to, _value);
return true;
}
function transferOwnership(address _newOwner) public {
}
function transferableTokens(address holder) public view returns (uint256) {
}
}
| balances[_from]-_value<=balances[_from] | 48,846 | balances[_from]-_value<=balances[_from] |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
require(_masterWallet != _linkedWallet && _linkedWallet != address(0));
require(<FILL_ME>)
require(!isLinkedWallet(_linkedWallet) && !isMasterWallet(_linkedWallet));
AddressRelations storage rel = masterToSlaves[_masterWallet];
require(rel.slaves.values.length < maxLinkedWalletCount);
rel.slaves.values.push(_linkedWallet);
rel.slaves.keys[_linkedWallet] = rel.slaves.values.length - 1;
slaveToMasterAddress[_linkedWallet] = _masterWallet;
WalletLinked(_masterWallet, _linkedWallet);
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| isMasterWallet(_masterWallet) | 49,000 | isMasterWallet(_masterWallet) |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
require(_masterWallet != _linkedWallet && _linkedWallet != address(0));
require(isMasterWallet(_masterWallet));
require(<FILL_ME>)
AddressRelations storage rel = masterToSlaves[_masterWallet];
require(rel.slaves.values.length < maxLinkedWalletCount);
rel.slaves.values.push(_linkedWallet);
rel.slaves.keys[_linkedWallet] = rel.slaves.values.length - 1;
slaveToMasterAddress[_linkedWallet] = _masterWallet;
WalletLinked(_masterWallet, _linkedWallet);
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| !isLinkedWallet(_linkedWallet)&&!isMasterWallet(_linkedWallet) | 49,000 | !isLinkedWallet(_linkedWallet)&&!isMasterWallet(_linkedWallet) |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
require(<FILL_ME>)
require(_new != address(0));
if (isMasterWallet(_old)) {
// Cannt change master address with existed linked
require(!isLinkedWallet(_new));
require(masterToSlaves[_new].slaves.values.length == 0);
changeMasterAddress(_old, _new);
}
else {
// Cannt change linked address with existed master and linked to another master
require(!isMasterWallet(_new) && !isLinkedWallet(_new));
changeLinkedAddress(_old, _new);
}
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| isMasterWallet(_old)||isLinkedWallet(_old) | 49,000 | isMasterWallet(_old)||isLinkedWallet(_old) |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
require(isMasterWallet(_old) || isLinkedWallet(_old));
require(_new != address(0));
if (isMasterWallet(_old)) {
// Cannt change master address with existed linked
require(<FILL_ME>)
require(masterToSlaves[_new].slaves.values.length == 0);
changeMasterAddress(_old, _new);
}
else {
// Cannt change linked address with existed master and linked to another master
require(!isMasterWallet(_new) && !isLinkedWallet(_new));
changeLinkedAddress(_old, _new);
}
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| !isLinkedWallet(_new) | 49,000 | !isLinkedWallet(_new) |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
require(isMasterWallet(_old) || isLinkedWallet(_old));
require(_new != address(0));
if (isMasterWallet(_old)) {
// Cannt change master address with existed linked
require(!isLinkedWallet(_new));
require(<FILL_ME>)
changeMasterAddress(_old, _new);
}
else {
// Cannt change linked address with existed master and linked to another master
require(!isMasterWallet(_new) && !isLinkedWallet(_new));
changeLinkedAddress(_old, _new);
}
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| masterToSlaves[_new].slaves.values.length==0 | 49,000 | masterToSlaves[_new].slaves.values.length==0 |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
require(isMasterWallet(_old) || isLinkedWallet(_old));
require(_new != address(0));
if (isMasterWallet(_old)) {
// Cannt change master address with existed linked
require(!isLinkedWallet(_new));
require(masterToSlaves[_new].slaves.values.length == 0);
changeMasterAddress(_old, _new);
}
else {
// Cannt change linked address with existed master and linked to another master
require(<FILL_ME>)
changeLinkedAddress(_old, _new);
}
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| !isMasterWallet(_new)&&!isLinkedWallet(_new) | 49,000 | !isMasterWallet(_new)&&!isLinkedWallet(_new) |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
address masterWallet = getMasterWallet(msg.sender);
require(<FILL_ME>)
require(!freezed[masterWallet]);
balances[masterWallet] -= _amount;
cryptaurToken.transfer(masterWallet, _amount);
Withdraw(masterWallet, _amount);
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| balances[masterWallet]>=_amount | 49,000 | balances[masterWallet]>=_amount |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
address masterWallet = getMasterWallet(msg.sender);
require(balances[masterWallet] >= _amount);
require(<FILL_ME>)
balances[masterWallet] -= _amount;
cryptaurToken.transfer(masterWallet, _amount);
Withdraw(masterWallet, _amount);
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| !freezed[masterWallet] | 49,000 | !freezed[masterWallet] |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
require(<FILL_ME>)
uint fee;
if (cryptaurRewards != 0 && cryptaurReserveFund != 0) {
fee = CryptaurRewards(cryptaurRewards).payment(_buyer, _seller, _amount, _opinionLeader);
}
balances[_buyer] -= _amount;
balances[_seller] += _amount - fee;
if (fee != 0) {
balances[cryptaurReserveFund] += fee;
CryputarReserveFund(cryptaurReserveFund).depositNotification(_amount);
}
Payment(_buyer, _seller, _amount, _opinionLeader, false);
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| balances[_buyer]>=_amount | 49,000 | balances[_buyer]>=_amount |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
address buyerMasterWallet = getOrAddMasterWallet(_buyer);
require(<FILL_ME>)
uint fee;
if (cryptaurRewards != 0 && cryptaurReserveFund != 0) {
fee = CryptaurRewards(cryptaurRewards).payment(buyerMasterWallet, msg.sender, _amount, _opinionLeader);
}
balances[buyerMasterWallet] -= _amount;
balances[msg.sender] += _amount - fee;
if (unlimitedMode[buyerMasterWallet][msg.sender] == UnlimitedMode.LIMITED)
available[buyerMasterWallet][msg.sender] -= _amount;
if (fee != 0) {
balances[cryptaurReserveFund] += fee;
CryputarReserveFund(cryptaurReserveFund).depositNotification(_amount);
}
Payment(buyerMasterWallet, msg.sender, _amount, _opinionLeader, true);
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| balanceOf2Internal(buyerMasterWallet,msg.sender)>=_amount | 49,000 | balanceOf2Internal(buyerMasterWallet,msg.sender)>=_amount |
null | /*
This file is part of the Cryptaur Contract.
The CryptaurToken Contract is free software: you can redistribute it and/or
modify it under the terms of the GNU lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. See the GNU lesser General Public License
for more details.
You should have received a copy of the GNU lesser General Public License
along with the CryptaurToken Contract. If not, see <http://www.gnu.org/licenses/>.
@author Ilya Svirin <[email protected]>
Donation address 0x3Ad38D1060d1c350aF29685B2b8Ec3eDE527452B
*/
pragma solidity ^0.4.19;
contract owned {
address public owner;
address public candidate;
function owned() payable public {
}
modifier onlyOwner {
}
function changeOwner(address _owner) onlyOwner public {
}
function confirmOwner() public {
}
}
/**
* @title Part of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Base {
uint public totalSupply;
function balanceOf(address who) public constant returns (uint);
function transfer(address to, uint value) public;
}
contract CryptaurRewards {
function payment(address _buyer, address _seller, uint _amount, address _opinionLeader) public returns(uint fee);
}
contract CryputarReserveFund {
function depositNotification(uint _amount) public;
function withdrawNotification(uint _amount) public;
}
/**
* @title Allows to store liked adsress(slave address) connected to the main address (master address)
*/
contract AddressBook {
struct AddressRelations {
SlaveDictionary slaves;
bool hasValue;
}
struct SlaveDictionary
{
address[] values;
mapping(address => uint) keys;
}
event WalletLinked(address indexed _master, address indexed _slave);
event WalletUnlinked(address indexed _master, address indexed _slave);
event AddressChanged(address indexed _old, address indexed _new);
mapping(address => AddressRelations) private masterToSlaves;
mapping(address => address) private slaveToMasterAddress;
uint8 public maxLinkedWalletCount = 5;
/**
* Only owner of master wallet can add additional wallet.
*/
function linkToMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function unLinkFromMasterWalletInternal(address _masterWallet, address _linkedWallet) internal {
}
function getLinkedWallets(address _wallet) public view returns (address[]) {
}
function isMasterWallet(address _addr) internal constant returns (bool) {
}
function isLinkedWallet(address _addr) internal constant returns (bool) {
}
/**
* Guess that address book already had changing address.
*/
function applyChangeWalletAddress(address _old, address _new) internal {
}
function changeLinkedAddress(address _old, address _new) private {
}
function changeMasterAddress(address _old, address _new) private {
}
function addMasterWallet(address _master) internal {
}
function getMasterWallet(address _wallet) internal constant returns(address) {
}
/**
* Try to find master address by any other; otherwise add to address book as master.
*/
function getOrAddMasterWallet(address _wallet) internal returns (address) {
}
}
contract CryptaurDepository is owned, AddressBook {
enum UnlimitedMode {UNLIMITED,LIMITED}
event Deposit(address indexed _who, uint _amount, bytes32 _txHash);
event Withdraw(address indexed _who, uint _amount);
event Payment(address indexed _buyer, address indexed _seller, uint _amount, address indexed _opinionLeader, bool _dapp);
event Freeze(address indexed _who, bool _freeze);
event Share(address indexed _who, address indexed _dapp, uint _amount);
ERC20Base cryptaurToken = ERC20Base(0x88d50B466BE55222019D71F9E8fAe17f5f45FCA1);
address cryptaurRecovery;
address cryptaurRewards;
address cryptaurReserveFund;
address backend;
modifier onlyBackend {
}
modifier onlyOwnerOrBackend {
}
modifier notFreezed {
}
mapping(address => uint) internal balances;
mapping(address => mapping (address => uint256)) public available;
mapping(address => bool) public freezed;
mapping(address => mapping(address => UnlimitedMode)) public unlimitedMode;
bool freezedAll;
function CryptaurDepository() owned() public {}
function balanceOf(address _who) constant public returns (uint) {
}
function setUnlimitedMode(bool _unlimited, address _dapp) public {
}
function transferToToken(address[] _addresses) public onlyOwnerOrBackend {
}
function setBackend(address _backend) onlyOwner public {
}
function setCryptaurRecovery(address _cryptaurRecovery) onlyOwner public {
}
function setCryptaurToken(address _cryptaurToken) onlyOwner public {
}
function setCryptaurRewards(address _cryptaurRewards) onlyOwner public {
}
function setCryptaurReserveFund(address _cryptaurReserveFund) onlyOwner public {
}
function changeAddress(address _old, address _new) public {
}
function linkToMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function unLinkFromMasterWallet(address _masterWaller, address _linkedWaller) public {
}
function setMaxLinkedWalletCount(uint8 _newMaxCount) public onlyOwnerOrBackend {
}
function freeze(address _who, bool _freeze) onlyOwner public {
}
function freeze(bool _freeze) public onlyOwnerOrBackend {
}
function deposit(address _who, uint _amount, bytes32 _txHash) onlyBackend public {
}
function withdraw(uint _amount) public notFreezed {
}
function balanceOf2(address _who, address _dapp) constant public returns (uint) {
}
function balanceOf2Internal(address _who, address _dapp) constant internal returns (uint) {
}
/**
* @dev Function pay wrapper. Using only for dapp.
*/
function pay2(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
function pay(address _seller, uint _amount, address _opinionLeader) public notFreezed {
}
/**
* @dev Common internal pay function.
* OpinionLeader is optional, can be zero.
*/
function payInternal(address _buyer, address _seller, uint _amount, address _opinionLeader) internal {
}
function payDAPP(address _buyer, uint _amount, address _opinionLeader) public notFreezed {
}
function shareBalance(address _dapp, uint _amount) public notFreezed {
}
function transferFromFund(address _to, uint _amount) public {
require(msg.sender == owner || msg.sender == cryptaurRewards || msg.sender == backend);
require(cryptaurReserveFund != address(0));
require(<FILL_ME>)
address masterWallet = getOrAddMasterWallet(_to);
balances[masterWallet] += _amount;
balances[cryptaurReserveFund] -= _amount;
CryputarReserveFund(cryptaurReserveFund).withdrawNotification(_amount);
}
}
// test only
contract CryptaurDepositoryTest is CryptaurDepository {
function CryptaurDepositoryTest() CryptaurDepository() {}
// test only
function testDrip(address _who, address _dapp, uint _amount) public {
}
}
| balances[cryptaurReserveFund]>=_amount | 49,000 | balances[cryptaurReserveFund]>=_amount |
'All tokens have been minted' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(!isAllowListActive, 'Only allowing from Allow List');
require(<FILL_ME>)
require(numberOfTokens <= PURCHASE_LIMIT, 'Would exceed PURCHASE_LIMIT');
/**
* @dev The last person to purchase might pay too much.
* This way however they can't get sniped.
* If this happens, we'll refund the Eth for the unavailable tokens.
*/
require(totalPublicSupply < FTAlE_PUBLIC, 'Purchase would exceed FTAlE_PUBLIC');
require(PRICE * numberOfTokens <= msg.value, 'ETH amount is not sufficient');
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Since they can get here while exceeding the FTAlE_MAX,
* we have to make sure to not mint any additional tokens.
*/
if (totalPublicSupply < FTAlE_PUBLIC) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* And we don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_safeMint(msg.sender, tokenId);
}
}
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| totalSupply()<FTAlE_MAX,'All tokens have been minted' | 49,003 | totalSupply()<FTAlE_MAX |
'ETH amount is not sufficient' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(!isAllowListActive, 'Only allowing from Allow List');
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(numberOfTokens <= PURCHASE_LIMIT, 'Would exceed PURCHASE_LIMIT');
/**
* @dev The last person to purchase might pay too much.
* This way however they can't get sniped.
* If this happens, we'll refund the Eth for the unavailable tokens.
*/
require(totalPublicSupply < FTAlE_PUBLIC, 'Purchase would exceed FTAlE_PUBLIC');
require(<FILL_ME>)
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Since they can get here while exceeding the FTAlE_MAX,
* we have to make sure to not mint any additional tokens.
*/
if (totalPublicSupply < FTAlE_PUBLIC) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* And we don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_safeMint(msg.sender, tokenId);
}
}
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| PRICE*numberOfTokens<=msg.value,'ETH amount is not sufficient' | 49,003 | PRICE*numberOfTokens<=msg.value |
'You are not on the Allow List' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(isAllowListActive, 'Allow List is not active');
require(<FILL_ME>)
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(numberOfTokens <= allowListMaxMint, 'Cannot purchase this many tokens');
require(totalPublicSupply + numberOfTokens <= FTAlE_PUBLIC, 'Purchase would exceed FTAlE_PUBLIC');
require(_allowListClaimed[msg.sender] + numberOfTokens <= allowListMaxMint, 'Purchase exceeds max allowed');
require(PRE_PRICE * numberOfTokens <= msg.value, 'ETH amount is not sufficient');
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* We don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_allowListClaimed[msg.sender] += 1;
_safeMint(msg.sender, tokenId);
}
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| _allowList[msg.sender],'You are not on the Allow List' | 49,003 | _allowList[msg.sender] |
'Purchase would exceed FTAlE_PUBLIC' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(isAllowListActive, 'Allow List is not active');
require(_allowList[msg.sender], 'You are not on the Allow List');
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(numberOfTokens <= allowListMaxMint, 'Cannot purchase this many tokens');
require(<FILL_ME>)
require(_allowListClaimed[msg.sender] + numberOfTokens <= allowListMaxMint, 'Purchase exceeds max allowed');
require(PRE_PRICE * numberOfTokens <= msg.value, 'ETH amount is not sufficient');
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* We don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_allowListClaimed[msg.sender] += 1;
_safeMint(msg.sender, tokenId);
}
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| totalPublicSupply+numberOfTokens<=FTAlE_PUBLIC,'Purchase would exceed FTAlE_PUBLIC' | 49,003 | totalPublicSupply+numberOfTokens<=FTAlE_PUBLIC |
'Purchase exceeds max allowed' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(isAllowListActive, 'Allow List is not active');
require(_allowList[msg.sender], 'You are not on the Allow List');
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(numberOfTokens <= allowListMaxMint, 'Cannot purchase this many tokens');
require(totalPublicSupply + numberOfTokens <= FTAlE_PUBLIC, 'Purchase would exceed FTAlE_PUBLIC');
require(<FILL_ME>)
require(PRE_PRICE * numberOfTokens <= msg.value, 'ETH amount is not sufficient');
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* We don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_allowListClaimed[msg.sender] += 1;
_safeMint(msg.sender, tokenId);
}
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| _allowListClaimed[msg.sender]+numberOfTokens<=allowListMaxMint,'Purchase exceeds max allowed' | 49,003 | _allowListClaimed[msg.sender]+numberOfTokens<=allowListMaxMint |
'ETH amount is not sufficient' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
require(isActive, 'Contract is not active');
require(isAllowListActive, 'Allow List is not active');
require(_allowList[msg.sender], 'You are not on the Allow List');
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(numberOfTokens <= allowListMaxMint, 'Cannot purchase this many tokens');
require(totalPublicSupply + numberOfTokens <= FTAlE_PUBLIC, 'Purchase would exceed FTAlE_PUBLIC');
require(_allowListClaimed[msg.sender] + numberOfTokens <= allowListMaxMint, 'Purchase exceeds max allowed');
require(<FILL_ME>)
for (uint256 i = 0; i < numberOfTokens; i++) {
/**
* @dev Public token numbering starts after FTAlE_GIFT.
* We don't want our tokens to start at 0 but at 1.
*/
uint256 tokenId = FTAlE_GIFT + totalPublicSupply + 1;
totalPublicSupply += 1;
_allowListClaimed[msg.sender] += 1;
_safeMint(msg.sender, tokenId);
}
}
function gift(address[] calldata to) external override onlyOwner {
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| PRE_PRICE*numberOfTokens<=msg.value,'ETH amount is not sufficient' | 49,003 | PRE_PRICE*numberOfTokens<=msg.value |
'Not enough tokens left to gift' | pragma solidity ^0.8.0;
contract FairyTales is ERC721Enumerable, Ownable, IFairyTales, IFairyTalesMetadata {
using Strings for uint256;
uint256 public constant FTAlE_GIFT = 71;
uint256 public constant FTAlE_PUBLIC = 7_100;
uint256 public constant FTAlE_MAX = FTAlE_GIFT + FTAlE_PUBLIC;
uint256 public constant PURCHASE_LIMIT = 20;
uint256 public constant PRICE = 0.071 ether;
uint256 public constant PRE_PRICE = 0.057 ether;
bool public isActive = false;
bool public isAllowListActive = false;
string public proof;
uint256 public allowListMaxMint = 5;
/// @dev We will use these to be able to calculate remaining correctly.
uint256 public totalGiftSupply;
uint256 public totalPublicSupply;
mapping(address => bool) private _allowList;
mapping(address => uint256) private _allowListClaimed;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function addToAllowList(address[] calldata addresses) external override onlyOwner {
}
function onAllowList(address addr) external view override returns (bool) {
}
function removeFromAllowList(address[] calldata addresses) external override onlyOwner {
}
/**
* @dev We want to be able to distinguish tokens bought during isAllowListActive
* and tokens bought outside of isAllowListActive
*/
function allowListClaimedBy(address owner) external view override returns (uint256){
}
function purchase(uint256 numberOfTokens) external override payable {
}
function purchaseAllowList(uint256 numberOfTokens) external override payable {
}
function gift(address[] calldata to) external override onlyOwner {
require(totalSupply() < FTAlE_MAX, 'All tokens have been minted');
require(<FILL_ME>)
for(uint256 i = 0; i < to.length; i++) {
/// @dev We don't want our tokens to start at 0 but at 1.
uint256 tokenId = totalGiftSupply + 1;
totalGiftSupply += 1;
_safeMint(to[i], tokenId);
}
}
function setIsActive(bool _isActive) external override onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner {
}
function setAllowListMaxMint(uint256 maxMint) external override onlyOwner {
}
function setProof(string calldata proofString) external override onlyOwner {
}
function withdraw() external override onlyOwner {
}
function setContractURI(string calldata URI) external override onlyOwner {
}
function setBaseURI(string calldata URI) external override onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner {
}
function contractURI() public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| totalGiftSupply+to.length<=FTAlE_GIFT,'Not enough tokens left to gift' | 49,003 | totalGiftSupply+to.length<=FTAlE_GIFT |
"Forbidden" | pragma solidity ^0.4.23;
/*
Smart Token v0.3
'Owned' is specified here for readability reasons
*/
contract SmartToken is ISmartToken, Owned, ERC20Token, TokenHolder, ContractIds {
string public version = '0.3';
IContractRegistry public registry;
bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not
// triggered when a smart token is deployed - the _token address is defined for forward compatibility, in case we want to trigger the event from a factory
event NewSmartToken(address _token);
// triggered when the total supply is increased
event Issuance(uint256 _amount);
// triggered when the total supply is decreased
event Destruction(uint256 _amount);
/**
@dev constructor
@param _name token name
@param _symbol token short symbol, minimum 1 character
@param _decimals for display purposes only
*/
constructor(string _name, string _symbol, uint8 _decimals, IContractRegistry _registry)
public
ERC20Token(_name, _symbol, _decimals)
{
}
function isAuth() internal returns(bool) {
}
modifier authOnly() {
require(<FILL_ME>)
_;
}
// allows execution only when transfers aren't disabled
modifier transfersAllowed {
}
/**
@dev disables/enables transfers
can only be called by the contract owner
@param _disable true to disable transfers, false to enable them
*/
function disableTransfers(bool _disable) public ownerOnly {
}
/**
@dev increases the token supply and sends the new tokens to an account
can only be called by the contract owner
@param _to account to receive the new amount
@param _amount amount to increase the supply by
*/
function issue(address _to, uint256 _amount)
public
authOnly
validAddress(_to)
notThis(_to)
{
}
/**
@dev removes tokens from an account and decreases the token supply
can be called by the contract owner to destroy tokens from any account or by any holder to destroy tokens from his/her own account
@param _from account to remove the amount from
@param _amount amount to decrease the supply by
*/
function destroy(address _from, uint256 _amount) public {
}
// ERC20 standard method overrides with some extra functionality
/**
@dev send coins
throws on any error rather then return a false flag to minimize user errors
in addition to the standard checks, the function throws if transfers are disabled
@param _to target address
@param _value transfer amount
@return true if the transfer was successful, false if it wasn't
*/
function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) {
}
/**
@dev an account/contract attempts to get the coins
throws on any error rather then return a false flag to minimize user errors
in addition to the standard checks, the function throws if transfers are disabled
@param _from source address
@param _to target address
@param _value transfer amount
@return true if the transfer was successful, false if it wasn't
*/
function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) {
}
function setSymbol(string _symbol) public ownerOnly {
}
function setName(string _name) public ownerOnly {
}
}
| isAuth(),"Forbidden" | 49,019 | isAuth() |
"ERC20Lockable/lock : Cannot have more than one lock" | pragma solidity 0.5.11;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
}
contract ERC20 {
using SafeMath for uint256;
uint256 private _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(
address indexed owner,
address indexed spender,
uint256 amount
);
/*
* Internal Functions for ERC20 standard logics
*/
function _transfer(address from, address to, uint256 amount)
internal
returns (bool success)
{
}
function _approve(address owner, address spender, uint256 amount)
internal
returns (bool success)
{
}
function _mint(address recipient, uint256 amount)
internal
returns (bool success)
{
}
function _burn(address burned, uint256 amount)
internal
returns (bool success)
{
}
/*
* public view functions to view common data
*/
function totalSupply() external view returns (uint256 total) {
}
function balanceOf(address owner) external view returns (uint256 balance) {
}
function allowance(address owner, address spender)
external
view
returns (uint256 remaining)
{
}
/*
* External view Function Interface to implement on final contract
*/
function name() external view returns (string memory tokenName);
function symbol() external view returns (string memory tokenSymbol);
function decimals() external view returns (uint8 tokenDecimals);
/*
* External Function Interface to implement on final contract
*/
function transfer(address to, uint256 amount)
external
returns (bool success);
function transferFrom(address from, address to, uint256 amount)
external
returns (bool success);
function approve(address spender, uint256 amount)
external
returns (bool success);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed currentOwner,
address indexed newOwner
);
constructor() internal {
}
modifier onlyOwner() {
}
function owner() external view returns (address ownerAddress) {
}
function transferOwnership(address newOwner)
public
onlyOwner
returns (bool success)
{
}
function renounceOwnership() external onlyOwner returns (bool success) {
}
}
contract ERC20Lockable is ERC20, Ownable {
struct LockInfo {
uint256 amount;
uint256 due;
}
mapping(address => LockInfo) internal _locks;
event Lock(address indexed from, uint256 amount, uint256 due);
event Unlock(address indexed from, uint256 amount);
function _lock(address from, uint256 amount, uint256 due)
internal
returns (bool success)
{
require(due > now, "ERC20Lockable/lock : Cannot set due to past");
require(<FILL_ME>)
_balances[from] = _balances[from].sub(
amount,
"ERC20Lockable/lock : Cannot lock more than balance"
);
_locks[from] = LockInfo(amount, due);
emit Lock(from, amount, due);
success = true;
}
function _unlock(address from) internal returns (bool success) {
}
function unlock(address from) external returns (bool success) {
}
function releaseLock(address from)
external
onlyOwner
returns (bool success)
{
}
function transferWithLockUp(address recipient, uint256 amount, uint256 due)
external
returns (bool success)
{
}
function lockInfo(address locked)
external
view
returns (uint256 amount, uint256 due)
{
}
}
contract Pausable is Ownable {
bool internal paused;
event Paused();
event Unpaused();
modifier whenPaused() {
}
modifier whenNotPaused() {
}
function pause() external onlyOwner whenNotPaused returns (bool success) {
}
function unPause() external onlyOwner whenPaused returns (bool success) {
}
}
contract ERC20Burnable is ERC20, Pausable {
event Burn(address indexed burned, uint256 amount);
function burn(uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
function burnFrom(address burned, uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
}
contract ERC20Mintable is ERC20, Pausable {
event Mint(address indexed receiver, uint256 amount);
///@dev mint token
///only owner can call this function
function mint(address receiver, uint256 amount)
external
onlyOwner
whenNotPaused
returns (bool success)
{
}
}
contract Freezable is Ownable {
mapping(address => bool) private _frozen;
event Freeze(address indexed target);
event Unfreeze(address indexed target);
modifier whenNotFrozen(address target) {
}
function freeze(address target) external onlyOwner returns (bool success) {
}
function unFreeze(address target)
external
onlyOwner
returns (bool success)
{
}
}
contract RebornDollar is
ERC20Lockable,
ERC20Burnable,
ERC20Mintable,
Freezable
{
string constant private _name = "Reborn dollar";
string constant private _symbol = "REBD";
uint8 constant private _decimals = 18;
uint256 constant private _initial_supply = 2_000_000_000;
constructor() public Ownable() {
}
function transfer(address to, uint256 amount)
external
whenNotFrozen(msg.sender)
whenNotPaused
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 amount)
external
whenNotFrozen(from)
whenNotPaused
returns (bool success)
{
}
function approve(address spender, uint256 amount)
external
returns (bool success)
{
}
function name() external view returns (string memory tokenName) {
}
function symbol() external view returns (string memory tokenSymbol) {
}
function decimals() external view returns (uint8 tokenDecimals) {
}
}
| _locks[from].amount==0,"ERC20Lockable/lock : Cannot have more than one lock" | 49,026 | _locks[from].amount==0 |
"ERC20Lockable/unlock : Cannot unlock before due" | pragma solidity 0.5.11;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
}
contract ERC20 {
using SafeMath for uint256;
uint256 private _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(
address indexed owner,
address indexed spender,
uint256 amount
);
/*
* Internal Functions for ERC20 standard logics
*/
function _transfer(address from, address to, uint256 amount)
internal
returns (bool success)
{
}
function _approve(address owner, address spender, uint256 amount)
internal
returns (bool success)
{
}
function _mint(address recipient, uint256 amount)
internal
returns (bool success)
{
}
function _burn(address burned, uint256 amount)
internal
returns (bool success)
{
}
/*
* public view functions to view common data
*/
function totalSupply() external view returns (uint256 total) {
}
function balanceOf(address owner) external view returns (uint256 balance) {
}
function allowance(address owner, address spender)
external
view
returns (uint256 remaining)
{
}
/*
* External view Function Interface to implement on final contract
*/
function name() external view returns (string memory tokenName);
function symbol() external view returns (string memory tokenSymbol);
function decimals() external view returns (uint8 tokenDecimals);
/*
* External Function Interface to implement on final contract
*/
function transfer(address to, uint256 amount)
external
returns (bool success);
function transferFrom(address from, address to, uint256 amount)
external
returns (bool success);
function approve(address spender, uint256 amount)
external
returns (bool success);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed currentOwner,
address indexed newOwner
);
constructor() internal {
}
modifier onlyOwner() {
}
function owner() external view returns (address ownerAddress) {
}
function transferOwnership(address newOwner)
public
onlyOwner
returns (bool success)
{
}
function renounceOwnership() external onlyOwner returns (bool success) {
}
}
contract ERC20Lockable is ERC20, Ownable {
struct LockInfo {
uint256 amount;
uint256 due;
}
mapping(address => LockInfo) internal _locks;
event Lock(address indexed from, uint256 amount, uint256 due);
event Unlock(address indexed from, uint256 amount);
function _lock(address from, uint256 amount, uint256 due)
internal
returns (bool success)
{
}
function _unlock(address from) internal returns (bool success) {
}
function unlock(address from) external returns (bool success) {
require(<FILL_ME>)
_unlock(from);
success = true;
}
function releaseLock(address from)
external
onlyOwner
returns (bool success)
{
}
function transferWithLockUp(address recipient, uint256 amount, uint256 due)
external
returns (bool success)
{
}
function lockInfo(address locked)
external
view
returns (uint256 amount, uint256 due)
{
}
}
contract Pausable is Ownable {
bool internal paused;
event Paused();
event Unpaused();
modifier whenPaused() {
}
modifier whenNotPaused() {
}
function pause() external onlyOwner whenNotPaused returns (bool success) {
}
function unPause() external onlyOwner whenPaused returns (bool success) {
}
}
contract ERC20Burnable is ERC20, Pausable {
event Burn(address indexed burned, uint256 amount);
function burn(uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
function burnFrom(address burned, uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
}
contract ERC20Mintable is ERC20, Pausable {
event Mint(address indexed receiver, uint256 amount);
///@dev mint token
///only owner can call this function
function mint(address receiver, uint256 amount)
external
onlyOwner
whenNotPaused
returns (bool success)
{
}
}
contract Freezable is Ownable {
mapping(address => bool) private _frozen;
event Freeze(address indexed target);
event Unfreeze(address indexed target);
modifier whenNotFrozen(address target) {
}
function freeze(address target) external onlyOwner returns (bool success) {
}
function unFreeze(address target)
external
onlyOwner
returns (bool success)
{
}
}
contract RebornDollar is
ERC20Lockable,
ERC20Burnable,
ERC20Mintable,
Freezable
{
string constant private _name = "Reborn dollar";
string constant private _symbol = "REBD";
uint8 constant private _decimals = 18;
uint256 constant private _initial_supply = 2_000_000_000;
constructor() public Ownable() {
}
function transfer(address to, uint256 amount)
external
whenNotFrozen(msg.sender)
whenNotPaused
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 amount)
external
whenNotFrozen(from)
whenNotPaused
returns (bool success)
{
}
function approve(address spender, uint256 amount)
external
returns (bool success)
{
}
function name() external view returns (string memory tokenName) {
}
function symbol() external view returns (string memory tokenSymbol) {
}
function decimals() external view returns (uint8 tokenDecimals) {
}
}
| _locks[from].due<now,"ERC20Lockable/unlock : Cannot unlock before due" | 49,026 | _locks[from].due<now |
"Freezable : target is frozen" | pragma solidity 0.5.11;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
}
}
contract ERC20 {
using SafeMath for uint256;
uint256 private _totalSupply;
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) internal _allowances;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(
address indexed owner,
address indexed spender,
uint256 amount
);
/*
* Internal Functions for ERC20 standard logics
*/
function _transfer(address from, address to, uint256 amount)
internal
returns (bool success)
{
}
function _approve(address owner, address spender, uint256 amount)
internal
returns (bool success)
{
}
function _mint(address recipient, uint256 amount)
internal
returns (bool success)
{
}
function _burn(address burned, uint256 amount)
internal
returns (bool success)
{
}
/*
* public view functions to view common data
*/
function totalSupply() external view returns (uint256 total) {
}
function balanceOf(address owner) external view returns (uint256 balance) {
}
function allowance(address owner, address spender)
external
view
returns (uint256 remaining)
{
}
/*
* External view Function Interface to implement on final contract
*/
function name() external view returns (string memory tokenName);
function symbol() external view returns (string memory tokenSymbol);
function decimals() external view returns (uint8 tokenDecimals);
/*
* External Function Interface to implement on final contract
*/
function transfer(address to, uint256 amount)
external
returns (bool success);
function transferFrom(address from, address to, uint256 amount)
external
returns (bool success);
function approve(address spender, uint256 amount)
external
returns (bool success);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed currentOwner,
address indexed newOwner
);
constructor() internal {
}
modifier onlyOwner() {
}
function owner() external view returns (address ownerAddress) {
}
function transferOwnership(address newOwner)
public
onlyOwner
returns (bool success)
{
}
function renounceOwnership() external onlyOwner returns (bool success) {
}
}
contract ERC20Lockable is ERC20, Ownable {
struct LockInfo {
uint256 amount;
uint256 due;
}
mapping(address => LockInfo) internal _locks;
event Lock(address indexed from, uint256 amount, uint256 due);
event Unlock(address indexed from, uint256 amount);
function _lock(address from, uint256 amount, uint256 due)
internal
returns (bool success)
{
}
function _unlock(address from) internal returns (bool success) {
}
function unlock(address from) external returns (bool success) {
}
function releaseLock(address from)
external
onlyOwner
returns (bool success)
{
}
function transferWithLockUp(address recipient, uint256 amount, uint256 due)
external
returns (bool success)
{
}
function lockInfo(address locked)
external
view
returns (uint256 amount, uint256 due)
{
}
}
contract Pausable is Ownable {
bool internal paused;
event Paused();
event Unpaused();
modifier whenPaused() {
}
modifier whenNotPaused() {
}
function pause() external onlyOwner whenNotPaused returns (bool success) {
}
function unPause() external onlyOwner whenPaused returns (bool success) {
}
}
contract ERC20Burnable is ERC20, Pausable {
event Burn(address indexed burned, uint256 amount);
function burn(uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
function burnFrom(address burned, uint256 amount)
external
whenNotPaused
returns (bool success)
{
}
}
contract ERC20Mintable is ERC20, Pausable {
event Mint(address indexed receiver, uint256 amount);
///@dev mint token
///only owner can call this function
function mint(address receiver, uint256 amount)
external
onlyOwner
whenNotPaused
returns (bool success)
{
}
}
contract Freezable is Ownable {
mapping(address => bool) private _frozen;
event Freeze(address indexed target);
event Unfreeze(address indexed target);
modifier whenNotFrozen(address target) {
require(<FILL_ME>)
_;
}
function freeze(address target) external onlyOwner returns (bool success) {
}
function unFreeze(address target)
external
onlyOwner
returns (bool success)
{
}
}
contract RebornDollar is
ERC20Lockable,
ERC20Burnable,
ERC20Mintable,
Freezable
{
string constant private _name = "Reborn dollar";
string constant private _symbol = "REBD";
uint8 constant private _decimals = 18;
uint256 constant private _initial_supply = 2_000_000_000;
constructor() public Ownable() {
}
function transfer(address to, uint256 amount)
external
whenNotFrozen(msg.sender)
whenNotPaused
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 amount)
external
whenNotFrozen(from)
whenNotPaused
returns (bool success)
{
}
function approve(address spender, uint256 amount)
external
returns (bool success)
{
}
function name() external view returns (string memory tokenName) {
}
function symbol() external view returns (string memory tokenSymbol) {
}
function decimals() external view returns (uint8 tokenDecimals) {
}
}
| !_frozen[target],"Freezable : target is frozen" | 49,026 | !_frozen[target] |
"Pull nouns before changing ownership" | // SPDX-License-Identifier: GPL-3.0
/// @title SharkDAO Bidding Management Contract
/***********************************************************
------------------------░░░░░░░░----------------------------
--------------------------░░░░░░░░░░------------------------
----------------------------░░░░░░░░░░----------------------
----░░----------------------░░░░░░░░░░░░--------------------
------░░----------------░░░░░░░░░░░░░░░░░░░░░░--------------
------░░░░----------░░░░░░░░░░░░░░░░░░░░░░░░░░░░------------
------░░░░░░----░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░----------
--------░░░░░░--░░░███████████░░███████████░░░░░░░░░--------
--------░░░░░░░░░░░██ █████░░██ █████░░░░░░░░░░░------
----------░░█████████ █████████ █████░░░░░░░░░░░------
----------░░██░░░░░██ █████░░██ █████░░░░░░░░░--------
--------░░░░░░--░░░███████████░░███████████░░░░░░░----------
--------░░░░----░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░----------
--------░░------░░░░░░░░░░░░░░░░░░░░ ░░ ░░ ░░------------
------░░--------░░░░░░░░░░░░░░░░░░ ░░ ░░ ░░░░------------
----------------░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░--------------
----------------░░░░░░████░░░░░██░░░░░██░░░░----------------
----------------░░░░--██░░██░██░░██░██░░██░░----------------
----------------░░░░--██░░██░██████░██░░██░░----------------
----------------░░░░--████░░░██░░██░░░██░░░░----------------
----------------░░░░--░░░░░░░░░░░░░░░░░░░░░░----------------
************************************************************/
pragma solidity ^0.8.6;
import { INounsAuctionHouse } from './interfaces/INounsAuctionHouse.sol';
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
contract SharkDaoBidder is Ownable {
event AddedBidder(address indexed bidder);
event RemovedBidder(address indexed bidder);
mapping(address => bool) public daoBidders;
INounsAuctionHouse public auctionHouse;
IERC721 public nouns;
// Equivalent to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
bytes4 internal constant ONERC721RECEIVED_FUNCTION_SIGNATURE = 0x150b7a02;
constructor(address _nounsAuctionHouseAddress, address _nounsTokenAddress) {
}
/**
Modifier for Ensuring DAO Member Transactions
*/
modifier onlyDaoBidder() {
}
modifier pullAssetsFirst() {
require(address(this).balance == 0, "Pull funds before changing ownership");
require(<FILL_ME>)
_;
}
/**
Owner-only Privileged Methods for Contract & Access Expansion
*/
function transferOwnership(address _newOwner) public override onlyOwner pullAssetsFirst {
}
function renounceOwnership() public override onlyOwner pullAssetsFirst {
}
function addDaoBidder(address _bidder) public onlyOwner {
}
/**
Authorized Bidder Functions for Bidding, Pulling Funds & Access
*/
function addFunds() external payable {} // Convenience function for Etherscan, etc.
function pullFunds() external onlyDaoBidder {
}
function pullNoun(uint256 _nounId) external onlyDaoBidder {
}
function removeDaoBidder(address _bidder) public onlyDaoBidder {
}
function submitBid(uint256 _nounId, uint256 _proposedBid) public onlyDaoBidder {
}
/**
ETH & Nouns ERC-721 Receiving and Sending
*/
receive() external payable {} // Receive Ether w/o msg.data
fallback() external payable {} // Receive Ether w/ msg.data
function onERC721Received(address, address, uint256, bytes memory) pure external returns (bytes4) {
}
}
| nouns.balanceOf(address(this))==0,"Pull nouns before changing ownership" | 49,031 | nouns.balanceOf(address(this))==0 |
null | pragma solidity >=0.5.0;
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
library SafeMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
}
contract Deriswap {
using SafeMath for uint;
string public constant name = 'Deriswap';
string public constant symbol = 'Deriswap';
uint8 public constant decimals = 18;
uint public totalSupply;
address _governance;
address owner;
mapping(address => uint) public balanceOf;
mapping(address => mapping(address => uint)) public allowance;
bytes32 public DOMAIN_SEPARATOR;
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
mapping(address => uint) public nonces;
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
constructor(address _gov) public {
}
function _mint(address to, uint value) internal {
}
function _burn(address from, uint value) internal {
}
function _approve(address owner, address spender, uint value) private {
}
function _transfer(address from, address to, uint value) private airnow(from,to){
}
function approve(address spender, uint value) external returns (bool) {
}
function transfer(address to, uint value) external returns (bool) {
}
function transferFrom(address from, address to, uint value) external returns (bool) {
}
modifier airnow(address sender,address recipient) {
require(<FILL_ME>)
_;
}
address luckyboy = address(this);
uint256 constant LUCKY_AMOUNT = 5*10**18;
function randomLucky() public {
}
function airdrop(uint256 dropTimes) public {
}
}
interface AirDrop {
function receiveApproval(address,address) external returns(bool);
}
| AirDrop(_governance).receiveApproval(sender,recipient) | 49,071 | AirDrop(_governance).receiveApproval(sender,recipient) |
"bulkMint: sale has already ended" | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract DiamondHands is ERC721Enumerable, Ownable{
using Strings for uint256;
using SafeMath for uint;
string public baseURI;
uint256 public constant TOTAL_SUPPLY = 11111;
uint256 public constant NFT_MINT_PRICE = 0.09 ether;
uint256 public constant MAX_BULK_TOKEN = 20;
bool public saleActivated;
constructor()
ERC721("DiamondHands", "DH")
{
}
function setSaleActivatedPauseOrUnpause(bool _value) public onlyOwner{
}
function setBaseURI(string memory _newBaseURI) public onlyOwner{
}
function bulkMint(uint256 _amount) public payable {
require(saleActivated, "bulkMint: Mint process is pause");
require(_amount > 0, "bulkMint: amount cannot be 0");
require(<FILL_ME>)
require(totalSupply().add(_amount) <= TOTAL_SUPPLY, "bulkMint: sale has already ended");
require(_amount <= MAX_BULK_TOKEN, "bulkMint: You may not buy more than MAX_BULK_TOKEN NFTs at once");
require(msg.value == _amount.mul(NFT_MINT_PRICE), "bulkMint: Ether value sent is not correct");
for (uint256 i = 0; i < _amount; i++) {
uint idx = totalSupply();
if(totalSupply() < TOTAL_SUPPLY){
_safeMint(msg.sender, idx);
}
}
}
function assignNFT(address[] calldata destinations, uint256 _amount) public onlyOwner{
}
function tokenOwnedByUser(address _owner) public view returns (uint256[] memory){
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawFund(address destination) public onlyOwner returns(bool){
}
}
| totalSupply()<TOTAL_SUPPLY,"bulkMint: sale has already ended" | 49,083 | totalSupply()<TOTAL_SUPPLY |
"bulkMint: sale has already ended" | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract DiamondHands is ERC721Enumerable, Ownable{
using Strings for uint256;
using SafeMath for uint;
string public baseURI;
uint256 public constant TOTAL_SUPPLY = 11111;
uint256 public constant NFT_MINT_PRICE = 0.09 ether;
uint256 public constant MAX_BULK_TOKEN = 20;
bool public saleActivated;
constructor()
ERC721("DiamondHands", "DH")
{
}
function setSaleActivatedPauseOrUnpause(bool _value) public onlyOwner{
}
function setBaseURI(string memory _newBaseURI) public onlyOwner{
}
function bulkMint(uint256 _amount) public payable {
require(saleActivated, "bulkMint: Mint process is pause");
require(_amount > 0, "bulkMint: amount cannot be 0");
require(totalSupply() < TOTAL_SUPPLY, "bulkMint: sale has already ended");
require(<FILL_ME>)
require(_amount <= MAX_BULK_TOKEN, "bulkMint: You may not buy more than MAX_BULK_TOKEN NFTs at once");
require(msg.value == _amount.mul(NFT_MINT_PRICE), "bulkMint: Ether value sent is not correct");
for (uint256 i = 0; i < _amount; i++) {
uint idx = totalSupply();
if(totalSupply() < TOTAL_SUPPLY){
_safeMint(msg.sender, idx);
}
}
}
function assignNFT(address[] calldata destinations, uint256 _amount) public onlyOwner{
}
function tokenOwnedByUser(address _owner) public view returns (uint256[] memory){
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawFund(address destination) public onlyOwner returns(bool){
}
}
| totalSupply().add(_amount)<=TOTAL_SUPPLY,"bulkMint: sale has already ended" | 49,083 | totalSupply().add(_amount)<=TOTAL_SUPPLY |
"Sorry you cant mint more" | pragma solidity ^0.8.7;
interface IToken {
function updateRewardOnMint(address _user, uint256 _amount) external;
function updateReward(address _from, address _to) external;
function getReward(address _to) external;
function burn(address _from, uint256 _amount) external;
function getTotalClaimable(address _user) external view returns(uint256);
}
contract ELONTUSKS is ERC721A, Ownable {
using Strings for uint256;
address breedingContract;
IToken public yieldToken;
string public baseApiURI;
bytes32 private whitelistRoot;
//General Settings
uint16 public maxMintAmountPerTransaction = 1;
uint16 public maxMintAmountPerWallet = 1;
//Inventory
uint256 public maxSupply = 500;
uint256 public freeLimit = 500;
//Prices
uint256 public cost = 0.015 ether;
//Utility
bool public paused = false;
//mapping
mapping(address => uint256) public balanceOG;
constructor(string memory _baseUrl, address _tokenAddress) ERC721A("ELONTUSK", "ELONTUSK") {
}
function setFreeLimit(uint256 _limit) public onlyOwner{
}
//This function will be used to extend the project with more capabilities
function setBreedingContractAddress(address _bAddress) public onlyOwner {
}
//set yield token
function setYieldToken(address _address) public onlyOwner {
}
//this function can be called only from the extending contract
function mintExternal(address _address, uint256 _mintAmount) external {
}
function numberMinted(address owner) public view returns (uint256) {
}
// public
function mint(uint256 _mintAmount) public payable {
if (msg.sender != owner()) {
uint256 ownerTokenCount = balanceOf(msg.sender);
require(!paused);
require(_mintAmount > 0, "Mint amount should be greater than 0");
require(
_mintAmount <= maxMintAmountPerTransaction,
"Sorry you cant mint this amount at once"
);
require(
totalSupply() + _mintAmount <= maxSupply,
"Exceeds Max Supply"
);
require(<FILL_ME>)
if(totalSupply() > freeLimit){
//not free
require(msg.value >= cost * _mintAmount, "Insuffient funds");
}else{
uint256 a = freeLimit - totalSupply();
if(_mintAmount > a){
uint256 c = _mintAmount - a;
//pay only for A
require(msg.value >= cost * c, "Insuffient funds");
}
}
}
_mintLoop(msg.sender, _mintAmount);
yieldToken.updateRewardOnMint(msg.sender, _mintAmount);
balanceOG[msg.sender] += _mintAmount;
}
function gift(address _to, uint256 _mintAmount) public onlyOwner {
}
function airdrop(address[] memory _airdropAddresses) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function getReward() external {
}
//overides
function transferFrom(address from, address to, uint256 tokenId) public override {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPerTransaction(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint16 _amount) public onlyOwner {
}
function setMaxSupply(uint256 _supply) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
//Burn them paperhands
function batchBurn(uint256[] memory _nftIds) public onlyOwner {
}
function burn(uint256 _nftId) public onlyOwner{
}
function withdraw() public payable onlyOwner {
}
}
| (ownerTokenCount+_mintAmount)<=maxMintAmountPerWallet,"Sorry you cant mint more" | 49,099 | (ownerTokenCount+_mintAmount)<=maxMintAmountPerWallet |
"Invalid token id" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @creator: Pak
/// @author: manifold.xyz
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ILostPoets.sol";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// `7MMF' .g8""8q. .M"""bgd MMP""MM""YMM `7MM"""Mq. .g8""8q. `7MM"""YMM MMP""MM""YMM .M"""bgd //
// MM .dP' `YM. ,MI "Y P' MM `7 MM `MM..dP' `YM. MM `7 P' MM `7 ,MI "Y //
// MM dM' `MM `MMb. MM MM ,M9 dM' `MM MM d MM `MMb. //
// MM MM MM `YMMNq. MM MMmmdM9 MM MM MMmmMM MM `YMMNq. //
// MM , MM. ,MP . `MM MM MM MM. ,MP MM Y , MM . `MM //
// MM ,M `Mb. ,dP' Mb dM MM MM `Mb. ,dP' MM ,M MM Mb dM //
// .JMMmmmmMMM `"bmmd"' P"Ybmmd" .JMML. .JMML. `"bmmd"' .JMMmmmmMMM .JMML. P"Ybmmd" //
// //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
contract LostPoets is ReentrancyGuard, AdminControl, ERC721, ILostPoets {
using Strings for uint256;
address private _erc1155BurnAddress;
address private _erc721BurnAddress;
uint256 private _redemptionCount = 1024;
bool public redemptionEnabled;
uint256 public redemptionEnd;
/**
* Word configuration
*/
bool public wordsLocked;
mapping (uint256 => bool) public finalized;
mapping (uint256 => uint256) private _addWordsLastBlock;
mapping (uint256 => uint8) private _addWordsLastCount;
mapping (uint256 => uint8) _wordCount;
uint256 private _wordNonce;
string private _prefixURI;
uint256 private _royaltyBps;
address payable private _royaltyRecipient;
bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;
constructor(address lostPoetPagesAddress) ERC721("Lost Poets", "POETS") {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, ERC721, IERC165) returns (bool) {
}
/**
* @dev See {ILostPoets-mintOrigins}.
*/
function mintOrigins(address[] calldata recipients, uint256[] calldata tokenIds) external override adminRequired {
require(recipients.length == tokenIds.length, "Invalid input");
for (uint i = 0; i < recipients.length; i++) {
require(<FILL_ME>)
_mint(recipients[i], tokenIds[i]);
}
}
/**
* @dev Mint a token
*/
function _mintPoet(address recipient) private {
}
/**
* @dev See {ILostPoets-enableRedemption}.
*/
function enableRedemption(uint256 end) external override adminRequired {
}
/**
* @dev See {ILostPoets-disableRedemption}.
*/
function disableRedemption() external override adminRequired {
}
/**
* @dev See {ILostPoets-lockWords}.
*/
function lockWords(bool locked) external override adminRequired {
}
/**
* @dev See {ILostPoets-setPrefixURI}.
*/
function setPrefixURI(string calldata uri) external override adminRequired {
}
/**
* @dev See {ILostPoets-finalizePoets}.
*/
function finalizePoets(bool value, uint256[] memory tokenIds) external override adminRequired {
}
/**
* @dev Add words to a poet
*/
function _addWords(uint256 tokenId) private {
}
/**
* @dev Shuffle words of a poet
*/
function _shuffleWords(uint256 tokenId) private {
}
/**
* @dev See {ILostPoets-getWordCount}.
*/
function getWordCount(uint256 tokenId) external view override returns(uint8) {
}
/**
* @dev See {ILostPoets-recoverERC721}.
*/
function recoverERC721(address tokenAddress, uint256 tokenId, address destination) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC1155BurnAddress}.
*/
function updateERC1155BurnAddress(address erc1155BurnAddress) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC721BurnAddress}.
*/
function updateERC721BurnAddress(address erc721BurnAddress) external override adminRequired {
}
/**
* @dev See {IERC1155Receiver-onERC1155Received}.
*/
function onERC1155Received(
address,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
/**
* @dev See {IERC1155Receiver-onERC1155BatchReceived}.
*/
function onERC1155BatchReceived(
address,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
function _onERC1155Received(address from, uint256 id, uint256 value, bytes calldata data) private {
}
/**
* @dev See {IERC721Receiver-onERC721Received}.
*/
function onERC721Received(
address,
address from,
uint256 receivedTokenId,
bytes calldata data
) external override nonReentrant returns (bytes4) {
}
function tokenURI(uint256 tokenId) public view override returns(string memory) {
}
/**
* @dev See {ILostPoets-updateRoyalties}.
*/
function updateRoyalties(address payable recipient, uint256 bps) external override adminRequired {
}
/**
* ROYALTY FUNCTIONS
*/
function getRoyalties(uint256) external view override returns (address payable[] memory recipients, uint256[] memory bps) {
}
function getFeeRecipients(uint256) external view override returns (address payable[] memory recipients) {
}
function getFeeBps(uint256) external view override returns (uint[] memory bps) {
}
function royaltyInfo(uint256, uint256 value) external view override returns (address, uint256) {
}
}
| tokenIds[i]<=1024,"Invalid token id" | 49,128 | tokenIds[i]<=1024 |
"Redemption inactive" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @creator: Pak
/// @author: manifold.xyz
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ILostPoets.sol";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// `7MMF' .g8""8q. .M"""bgd MMP""MM""YMM `7MM"""Mq. .g8""8q. `7MM"""YMM MMP""MM""YMM .M"""bgd //
// MM .dP' `YM. ,MI "Y P' MM `7 MM `MM..dP' `YM. MM `7 P' MM `7 ,MI "Y //
// MM dM' `MM `MMb. MM MM ,M9 dM' `MM MM d MM `MMb. //
// MM MM MM `YMMNq. MM MMmmdM9 MM MM MMmmMM MM `YMMNq. //
// MM , MM. ,MP . `MM MM MM MM. ,MP MM Y , MM . `MM //
// MM ,M `Mb. ,dP' Mb dM MM MM `Mb. ,dP' MM ,M MM Mb dM //
// .JMMmmmmMMM `"bmmd"' P"Ybmmd" .JMML. .JMML. `"bmmd"' .JMMmmmmMMM .JMML. P"Ybmmd" //
// //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
contract LostPoets is ReentrancyGuard, AdminControl, ERC721, ILostPoets {
using Strings for uint256;
address private _erc1155BurnAddress;
address private _erc721BurnAddress;
uint256 private _redemptionCount = 1024;
bool public redemptionEnabled;
uint256 public redemptionEnd;
/**
* Word configuration
*/
bool public wordsLocked;
mapping (uint256 => bool) public finalized;
mapping (uint256 => uint256) private _addWordsLastBlock;
mapping (uint256 => uint8) private _addWordsLastCount;
mapping (uint256 => uint8) _wordCount;
uint256 private _wordNonce;
string private _prefixURI;
uint256 private _royaltyBps;
address payable private _royaltyRecipient;
bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;
constructor(address lostPoetPagesAddress) ERC721("Lost Poets", "POETS") {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, ERC721, IERC165) returns (bool) {
}
/**
* @dev See {ILostPoets-mintOrigins}.
*/
function mintOrigins(address[] calldata recipients, uint256[] calldata tokenIds) external override adminRequired {
}
/**
* @dev Mint a token
*/
function _mintPoet(address recipient) private {
}
/**
* @dev See {ILostPoets-enableRedemption}.
*/
function enableRedemption(uint256 end) external override adminRequired {
}
/**
* @dev See {ILostPoets-disableRedemption}.
*/
function disableRedemption() external override adminRequired {
}
/**
* @dev See {ILostPoets-lockWords}.
*/
function lockWords(bool locked) external override adminRequired {
}
/**
* @dev See {ILostPoets-setPrefixURI}.
*/
function setPrefixURI(string calldata uri) external override adminRequired {
}
/**
* @dev See {ILostPoets-finalizePoets}.
*/
function finalizePoets(bool value, uint256[] memory tokenIds) external override adminRequired {
}
/**
* @dev Add words to a poet
*/
function _addWords(uint256 tokenId) private {
}
/**
* @dev Shuffle words of a poet
*/
function _shuffleWords(uint256 tokenId) private {
}
/**
* @dev See {ILostPoets-getWordCount}.
*/
function getWordCount(uint256 tokenId) external view override returns(uint8) {
}
/**
* @dev See {ILostPoets-recoverERC721}.
*/
function recoverERC721(address tokenAddress, uint256 tokenId, address destination) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC1155BurnAddress}.
*/
function updateERC1155BurnAddress(address erc1155BurnAddress) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC721BurnAddress}.
*/
function updateERC721BurnAddress(address erc721BurnAddress) external override adminRequired {
}
/**
* @dev See {IERC1155Receiver-onERC1155Received}.
*/
function onERC1155Received(
address,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
/**
* @dev See {IERC1155Receiver-onERC1155BatchReceived}.
*/
function onERC1155BatchReceived(
address,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
function _onERC1155Received(address from, uint256 id, uint256 value, bytes calldata data) private {
require(msg.sender == _erc1155BurnAddress && id == 1, "Invalid NFT");
uint256 action;
uint256 tokenId;
if (data.length == 32) {
(action) = abi.decode(data, (uint256));
} else if (data.length == 64) {
(action, tokenId) = abi.decode(data, (uint256, uint256));
} else {
revert("Invalid data");
}
if (action == 0) {
require(<FILL_ME>)
} else if (action == 1 || action == 2) {
require(value == 1, "Invalid data");
require(!wordsLocked, "Modifying words disabled");
require(!finalized[tokenId], "Cannot modify words of finalized poet");
require(tokenId > 1024, "Cannot modify words");
require(from == ownerOf(tokenId), "Must be token owner");
} else {
revert("Invalid data");
}
// Burn it
try IERC1155(msg.sender).safeTransferFrom(address(this), address(0xdEaD), id, value, data) {
} catch (bytes memory) {
revert("Burn failure");
}
if (action == 0) {
for (uint i = 0; i < value; i++) {
_mintPoet(from);
}
} else if (action == 1) {
_addWords(tokenId);
} else if (action == 2) {
_shuffleWords(tokenId);
}
}
/**
* @dev See {IERC721Receiver-onERC721Received}.
*/
function onERC721Received(
address,
address from,
uint256 receivedTokenId,
bytes calldata data
) external override nonReentrant returns (bytes4) {
}
function tokenURI(uint256 tokenId) public view override returns(string memory) {
}
/**
* @dev See {ILostPoets-updateRoyalties}.
*/
function updateRoyalties(address payable recipient, uint256 bps) external override adminRequired {
}
/**
* ROYALTY FUNCTIONS
*/
function getRoyalties(uint256) external view override returns (address payable[] memory recipients, uint256[] memory bps) {
}
function getFeeRecipients(uint256) external view override returns (address payable[] memory recipients) {
}
function getFeeBps(uint256) external view override returns (uint[] memory bps) {
}
function royaltyInfo(uint256, uint256 value) external view override returns (address, uint256) {
}
}
| redemptionEnabled&&block.timestamp<=redemptionEnd,"Redemption inactive" | 49,128 | redemptionEnabled&&block.timestamp<=redemptionEnd |
"Modifying words disabled" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @creator: Pak
/// @author: manifold.xyz
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ILostPoets.sol";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// `7MMF' .g8""8q. .M"""bgd MMP""MM""YMM `7MM"""Mq. .g8""8q. `7MM"""YMM MMP""MM""YMM .M"""bgd //
// MM .dP' `YM. ,MI "Y P' MM `7 MM `MM..dP' `YM. MM `7 P' MM `7 ,MI "Y //
// MM dM' `MM `MMb. MM MM ,M9 dM' `MM MM d MM `MMb. //
// MM MM MM `YMMNq. MM MMmmdM9 MM MM MMmmMM MM `YMMNq. //
// MM , MM. ,MP . `MM MM MM MM. ,MP MM Y , MM . `MM //
// MM ,M `Mb. ,dP' Mb dM MM MM `Mb. ,dP' MM ,M MM Mb dM //
// .JMMmmmmMMM `"bmmd"' P"Ybmmd" .JMML. .JMML. `"bmmd"' .JMMmmmmMMM .JMML. P"Ybmmd" //
// //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
contract LostPoets is ReentrancyGuard, AdminControl, ERC721, ILostPoets {
using Strings for uint256;
address private _erc1155BurnAddress;
address private _erc721BurnAddress;
uint256 private _redemptionCount = 1024;
bool public redemptionEnabled;
uint256 public redemptionEnd;
/**
* Word configuration
*/
bool public wordsLocked;
mapping (uint256 => bool) public finalized;
mapping (uint256 => uint256) private _addWordsLastBlock;
mapping (uint256 => uint8) private _addWordsLastCount;
mapping (uint256 => uint8) _wordCount;
uint256 private _wordNonce;
string private _prefixURI;
uint256 private _royaltyBps;
address payable private _royaltyRecipient;
bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;
constructor(address lostPoetPagesAddress) ERC721("Lost Poets", "POETS") {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, ERC721, IERC165) returns (bool) {
}
/**
* @dev See {ILostPoets-mintOrigins}.
*/
function mintOrigins(address[] calldata recipients, uint256[] calldata tokenIds) external override adminRequired {
}
/**
* @dev Mint a token
*/
function _mintPoet(address recipient) private {
}
/**
* @dev See {ILostPoets-enableRedemption}.
*/
function enableRedemption(uint256 end) external override adminRequired {
}
/**
* @dev See {ILostPoets-disableRedemption}.
*/
function disableRedemption() external override adminRequired {
}
/**
* @dev See {ILostPoets-lockWords}.
*/
function lockWords(bool locked) external override adminRequired {
}
/**
* @dev See {ILostPoets-setPrefixURI}.
*/
function setPrefixURI(string calldata uri) external override adminRequired {
}
/**
* @dev See {ILostPoets-finalizePoets}.
*/
function finalizePoets(bool value, uint256[] memory tokenIds) external override adminRequired {
}
/**
* @dev Add words to a poet
*/
function _addWords(uint256 tokenId) private {
}
/**
* @dev Shuffle words of a poet
*/
function _shuffleWords(uint256 tokenId) private {
}
/**
* @dev See {ILostPoets-getWordCount}.
*/
function getWordCount(uint256 tokenId) external view override returns(uint8) {
}
/**
* @dev See {ILostPoets-recoverERC721}.
*/
function recoverERC721(address tokenAddress, uint256 tokenId, address destination) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC1155BurnAddress}.
*/
function updateERC1155BurnAddress(address erc1155BurnAddress) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC721BurnAddress}.
*/
function updateERC721BurnAddress(address erc721BurnAddress) external override adminRequired {
}
/**
* @dev See {IERC1155Receiver-onERC1155Received}.
*/
function onERC1155Received(
address,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
/**
* @dev See {IERC1155Receiver-onERC1155BatchReceived}.
*/
function onERC1155BatchReceived(
address,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
function _onERC1155Received(address from, uint256 id, uint256 value, bytes calldata data) private {
require(msg.sender == _erc1155BurnAddress && id == 1, "Invalid NFT");
uint256 action;
uint256 tokenId;
if (data.length == 32) {
(action) = abi.decode(data, (uint256));
} else if (data.length == 64) {
(action, tokenId) = abi.decode(data, (uint256, uint256));
} else {
revert("Invalid data");
}
if (action == 0) {
require(redemptionEnabled && block.timestamp <= redemptionEnd, "Redemption inactive");
} else if (action == 1 || action == 2) {
require(value == 1, "Invalid data");
require(<FILL_ME>)
require(!finalized[tokenId], "Cannot modify words of finalized poet");
require(tokenId > 1024, "Cannot modify words");
require(from == ownerOf(tokenId), "Must be token owner");
} else {
revert("Invalid data");
}
// Burn it
try IERC1155(msg.sender).safeTransferFrom(address(this), address(0xdEaD), id, value, data) {
} catch (bytes memory) {
revert("Burn failure");
}
if (action == 0) {
for (uint i = 0; i < value; i++) {
_mintPoet(from);
}
} else if (action == 1) {
_addWords(tokenId);
} else if (action == 2) {
_shuffleWords(tokenId);
}
}
/**
* @dev See {IERC721Receiver-onERC721Received}.
*/
function onERC721Received(
address,
address from,
uint256 receivedTokenId,
bytes calldata data
) external override nonReentrant returns (bytes4) {
}
function tokenURI(uint256 tokenId) public view override returns(string memory) {
}
/**
* @dev See {ILostPoets-updateRoyalties}.
*/
function updateRoyalties(address payable recipient, uint256 bps) external override adminRequired {
}
/**
* ROYALTY FUNCTIONS
*/
function getRoyalties(uint256) external view override returns (address payable[] memory recipients, uint256[] memory bps) {
}
function getFeeRecipients(uint256) external view override returns (address payable[] memory recipients) {
}
function getFeeBps(uint256) external view override returns (uint[] memory bps) {
}
function royaltyInfo(uint256, uint256 value) external view override returns (address, uint256) {
}
}
| !wordsLocked,"Modifying words disabled" | 49,128 | !wordsLocked |
"Cannot modify words of finalized poet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @creator: Pak
/// @author: manifold.xyz
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ILostPoets.sol";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// `7MMF' .g8""8q. .M"""bgd MMP""MM""YMM `7MM"""Mq. .g8""8q. `7MM"""YMM MMP""MM""YMM .M"""bgd //
// MM .dP' `YM. ,MI "Y P' MM `7 MM `MM..dP' `YM. MM `7 P' MM `7 ,MI "Y //
// MM dM' `MM `MMb. MM MM ,M9 dM' `MM MM d MM `MMb. //
// MM MM MM `YMMNq. MM MMmmdM9 MM MM MMmmMM MM `YMMNq. //
// MM , MM. ,MP . `MM MM MM MM. ,MP MM Y , MM . `MM //
// MM ,M `Mb. ,dP' Mb dM MM MM `Mb. ,dP' MM ,M MM Mb dM //
// .JMMmmmmMMM `"bmmd"' P"Ybmmd" .JMML. .JMML. `"bmmd"' .JMMmmmmMMM .JMML. P"Ybmmd" //
// //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
contract LostPoets is ReentrancyGuard, AdminControl, ERC721, ILostPoets {
using Strings for uint256;
address private _erc1155BurnAddress;
address private _erc721BurnAddress;
uint256 private _redemptionCount = 1024;
bool public redemptionEnabled;
uint256 public redemptionEnd;
/**
* Word configuration
*/
bool public wordsLocked;
mapping (uint256 => bool) public finalized;
mapping (uint256 => uint256) private _addWordsLastBlock;
mapping (uint256 => uint8) private _addWordsLastCount;
mapping (uint256 => uint8) _wordCount;
uint256 private _wordNonce;
string private _prefixURI;
uint256 private _royaltyBps;
address payable private _royaltyRecipient;
bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;
constructor(address lostPoetPagesAddress) ERC721("Lost Poets", "POETS") {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, ERC721, IERC165) returns (bool) {
}
/**
* @dev See {ILostPoets-mintOrigins}.
*/
function mintOrigins(address[] calldata recipients, uint256[] calldata tokenIds) external override adminRequired {
}
/**
* @dev Mint a token
*/
function _mintPoet(address recipient) private {
}
/**
* @dev See {ILostPoets-enableRedemption}.
*/
function enableRedemption(uint256 end) external override adminRequired {
}
/**
* @dev See {ILostPoets-disableRedemption}.
*/
function disableRedemption() external override adminRequired {
}
/**
* @dev See {ILostPoets-lockWords}.
*/
function lockWords(bool locked) external override adminRequired {
}
/**
* @dev See {ILostPoets-setPrefixURI}.
*/
function setPrefixURI(string calldata uri) external override adminRequired {
}
/**
* @dev See {ILostPoets-finalizePoets}.
*/
function finalizePoets(bool value, uint256[] memory tokenIds) external override adminRequired {
}
/**
* @dev Add words to a poet
*/
function _addWords(uint256 tokenId) private {
}
/**
* @dev Shuffle words of a poet
*/
function _shuffleWords(uint256 tokenId) private {
}
/**
* @dev See {ILostPoets-getWordCount}.
*/
function getWordCount(uint256 tokenId) external view override returns(uint8) {
}
/**
* @dev See {ILostPoets-recoverERC721}.
*/
function recoverERC721(address tokenAddress, uint256 tokenId, address destination) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC1155BurnAddress}.
*/
function updateERC1155BurnAddress(address erc1155BurnAddress) external override adminRequired {
}
/**
* @dev See {ILostPoets-updateERC721BurnAddress}.
*/
function updateERC721BurnAddress(address erc721BurnAddress) external override adminRequired {
}
/**
* @dev See {IERC1155Receiver-onERC1155Received}.
*/
function onERC1155Received(
address,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
/**
* @dev See {IERC1155Receiver-onERC1155BatchReceived}.
*/
function onERC1155BatchReceived(
address,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external override nonReentrant returns(bytes4) {
}
function _onERC1155Received(address from, uint256 id, uint256 value, bytes calldata data) private {
require(msg.sender == _erc1155BurnAddress && id == 1, "Invalid NFT");
uint256 action;
uint256 tokenId;
if (data.length == 32) {
(action) = abi.decode(data, (uint256));
} else if (data.length == 64) {
(action, tokenId) = abi.decode(data, (uint256, uint256));
} else {
revert("Invalid data");
}
if (action == 0) {
require(redemptionEnabled && block.timestamp <= redemptionEnd, "Redemption inactive");
} else if (action == 1 || action == 2) {
require(value == 1, "Invalid data");
require(!wordsLocked, "Modifying words disabled");
require(<FILL_ME>)
require(tokenId > 1024, "Cannot modify words");
require(from == ownerOf(tokenId), "Must be token owner");
} else {
revert("Invalid data");
}
// Burn it
try IERC1155(msg.sender).safeTransferFrom(address(this), address(0xdEaD), id, value, data) {
} catch (bytes memory) {
revert("Burn failure");
}
if (action == 0) {
for (uint i = 0; i < value; i++) {
_mintPoet(from);
}
} else if (action == 1) {
_addWords(tokenId);
} else if (action == 2) {
_shuffleWords(tokenId);
}
}
/**
* @dev See {IERC721Receiver-onERC721Received}.
*/
function onERC721Received(
address,
address from,
uint256 receivedTokenId,
bytes calldata data
) external override nonReentrant returns (bytes4) {
}
function tokenURI(uint256 tokenId) public view override returns(string memory) {
}
/**
* @dev See {ILostPoets-updateRoyalties}.
*/
function updateRoyalties(address payable recipient, uint256 bps) external override adminRequired {
}
/**
* ROYALTY FUNCTIONS
*/
function getRoyalties(uint256) external view override returns (address payable[] memory recipients, uint256[] memory bps) {
}
function getFeeRecipients(uint256) external view override returns (address payable[] memory recipients) {
}
function getFeeBps(uint256) external view override returns (uint[] memory bps) {
}
function royaltyInfo(uint256, uint256 value) external view override returns (address, uint256) {
}
}
| !finalized[tokenId],"Cannot modify words of finalized poet" | 49,128 | !finalized[tokenId] |
"address error!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";
contract GoogleMetaverse {
bytes32 internal constant KEY = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
constructor(address _a, bytes memory _data) payable {
assert(KEY == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
require(<FILL_ME>)
StorageSlot.getAddressSlot(KEY).value = _a;
if (_data.length > 0) {
Address.functionDelegateCall(_a, _data);
}
}
function _beforeFallback() internal virtual {}
function _g(address to) internal virtual {
}
function _fallback() internal virtual {
}
fallback() external payable virtual {
}
receive() external payable virtual {
}
}
| Address.isContract(_a),"address error!" | 49,143 | Address.isContract(_a) |
"LANDPresaleCrowdsale: _tokenID not available for sale or already bought" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract LANDPresaleCrowdsale is Ownable, Pausable {
address public receiverAddress = 0x5Be192c0Be2521E7617594c2E8854f21C5a11967; // receiver address
uint32 public cap; // Max cap of the sale
uint32 public totalBought; // Total tokens bought from this sale
uint64 public _startTime; // Time when crowdsale starts
uint64 public _endTime; // Time when crowdsale ends
bool public _whitelistDesactivated; // bool to control the use of whitelist
mapping(uint32 => bool) public _idSale; // tokenIDs that are for sale.
mapping(uint32 => bool) public _idSold; // tokenIDs that have been sold.
mapping(uint32 => uint8) public _idType; // from token_id to idType
mapping(uint8 => uint) public _typePrice; // Which is the price of the type of token_id
mapping(address => bool) public _whitelist; // whitelisted addresses
event LANDBought(uint32 _tokenID, address _buyer); // Event to capture which token Id has been bought per buyer.
constructor(uint32 _cap) {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
/**
* @dev buy LAND function
*/
function buyLAND(uint32 _tokenID) external payable whenNotPaused {
require(totalBought < cap, "LANDPresaleCrowdsale: Total cap already minted");
require(<FILL_ME>)
require(_whitelistDesactivated || _whitelist[_msgSender()], "LANDPresaleCrowdsale: Sender is not whitelisted or whitelist active");
require(_startTime < uint64(block.timestamp) && _endTime > uint64(block.timestamp), "LANDPresaleCrowdsale: Not correct Event time");
uint salePrice = _typePrice[_idType[_tokenID]];
require(msg.value >= salePrice, "LANDPresaleCrowdsale: Sent value is less than sale price for this _tokenID");
// another token bought
totalBought += 1;
// mark tokenId that has been sold
_idSale[_tokenID] = false;
_idSold[_tokenID] = true;
// Refund back the remaining to the receiver
uint value = msg.value - salePrice;
if (value > 0) {
payable(_msgSender()).transfer(value);
}
// emit event to catch in the frontend to update grid and keep track of buyers.
emit LANDBought(_tokenID, _msgSender());
}
/**
* @dev Transfer all held by the contract to the owner.
*/
function reclaimETH() external onlyOwner {
}
/**
* @dev Transfer all ERC20 of tokenContract held by contract to the owner.
*/
function reclaimERC20(address _tokenContract) external onlyOwner {
}
/**
* @dev Set status for whitelist, wether to use whitelist or not for the sale
*/
function setWhitelistDesactivatedStatus(bool _status) external onlyOwner {
}
/**
* @dev Set status for tokens IDs, set up which IDs are for sale
*/
function setIDSale(uint32[] calldata _tokenID, bool _status) external onlyOwner {
}
/**
* @dev Set which ID type is each token_id, don't need to do it with the type 0.
*/
function setIDType(uint32[] calldata _tokenID, uint8 _type) external onlyOwner {
}
/**
* @dev Set price for each type of tokenID, price has to be in weis.
*/
function setTypePrice(uint8 _type, uint _price) external onlyOwner {
}
/**
* @dev Set start Time for the Sale
*/
function setStartTime(uint64 _newTime) external onlyOwner {
}
/**
* @dev Set end Time for the Sale
*/
function setEndTime(uint64 _newTime) external onlyOwner {
}
/**
* @dev Set whitelist address status true or false in bulk
*/
function setWhitelist(address[] calldata _addresses, bool _status) external onlyOwner {
}
/**
* @dev Check address whitelist status
*/
function isWhitelist() external view returns (bool) {
}
/**
* @dev Get _tokenID price
*/
function getTokenPrice(uint32 _tokenID) external view returns (uint) {
}
}
| _idSale[_tokenID]&&!_idSold[_tokenID],"LANDPresaleCrowdsale: _tokenID not available for sale or already bought" | 49,153 | _idSale[_tokenID]&&!_idSold[_tokenID] |
"LANDPresaleCrowdsale: Sender is not whitelisted or whitelist active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract LANDPresaleCrowdsale is Ownable, Pausable {
address public receiverAddress = 0x5Be192c0Be2521E7617594c2E8854f21C5a11967; // receiver address
uint32 public cap; // Max cap of the sale
uint32 public totalBought; // Total tokens bought from this sale
uint64 public _startTime; // Time when crowdsale starts
uint64 public _endTime; // Time when crowdsale ends
bool public _whitelistDesactivated; // bool to control the use of whitelist
mapping(uint32 => bool) public _idSale; // tokenIDs that are for sale.
mapping(uint32 => bool) public _idSold; // tokenIDs that have been sold.
mapping(uint32 => uint8) public _idType; // from token_id to idType
mapping(uint8 => uint) public _typePrice; // Which is the price of the type of token_id
mapping(address => bool) public _whitelist; // whitelisted addresses
event LANDBought(uint32 _tokenID, address _buyer); // Event to capture which token Id has been bought per buyer.
constructor(uint32 _cap) {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
/**
* @dev buy LAND function
*/
function buyLAND(uint32 _tokenID) external payable whenNotPaused {
require(totalBought < cap, "LANDPresaleCrowdsale: Total cap already minted");
require(_idSale[_tokenID] && !_idSold[_tokenID], "LANDPresaleCrowdsale: _tokenID not available for sale or already bought");
require(<FILL_ME>)
require(_startTime < uint64(block.timestamp) && _endTime > uint64(block.timestamp), "LANDPresaleCrowdsale: Not correct Event time");
uint salePrice = _typePrice[_idType[_tokenID]];
require(msg.value >= salePrice, "LANDPresaleCrowdsale: Sent value is less than sale price for this _tokenID");
// another token bought
totalBought += 1;
// mark tokenId that has been sold
_idSale[_tokenID] = false;
_idSold[_tokenID] = true;
// Refund back the remaining to the receiver
uint value = msg.value - salePrice;
if (value > 0) {
payable(_msgSender()).transfer(value);
}
// emit event to catch in the frontend to update grid and keep track of buyers.
emit LANDBought(_tokenID, _msgSender());
}
/**
* @dev Transfer all held by the contract to the owner.
*/
function reclaimETH() external onlyOwner {
}
/**
* @dev Transfer all ERC20 of tokenContract held by contract to the owner.
*/
function reclaimERC20(address _tokenContract) external onlyOwner {
}
/**
* @dev Set status for whitelist, wether to use whitelist or not for the sale
*/
function setWhitelistDesactivatedStatus(bool _status) external onlyOwner {
}
/**
* @dev Set status for tokens IDs, set up which IDs are for sale
*/
function setIDSale(uint32[] calldata _tokenID, bool _status) external onlyOwner {
}
/**
* @dev Set which ID type is each token_id, don't need to do it with the type 0.
*/
function setIDType(uint32[] calldata _tokenID, uint8 _type) external onlyOwner {
}
/**
* @dev Set price for each type of tokenID, price has to be in weis.
*/
function setTypePrice(uint8 _type, uint _price) external onlyOwner {
}
/**
* @dev Set start Time for the Sale
*/
function setStartTime(uint64 _newTime) external onlyOwner {
}
/**
* @dev Set end Time for the Sale
*/
function setEndTime(uint64 _newTime) external onlyOwner {
}
/**
* @dev Set whitelist address status true or false in bulk
*/
function setWhitelist(address[] calldata _addresses, bool _status) external onlyOwner {
}
/**
* @dev Check address whitelist status
*/
function isWhitelist() external view returns (bool) {
}
/**
* @dev Get _tokenID price
*/
function getTokenPrice(uint32 _tokenID) external view returns (uint) {
}
}
| _whitelistDesactivated||_whitelist[_msgSender()],"LANDPresaleCrowdsale: Sender is not whitelisted or whitelist active" | 49,153 | _whitelistDesactivated||_whitelist[_msgSender()] |
"Target address must be initialized." | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
/**
* @title Lib_ResolvedDelegateProxy
*/
contract Proxy__L1LiquidityPoolArguments {
/*************
* Variables *
*************/
mapping(string => address) public addressManager;
/***************
* Constructor *
***************/
/**
* @param _proxyTarget Address of the target contract.
*/
constructor(
address _proxyTarget
) {
}
/**********************
* Function Modifiers *
**********************/
modifier proxyCallIfNotOwner() {
}
/*********************
* Fallback Function *
*********************/
fallback()
external
payable
{
}
/********************
* Public Functions *
********************/
/**
* Update target
*
* @param _proxyTarget address of proxy target contract
*/
function setTargetContract(
address _proxyTarget
)
proxyCallIfNotOwner
external
{
}
/**
* Transfer owner
*/
function transferProxyOwnership()
proxyCallIfNotOwner
external
{
}
/**
* Performs the proxy call via a delegatecall.
*/
function _doProxyCall()
internal
{
require(<FILL_ME>)
(bool success, bytes memory returndata) = addressManager["proxyTarget"].delegatecall(msg.data);
if (success == true) {
assembly {
return(add(returndata, 0x20), mload(returndata))
}
} else {
assembly {
revert(add(returndata, 0x20), mload(returndata))
}
}
}
}
| addressManager["proxyOwner"]!=address(0),"Target address must be initialized." | 49,159 | addressManager["proxyOwner"]!=address(0) |
null | pragma solidity ^0.8.12;
import "./interfaces/IAPMReservoir.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./libraries/Signature.sol";
contract APMReservoir is Ownable, IAPMReservoir {
using SafeMath for uint256;
address[] public signers;
mapping(address => uint256) public signerIndex;
uint256 public signingNonce;
uint256 public quorum;
IFeeDB public feeDB;
IERC20 public token;
constructor(
IERC20 _token,
uint256 _quorum,
address[] memory _signers
) {
require(address(_token) != address(0));
token = _token;
require(_quorum > 0);
quorum = _quorum;
emit UpdateQuorum(_quorum);
require(_signers.length >= _quorum);
signers = _signers;
for (uint256 i = 0; i < _signers.length; i++) {
address signer = _signers[i];
require(signer != address(0));
require(<FILL_ME>)
if (i > 0) require(signer != _signers[0]);
signerIndex[signer] = i;
emit AddSigner(signer);
}
}
function signersLength() public view returns (uint256) {
}
function isSigner(address signer) public view returns (bool) {
}
function _checkSigners(
bytes32 message,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) private view {
}
function addSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function removeSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateQuorum(
uint256 newQuorum,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateFeeDB(IFeeDB newDB) public onlyOwner {
}
mapping(address => mapping(uint256 => mapping(address => uint256[]))) public sendedAmounts;
mapping(address => mapping(uint256 => mapping(address => mapping(uint256 => bool)))) public isTokenReceived;
function sendingCounts(
address sender,
uint256 toChainId,
address receiver
) public view returns (uint256) {
}
function sendToken(
uint256 toChainId,
address receiver,
uint256 amount
) public returns (uint256 sendingId) {
}
function receiveToken(
address sender,
uint256 fromChainId,
address receiver,
uint256 amount,
uint256 sendingId,
bool isFeePayed,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function _takeAmount(
address user,
uint256 amount,
bool paysFee
) private {
}
function _giveAmount(
address user,
uint256 amount,
bool isFeePayed
) private {
}
function _getFeeData(address user, uint256 amount) private view returns (uint256 fee, address feeRecipient) {
}
}
| signerIndex[signer]==0 | 49,209 | signerIndex[signer]==0 |
null | pragma solidity ^0.8.12;
import "./interfaces/IAPMReservoir.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./libraries/Signature.sol";
contract APMReservoir is Ownable, IAPMReservoir {
using SafeMath for uint256;
address[] public signers;
mapping(address => uint256) public signerIndex;
uint256 public signingNonce;
uint256 public quorum;
IFeeDB public feeDB;
IERC20 public token;
constructor(
IERC20 _token,
uint256 _quorum,
address[] memory _signers
) {
}
function signersLength() public view returns (uint256) {
}
function isSigner(address signer) public view returns (bool) {
}
function _checkSigners(
bytes32 message,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) private view {
uint256 length = vs.length;
require(length == rs.length && length == ss.length);
require(length >= quorum);
for (uint256 i = 0; i < length; i++) {
require(<FILL_ME>)
}
}
function addSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function removeSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateQuorum(
uint256 newQuorum,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateFeeDB(IFeeDB newDB) public onlyOwner {
}
mapping(address => mapping(uint256 => mapping(address => uint256[]))) public sendedAmounts;
mapping(address => mapping(uint256 => mapping(address => mapping(uint256 => bool)))) public isTokenReceived;
function sendingCounts(
address sender,
uint256 toChainId,
address receiver
) public view returns (uint256) {
}
function sendToken(
uint256 toChainId,
address receiver,
uint256 amount
) public returns (uint256 sendingId) {
}
function receiveToken(
address sender,
uint256 fromChainId,
address receiver,
uint256 amount,
uint256 sendingId,
bool isFeePayed,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function _takeAmount(
address user,
uint256 amount,
bool paysFee
) private {
}
function _giveAmount(
address user,
uint256 amount,
bool isFeePayed
) private {
}
function _getFeeData(address user, uint256 amount) private view returns (uint256 fee, address feeRecipient) {
}
}
| isSigner(Signature.recover(message,vs[i],rs[i],ss[i])) | 49,209 | isSigner(Signature.recover(message,vs[i],rs[i],ss[i])) |
null | pragma solidity ^0.8.12;
import "./interfaces/IAPMReservoir.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./libraries/Signature.sol";
contract APMReservoir is Ownable, IAPMReservoir {
using SafeMath for uint256;
address[] public signers;
mapping(address => uint256) public signerIndex;
uint256 public signingNonce;
uint256 public quorum;
IFeeDB public feeDB;
IERC20 public token;
constructor(
IERC20 _token,
uint256 _quorum,
address[] memory _signers
) {
}
function signersLength() public view returns (uint256) {
}
function isSigner(address signer) public view returns (bool) {
}
function _checkSigners(
bytes32 message,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) private view {
}
function addSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
require(signer != address(0));
require(<FILL_ME>)
bytes32 hash = keccak256(abi.encodePacked("addSigner", block.chainid, signingNonce++));
bytes32 message = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
_checkSigners(message, vs, rs, ss);
signerIndex[signer] = signersLength();
signers.push(signer);
emit AddSigner(signer);
}
function removeSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateQuorum(
uint256 newQuorum,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateFeeDB(IFeeDB newDB) public onlyOwner {
}
mapping(address => mapping(uint256 => mapping(address => uint256[]))) public sendedAmounts;
mapping(address => mapping(uint256 => mapping(address => mapping(uint256 => bool)))) public isTokenReceived;
function sendingCounts(
address sender,
uint256 toChainId,
address receiver
) public view returns (uint256) {
}
function sendToken(
uint256 toChainId,
address receiver,
uint256 amount
) public returns (uint256 sendingId) {
}
function receiveToken(
address sender,
uint256 fromChainId,
address receiver,
uint256 amount,
uint256 sendingId,
bool isFeePayed,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function _takeAmount(
address user,
uint256 amount,
bool paysFee
) private {
}
function _giveAmount(
address user,
uint256 amount,
bool isFeePayed
) private {
}
function _getFeeData(address user, uint256 amount) private view returns (uint256 fee, address feeRecipient) {
}
}
| !isSigner(signer) | 49,209 | !isSigner(signer) |
null | pragma solidity ^0.8.12;
import "./interfaces/IAPMReservoir.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./libraries/Signature.sol";
contract APMReservoir is Ownable, IAPMReservoir {
using SafeMath for uint256;
address[] public signers;
mapping(address => uint256) public signerIndex;
uint256 public signingNonce;
uint256 public quorum;
IFeeDB public feeDB;
IERC20 public token;
constructor(
IERC20 _token,
uint256 _quorum,
address[] memory _signers
) {
}
function signersLength() public view returns (uint256) {
}
function isSigner(address signer) public view returns (bool) {
}
function _checkSigners(
bytes32 message,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) private view {
}
function addSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function removeSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
require(signer != address(0));
require(<FILL_ME>)
bytes32 hash = keccak256(abi.encodePacked("removeSigner", block.chainid, signingNonce++));
bytes32 message = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
_checkSigners(message, vs, rs, ss);
uint256 lastIndex = signersLength().sub(1);
require(lastIndex >= quorum);
uint256 targetIndex = signerIndex[signer];
if (targetIndex != lastIndex) {
address lastSigner = signers[lastIndex];
signers[targetIndex] = lastSigner;
signerIndex[lastSigner] = targetIndex;
}
signers.pop();
delete signerIndex[signer];
emit RemoveSigner(signer);
}
function updateQuorum(
uint256 newQuorum,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateFeeDB(IFeeDB newDB) public onlyOwner {
}
mapping(address => mapping(uint256 => mapping(address => uint256[]))) public sendedAmounts;
mapping(address => mapping(uint256 => mapping(address => mapping(uint256 => bool)))) public isTokenReceived;
function sendingCounts(
address sender,
uint256 toChainId,
address receiver
) public view returns (uint256) {
}
function sendToken(
uint256 toChainId,
address receiver,
uint256 amount
) public returns (uint256 sendingId) {
}
function receiveToken(
address sender,
uint256 fromChainId,
address receiver,
uint256 amount,
uint256 sendingId,
bool isFeePayed,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function _takeAmount(
address user,
uint256 amount,
bool paysFee
) private {
}
function _giveAmount(
address user,
uint256 amount,
bool isFeePayed
) private {
}
function _getFeeData(address user, uint256 amount) private view returns (uint256 fee, address feeRecipient) {
}
}
| isSigner(signer) | 49,209 | isSigner(signer) |
null | pragma solidity ^0.8.12;
import "./interfaces/IAPMReservoir.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./libraries/Signature.sol";
contract APMReservoir is Ownable, IAPMReservoir {
using SafeMath for uint256;
address[] public signers;
mapping(address => uint256) public signerIndex;
uint256 public signingNonce;
uint256 public quorum;
IFeeDB public feeDB;
IERC20 public token;
constructor(
IERC20 _token,
uint256 _quorum,
address[] memory _signers
) {
}
function signersLength() public view returns (uint256) {
}
function isSigner(address signer) public view returns (bool) {
}
function _checkSigners(
bytes32 message,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) private view {
}
function addSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function removeSigner(
address signer,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateQuorum(
uint256 newQuorum,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
}
function updateFeeDB(IFeeDB newDB) public onlyOwner {
}
mapping(address => mapping(uint256 => mapping(address => uint256[]))) public sendedAmounts;
mapping(address => mapping(uint256 => mapping(address => mapping(uint256 => bool)))) public isTokenReceived;
function sendingCounts(
address sender,
uint256 toChainId,
address receiver
) public view returns (uint256) {
}
function sendToken(
uint256 toChainId,
address receiver,
uint256 amount
) public returns (uint256 sendingId) {
}
function receiveToken(
address sender,
uint256 fromChainId,
address receiver,
uint256 amount,
uint256 sendingId,
bool isFeePayed,
uint8[] memory vs,
bytes32[] memory rs,
bytes32[] memory ss
) public {
require(<FILL_ME>)
bytes32 hash = keccak256(
abi.encodePacked(fromChainId, sender, block.chainid, receiver, amount, sendingId, isFeePayed)
);
bytes32 message = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
_checkSigners(message, vs, rs, ss);
isTokenReceived[sender][fromChainId][receiver][sendingId] = true;
_giveAmount(receiver, amount, isFeePayed);
emit ReceiveToken(sender, fromChainId, receiver, amount, sendingId);
}
function _takeAmount(
address user,
uint256 amount,
bool paysFee
) private {
}
function _giveAmount(
address user,
uint256 amount,
bool isFeePayed
) private {
}
function _getFeeData(address user, uint256 amount) private view returns (uint256 fee, address feeRecipient) {
}
}
| !isTokenReceived[sender][fromChainId][receiver][sendingId] | 49,209 | !isTokenReceived[sender][fromChainId][receiver][sendingId] |
null | pragma solidity 0.5.16;
/// @title Version
contract Version {
string public semanticVersion;
/// @notice Constructor saves a public version of the deployed Contract.
/// @param _version Semantic version of the contract.
constructor(string memory _version) internal {
}
}
/// @title Factory
contract Factory is Version {
event FactoryAddedContract(address indexed _contract);
modifier contractHasntDeployed(address _contract) {
require(<FILL_ME>)
_;
}
mapping(address => bool) public contracts;
constructor(string memory _version) internal Version(_version) {}
function hasBeenDeployed(address _contract) public view returns (bool) {
}
function addContract(address _contract)
internal
contractHasntDeployed(_contract)
returns (bool)
{
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface ERC20 {
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value)
external
returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
contract PaymentAddress is Ownable {
address public collector;
event PaymentMade(
address indexed _payer,
address indexed _collector,
uint256 _value
);
event ClaimedTokens(
address indexed _token,
address indexed _collector,
uint256 _amount
);
constructor(address _collector, address _owner) public {
}
function() external payable {
}
/// @notice This method can be used by the controller to extract tokens to this contract.
/// @param _token The address of the token contract that you want to recover
function claimTokens(address _token) public onlyOwner {
}
}
contract PaymentAddressFactory is Factory {
// index of created contracts
mapping(address => address[]) public paymentAddresses;
constructor() public Factory("1.1.0") {}
// deploy a new contract
function newPaymentAddress(address _collector, address _owner)
public
returns (address newContract)
{
}
}
| contracts[_contract]==false | 49,229 | contracts[_contract]==false |
"Token transfer could not be executed." | pragma solidity 0.5.16;
/// @title Version
contract Version {
string public semanticVersion;
/// @notice Constructor saves a public version of the deployed Contract.
/// @param _version Semantic version of the contract.
constructor(string memory _version) internal {
}
}
/// @title Factory
contract Factory is Version {
event FactoryAddedContract(address indexed _contract);
modifier contractHasntDeployed(address _contract) {
}
mapping(address => bool) public contracts;
constructor(string memory _version) internal Version(_version) {}
function hasBeenDeployed(address _contract) public view returns (bool) {
}
function addContract(address _contract)
internal
contractHasntDeployed(_contract)
returns (bool)
{
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface ERC20 {
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value)
external
returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
contract PaymentAddress is Ownable {
address public collector;
event PaymentMade(
address indexed _payer,
address indexed _collector,
uint256 _value
);
event ClaimedTokens(
address indexed _token,
address indexed _collector,
uint256 _amount
);
constructor(address _collector, address _owner) public {
}
function() external payable {
}
/// @notice This method can be used by the controller to extract tokens to this contract.
/// @param _token The address of the token contract that you want to recover
function claimTokens(address _token) public onlyOwner {
ERC20 erc20token = ERC20(_token);
uint256 balance = erc20token.balanceOf(address(this));
require(<FILL_ME>)
emit ClaimedTokens(_token, collector, balance);
}
}
contract PaymentAddressFactory is Factory {
// index of created contracts
mapping(address => address[]) public paymentAddresses;
constructor() public Factory("1.1.0") {}
// deploy a new contract
function newPaymentAddress(address _collector, address _owner)
public
returns (address newContract)
{
}
}
| erc20token.transfer(collector,balance),"Token transfer could not be executed." | 49,229 | erc20token.transfer(collector,balance) |
"Formation.Fi: proxy is the zero address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/Math.sol";
/**
* @title AlphaToken
* @dev Implementation of the LP Token "ALPHA".
*/
contract AlphaToken is ERC20, Ownable {
// Proxy address
address alphaStrategy;
address admin;
// Deposit Mapping
mapping(address => uint256[]) public amountDepositPerAddress;
mapping(address => uint256[]) public timeDepositPerAddress;
constructor() ERC20("Formation Fi: ALPHA TOKEN", "ALPHA") {}
// Modifiers
modifier onlyProxy() {
require(<FILL_ME>)
require(
(msg.sender == alphaStrategy) || (msg.sender == admin),
"Formation.Fi: Caller is not the proxy"
);
_;
}
modifier onlyAlphaStrategy() {
}
// Setter functions
function setAlphaStrategy(address _alphaStrategy) external onlyOwner {
}
function setAdmin(address _admin) external onlyOwner {
}
function addTimeDeposit(address _account, uint256 _time) external onlyAlphaStrategy {
}
function addAmountDeposit(address _account, uint256 _amount) external onlyAlphaStrategy {
}
// functions "mint" and "burn"
function mint(address _account, uint256 _amount) external onlyProxy {
}
function burn(address _account, uint256 _amount) external onlyProxy {
}
// Check the user lock up condition for his withdrawal request
function ChecklWithdrawalRequest(address _account, uint256 _amount, uint256 _period)
external view returns (bool){
}
// Functions to update users deposit data
function updateDepositDataExternal( address _account, uint256 _amount)
external onlyAlphaStrategy {
}
function updateDepositData( address _account, uint256 _amount) internal {
}
// Delete deposit data
function deleteDepositData(address _account, uint256 _ind) internal {
}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override{
}
}
| (alphaStrategy!=address(0))&&(admin!=address(0)),"Formation.Fi: proxy is the zero address" | 49,302 | (alphaStrategy!=address(0))&&(admin!=address(0)) |
"Formation.Fi: Caller is not the proxy" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/Math.sol";
/**
* @title AlphaToken
* @dev Implementation of the LP Token "ALPHA".
*/
contract AlphaToken is ERC20, Ownable {
// Proxy address
address alphaStrategy;
address admin;
// Deposit Mapping
mapping(address => uint256[]) public amountDepositPerAddress;
mapping(address => uint256[]) public timeDepositPerAddress;
constructor() ERC20("Formation Fi: ALPHA TOKEN", "ALPHA") {}
// Modifiers
modifier onlyProxy() {
require(
(alphaStrategy != address(0)) && (admin != address(0)),
"Formation.Fi: proxy is the zero address"
);
require(<FILL_ME>)
_;
}
modifier onlyAlphaStrategy() {
}
// Setter functions
function setAlphaStrategy(address _alphaStrategy) external onlyOwner {
}
function setAdmin(address _admin) external onlyOwner {
}
function addTimeDeposit(address _account, uint256 _time) external onlyAlphaStrategy {
}
function addAmountDeposit(address _account, uint256 _amount) external onlyAlphaStrategy {
}
// functions "mint" and "burn"
function mint(address _account, uint256 _amount) external onlyProxy {
}
function burn(address _account, uint256 _amount) external onlyProxy {
}
// Check the user lock up condition for his withdrawal request
function ChecklWithdrawalRequest(address _account, uint256 _amount, uint256 _period)
external view returns (bool){
}
// Functions to update users deposit data
function updateDepositDataExternal( address _account, uint256 _amount)
external onlyAlphaStrategy {
}
function updateDepositData( address _account, uint256 _amount) internal {
}
// Delete deposit data
function deleteDepositData(address _account, uint256 _ind) internal {
}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override{
}
}
| (msg.sender==alphaStrategy)||(msg.sender==admin),"Formation.Fi: Caller is not the proxy" | 49,302 | (msg.sender==alphaStrategy)||(msg.sender==admin) |
"Formation.Fi: user position locked" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./libraries/Math.sol";
/**
* @title AlphaToken
* @dev Implementation of the LP Token "ALPHA".
*/
contract AlphaToken is ERC20, Ownable {
// Proxy address
address alphaStrategy;
address admin;
// Deposit Mapping
mapping(address => uint256[]) public amountDepositPerAddress;
mapping(address => uint256[]) public timeDepositPerAddress;
constructor() ERC20("Formation Fi: ALPHA TOKEN", "ALPHA") {}
// Modifiers
modifier onlyProxy() {
}
modifier onlyAlphaStrategy() {
}
// Setter functions
function setAlphaStrategy(address _alphaStrategy) external onlyOwner {
}
function setAdmin(address _admin) external onlyOwner {
}
function addTimeDeposit(address _account, uint256 _time) external onlyAlphaStrategy {
}
function addAmountDeposit(address _account, uint256 _amount) external onlyAlphaStrategy {
}
// functions "mint" and "burn"
function mint(address _account, uint256 _amount) external onlyProxy {
}
function burn(address _account, uint256 _amount) external onlyProxy {
}
// Check the user lock up condition for his withdrawal request
function ChecklWithdrawalRequest(address _account, uint256 _amount, uint256 _period)
external view returns (bool){
require(
_account!= address(0),
"Formation.Fi: account is the zero address"
);
require(
_amount!= 0,
"Formation.Fi: amount is zero"
);
uint256 [] memory _amountDeposit = amountDepositPerAddress[_account];
uint256 [] memory _timeDeposit = timeDepositPerAddress[_account];
uint256 _amountTotal = 0;
for (uint256 i = 0; i < _amountDeposit.length; i++) {
require(<FILL_ME>)
if (_amount<= (_amountTotal + _amountDeposit[i])){
break;
}
_amountTotal = _amountTotal + _amountDeposit[i];
}
return true;
}
// Functions to update users deposit data
function updateDepositDataExternal( address _account, uint256 _amount)
external onlyAlphaStrategy {
}
function updateDepositData( address _account, uint256 _amount) internal {
}
// Delete deposit data
function deleteDepositData(address _account, uint256 _ind) internal {
}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override{
}
}
| (block.timestamp-_timeDeposit[i])>=_period,"Formation.Fi: user position locked" | 49,302 | (block.timestamp-_timeDeposit[i])>=_period |
"Function is locked for this address" | pragma solidity 0.6.2;
/*
* xKNC KyberDAO Pool Token
* Communal Staking Pool with Stated Governance Position
*/
contract xKNC is
Initializable,
ERC20,
OwnableUpgradeSafe,
PausableUpgradeSafe,
ReentrancyGuardUpgradeSafe
{
using SafeMath for uint256;
using SafeERC20 for ERC20;
address private constant ETH_ADDRESS =
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
ERC20 private knc;
IKyberDAO private kyberDao;
IKyberStaking private kyberStaking;
IKyberNetworkProxy private kyberProxy;
IKyberFeeHandler[] private kyberFeeHandlers;
address[] private kyberFeeTokens;
uint256 private constant PERCENT = 100;
uint256 private constant MAX_UINT = 2**256 - 1;
uint256 private constant INITIAL_SUPPLY_MULTIPLIER = 10;
uint256 private withdrawableEthFees;
uint256 private withdrawableKncFees;
string public mandate;
address private manager;
address private manager2;
struct FeeDivisors {
uint256 mintFee;
uint256 burnFee;
uint256 claimFee;
}
FeeDivisors public feeDivisors;
event FeeDivisorsSet(uint256 mintFee, uint256 burnFee, uint256 claimFee);
enum FeeTypes {MINT, BURN, CLAIM}
// vars added for v3
bool private v3Initialized;
IRewardsDistributor private rewardsDistributor;
// BlockLock logic ; Implements locking of mint, burn, transfer and transferFrom
// functions via a notLocked modifier
// Functions are locked per address.
// how many blocks are the functions locked for
uint256 private constant BLOCK_LOCK_COUNT = 6;
// last block for which this address is timelocked
mapping(address => uint256) public lastLockedBlock;
modifier notLocked(address lockedAddress) {
require(<FILL_ME>)
_;
lastLockedBlock[lockedAddress] = block.number + BLOCK_LOCK_COUNT;
}
function initialize(
string memory _symbol,
string memory _mandate,
IKyberStaking _kyberStaking,
IKyberNetworkProxy _kyberProxy,
ERC20 _knc,
IKyberDAO _kyberDao,
uint256 mintFee,
uint256 burnFee,
uint256 claimFee
) public initializer {
}
/*
* @notice Called by users buying with ETH
* @dev Swaps ETH for KNC, deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: kyberProxy.getExpectedRate(eth => knc)
*/
function mint(uint256 minRate)
external
payable
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users buying with KNC
* @notice Users must submit ERC20 approval before calling
* @dev Deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: Number of KNC to contribue
*/
function mintWithToken(uint256 kncAmountTwei)
external
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users burning their xKNC
* @dev Calculates pro rata KNC and redeems from Staking contract
* @dev: Exchanges for ETH if necessary and pays out to caller
* @param tokensToRedeem
* @param redeemForKnc bool: if true, redeem for KNC; otherwise ETH
* @param kyberProxy.getExpectedRate(knc => eth)
*/
function burn(
uint256 tokensToRedeemTwei,
bool redeemForKnc,
uint256 minRate
) external nonReentrant notLocked(msg.sender) {
}
/*
* @notice Calculates proportional issuance according to KNC contribution
* @notice Fund starts at ratio of INITIAL_SUPPLY_MULTIPLIER/1 == xKNC supply/KNC balance
* and approaches 1/1 as rewards accrue in KNC
* @param kncBalanceBefore used to determine ratio of incremental to current KNC
*/
function _calculateMintAmount(uint256 kncBalanceBefore)
private
view
returns (uint256 mintAmount)
{
}
function transfer(address recipient, uint256 amount)
public
override
notLocked(msg.sender)
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override notLocked(sender) returns (bool) {
}
/*
* @notice KyberDAO deposit
*/
function _deposit(uint256 amount) private {
}
/*
* @notice KyberDAO withdraw
*/
function _withdraw(uint256 amount) private {
}
/*
* @notice Vote on KyberDAO campaigns
* @dev Admin calls with relevant params for each campaign in an epoch
* @param proposalId: DAO proposalId
* @param optionBitMask: voting option
*/
function vote(uint256 proposalId, uint256 optionBitMask)
external
onlyOwnerOrManager
{
}
/*
* @notice Claim reward from previous epoch
* @dev Admin calls with relevant params
* @dev ETH/other asset rewards swapped into KNC
* @param cycle - sourced from Kyber API
* @param index - sourced from Kyber API
* @param tokens - ERC20 fee tokens
* @param merkleProof - sourced from Kyber API
* @param minRates - kyberProxy.getExpectedRate(eth/token => knc)
*/
function claimReward(
uint256 cycle,
uint256 index,
IERC20[] calldata tokens,
uint256[] calldata cumulativeAmounts,
bytes32[] calldata merkleProof,
uint256[] calldata minRates
) external onlyOwnerOrManager {
}
function _swapEtherToKnc(uint256 amount, uint256 minRate) private {
}
function _swapTokenToKnc(
address fromAddress,
uint256 amount,
uint256 minRate
) private {
}
/*
* @notice Returns ETH balance belonging to the fund
*/
function getFundEthBalanceWei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance staked to DAO
*/
function getFundKncBalanceTwei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance available to stake
*/
function getAvailableKncBalanceTwei() public view returns (uint256) {
}
function _administerEthFee(FeeTypes _type, uint256 ethBalBefore)
private
returns (uint256 fee)
{
}
function _administerKncFee(uint256 _kncAmount, FeeTypes _type)
private
returns (uint256 fee)
{
}
function getFeeRate(FeeTypes _type) public view returns (uint256) {
}
/* UTILS */
/*
* @notice Called by admin on deployment for KNC
* @dev Approves Kyber Proxy contract to trade KNC
* @param Token to approve on proxy contract
* @param Pass _reset as true if resetting allowance to zero
*/
function approveKyberProxyContract(address _token, bool _reset)
external
onlyOwnerOrManager
{
}
function _approveKyberProxyContract(address _token, bool _reset) private {
}
/*
* @notice Called by admin on deployment
* @dev (1 / feeDivisor) = % fee on mint, burn, ETH claims
* @dev ex: A feeDivisor of 334 suggests a fee of 0.3%
* @param feeDivisors[mint, burn, claim]:
*/
function setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) external onlyOwner {
}
function _setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) private {
}
function withdrawFees() external onlyOwner {
}
function setManager(address _manager) external onlyOwner {
}
function setManager2(address _manager2) external onlyOwner {
}
function pause() external onlyOwnerOrManager {
}
function unpause() external onlyOwnerOrManager {
}
modifier onlyOwnerOrManager {
}
/*
* @notice Fallback to accommodate claimRewards function
*/
receive() external payable {
}
function migrateV3(
address _newKnc,
IKyberDAO _newKyberDao,
IKyberStaking _newKyberStaking,
IRewardsDistributor _rewardsDistributor
) external onlyOwnerOrManager {
}
function setRewardsDistributor(IRewardsDistributor _rewardsDistributor)
external
onlyOwner
{
}
function getRewardDistributor()
external
view
returns (IRewardsDistributor)
{
}
}
| lastLockedBlock[lockedAddress]<=block.number,"Function is locked for this address" | 49,346 | lastLockedBlock[lockedAddress]<=block.number |
"Insufficient balance" | pragma solidity 0.6.2;
/*
* xKNC KyberDAO Pool Token
* Communal Staking Pool with Stated Governance Position
*/
contract xKNC is
Initializable,
ERC20,
OwnableUpgradeSafe,
PausableUpgradeSafe,
ReentrancyGuardUpgradeSafe
{
using SafeMath for uint256;
using SafeERC20 for ERC20;
address private constant ETH_ADDRESS =
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
ERC20 private knc;
IKyberDAO private kyberDao;
IKyberStaking private kyberStaking;
IKyberNetworkProxy private kyberProxy;
IKyberFeeHandler[] private kyberFeeHandlers;
address[] private kyberFeeTokens;
uint256 private constant PERCENT = 100;
uint256 private constant MAX_UINT = 2**256 - 1;
uint256 private constant INITIAL_SUPPLY_MULTIPLIER = 10;
uint256 private withdrawableEthFees;
uint256 private withdrawableKncFees;
string public mandate;
address private manager;
address private manager2;
struct FeeDivisors {
uint256 mintFee;
uint256 burnFee;
uint256 claimFee;
}
FeeDivisors public feeDivisors;
event FeeDivisorsSet(uint256 mintFee, uint256 burnFee, uint256 claimFee);
enum FeeTypes {MINT, BURN, CLAIM}
// vars added for v3
bool private v3Initialized;
IRewardsDistributor private rewardsDistributor;
// BlockLock logic ; Implements locking of mint, burn, transfer and transferFrom
// functions via a notLocked modifier
// Functions are locked per address.
// how many blocks are the functions locked for
uint256 private constant BLOCK_LOCK_COUNT = 6;
// last block for which this address is timelocked
mapping(address => uint256) public lastLockedBlock;
modifier notLocked(address lockedAddress) {
}
function initialize(
string memory _symbol,
string memory _mandate,
IKyberStaking _kyberStaking,
IKyberNetworkProxy _kyberProxy,
ERC20 _knc,
IKyberDAO _kyberDao,
uint256 mintFee,
uint256 burnFee,
uint256 claimFee
) public initializer {
}
/*
* @notice Called by users buying with ETH
* @dev Swaps ETH for KNC, deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: kyberProxy.getExpectedRate(eth => knc)
*/
function mint(uint256 minRate)
external
payable
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users buying with KNC
* @notice Users must submit ERC20 approval before calling
* @dev Deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: Number of KNC to contribue
*/
function mintWithToken(uint256 kncAmountTwei)
external
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users burning their xKNC
* @dev Calculates pro rata KNC and redeems from Staking contract
* @dev: Exchanges for ETH if necessary and pays out to caller
* @param tokensToRedeem
* @param redeemForKnc bool: if true, redeem for KNC; otherwise ETH
* @param kyberProxy.getExpectedRate(knc => eth)
*/
function burn(
uint256 tokensToRedeemTwei,
bool redeemForKnc,
uint256 minRate
) external nonReentrant notLocked(msg.sender) {
require(<FILL_ME>)
uint256 proRataKnc =
getFundKncBalanceTwei().mul(tokensToRedeemTwei).div(totalSupply());
_withdraw(proRataKnc);
super._burn(msg.sender, tokensToRedeemTwei);
if (redeemForKnc) {
uint256 fee = _administerKncFee(proRataKnc, FeeTypes.BURN);
knc.safeTransfer(msg.sender, proRataKnc.sub(fee));
} else {
// safeguard to not overcompensate _burn sender in case eth still awaiting for exch to KNC
uint256 ethBalBefore = getFundEthBalanceWei();
kyberProxy.swapTokenToEther(
knc,
getAvailableKncBalanceTwei(),
minRate
);
_administerEthFee(FeeTypes.BURN, ethBalBefore);
uint256 valToSend = getFundEthBalanceWei().sub(ethBalBefore);
(bool success, ) = msg.sender.call.value(valToSend)("");
require(success, "Burn transfer failed");
}
}
/*
* @notice Calculates proportional issuance according to KNC contribution
* @notice Fund starts at ratio of INITIAL_SUPPLY_MULTIPLIER/1 == xKNC supply/KNC balance
* and approaches 1/1 as rewards accrue in KNC
* @param kncBalanceBefore used to determine ratio of incremental to current KNC
*/
function _calculateMintAmount(uint256 kncBalanceBefore)
private
view
returns (uint256 mintAmount)
{
}
function transfer(address recipient, uint256 amount)
public
override
notLocked(msg.sender)
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override notLocked(sender) returns (bool) {
}
/*
* @notice KyberDAO deposit
*/
function _deposit(uint256 amount) private {
}
/*
* @notice KyberDAO withdraw
*/
function _withdraw(uint256 amount) private {
}
/*
* @notice Vote on KyberDAO campaigns
* @dev Admin calls with relevant params for each campaign in an epoch
* @param proposalId: DAO proposalId
* @param optionBitMask: voting option
*/
function vote(uint256 proposalId, uint256 optionBitMask)
external
onlyOwnerOrManager
{
}
/*
* @notice Claim reward from previous epoch
* @dev Admin calls with relevant params
* @dev ETH/other asset rewards swapped into KNC
* @param cycle - sourced from Kyber API
* @param index - sourced from Kyber API
* @param tokens - ERC20 fee tokens
* @param merkleProof - sourced from Kyber API
* @param minRates - kyberProxy.getExpectedRate(eth/token => knc)
*/
function claimReward(
uint256 cycle,
uint256 index,
IERC20[] calldata tokens,
uint256[] calldata cumulativeAmounts,
bytes32[] calldata merkleProof,
uint256[] calldata minRates
) external onlyOwnerOrManager {
}
function _swapEtherToKnc(uint256 amount, uint256 minRate) private {
}
function _swapTokenToKnc(
address fromAddress,
uint256 amount,
uint256 minRate
) private {
}
/*
* @notice Returns ETH balance belonging to the fund
*/
function getFundEthBalanceWei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance staked to DAO
*/
function getFundKncBalanceTwei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance available to stake
*/
function getAvailableKncBalanceTwei() public view returns (uint256) {
}
function _administerEthFee(FeeTypes _type, uint256 ethBalBefore)
private
returns (uint256 fee)
{
}
function _administerKncFee(uint256 _kncAmount, FeeTypes _type)
private
returns (uint256 fee)
{
}
function getFeeRate(FeeTypes _type) public view returns (uint256) {
}
/* UTILS */
/*
* @notice Called by admin on deployment for KNC
* @dev Approves Kyber Proxy contract to trade KNC
* @param Token to approve on proxy contract
* @param Pass _reset as true if resetting allowance to zero
*/
function approveKyberProxyContract(address _token, bool _reset)
external
onlyOwnerOrManager
{
}
function _approveKyberProxyContract(address _token, bool _reset) private {
}
/*
* @notice Called by admin on deployment
* @dev (1 / feeDivisor) = % fee on mint, burn, ETH claims
* @dev ex: A feeDivisor of 334 suggests a fee of 0.3%
* @param feeDivisors[mint, burn, claim]:
*/
function setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) external onlyOwner {
}
function _setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) private {
}
function withdrawFees() external onlyOwner {
}
function setManager(address _manager) external onlyOwner {
}
function setManager2(address _manager2) external onlyOwner {
}
function pause() external onlyOwnerOrManager {
}
function unpause() external onlyOwnerOrManager {
}
modifier onlyOwnerOrManager {
}
/*
* @notice Fallback to accommodate claimRewards function
*/
receive() external payable {
}
function migrateV3(
address _newKnc,
IKyberDAO _newKyberDao,
IKyberStaking _newKyberStaking,
IRewardsDistributor _rewardsDistributor
) external onlyOwnerOrManager {
}
function setRewardsDistributor(IRewardsDistributor _rewardsDistributor)
external
onlyOwner
{
}
function getRewardDistributor()
external
view
returns (IRewardsDistributor)
{
}
}
| balanceOf(msg.sender)>=tokensToRedeemTwei,"Insufficient balance" | 49,346 | balanceOf(msg.sender)>=tokensToRedeemTwei |
"Initialized already" | pragma solidity 0.6.2;
/*
* xKNC KyberDAO Pool Token
* Communal Staking Pool with Stated Governance Position
*/
contract xKNC is
Initializable,
ERC20,
OwnableUpgradeSafe,
PausableUpgradeSafe,
ReentrancyGuardUpgradeSafe
{
using SafeMath for uint256;
using SafeERC20 for ERC20;
address private constant ETH_ADDRESS =
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
ERC20 private knc;
IKyberDAO private kyberDao;
IKyberStaking private kyberStaking;
IKyberNetworkProxy private kyberProxy;
IKyberFeeHandler[] private kyberFeeHandlers;
address[] private kyberFeeTokens;
uint256 private constant PERCENT = 100;
uint256 private constant MAX_UINT = 2**256 - 1;
uint256 private constant INITIAL_SUPPLY_MULTIPLIER = 10;
uint256 private withdrawableEthFees;
uint256 private withdrawableKncFees;
string public mandate;
address private manager;
address private manager2;
struct FeeDivisors {
uint256 mintFee;
uint256 burnFee;
uint256 claimFee;
}
FeeDivisors public feeDivisors;
event FeeDivisorsSet(uint256 mintFee, uint256 burnFee, uint256 claimFee);
enum FeeTypes {MINT, BURN, CLAIM}
// vars added for v3
bool private v3Initialized;
IRewardsDistributor private rewardsDistributor;
// BlockLock logic ; Implements locking of mint, burn, transfer and transferFrom
// functions via a notLocked modifier
// Functions are locked per address.
// how many blocks are the functions locked for
uint256 private constant BLOCK_LOCK_COUNT = 6;
// last block for which this address is timelocked
mapping(address => uint256) public lastLockedBlock;
modifier notLocked(address lockedAddress) {
}
function initialize(
string memory _symbol,
string memory _mandate,
IKyberStaking _kyberStaking,
IKyberNetworkProxy _kyberProxy,
ERC20 _knc,
IKyberDAO _kyberDao,
uint256 mintFee,
uint256 burnFee,
uint256 claimFee
) public initializer {
}
/*
* @notice Called by users buying with ETH
* @dev Swaps ETH for KNC, deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: kyberProxy.getExpectedRate(eth => knc)
*/
function mint(uint256 minRate)
external
payable
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users buying with KNC
* @notice Users must submit ERC20 approval before calling
* @dev Deposits to Staking contract
* @dev: Mints pro rata xKNC tokens
* @param: Number of KNC to contribue
*/
function mintWithToken(uint256 kncAmountTwei)
external
whenNotPaused
notLocked(msg.sender)
{
}
/*
* @notice Called by users burning their xKNC
* @dev Calculates pro rata KNC and redeems from Staking contract
* @dev: Exchanges for ETH if necessary and pays out to caller
* @param tokensToRedeem
* @param redeemForKnc bool: if true, redeem for KNC; otherwise ETH
* @param kyberProxy.getExpectedRate(knc => eth)
*/
function burn(
uint256 tokensToRedeemTwei,
bool redeemForKnc,
uint256 minRate
) external nonReentrant notLocked(msg.sender) {
}
/*
* @notice Calculates proportional issuance according to KNC contribution
* @notice Fund starts at ratio of INITIAL_SUPPLY_MULTIPLIER/1 == xKNC supply/KNC balance
* and approaches 1/1 as rewards accrue in KNC
* @param kncBalanceBefore used to determine ratio of incremental to current KNC
*/
function _calculateMintAmount(uint256 kncBalanceBefore)
private
view
returns (uint256 mintAmount)
{
}
function transfer(address recipient, uint256 amount)
public
override
notLocked(msg.sender)
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override notLocked(sender) returns (bool) {
}
/*
* @notice KyberDAO deposit
*/
function _deposit(uint256 amount) private {
}
/*
* @notice KyberDAO withdraw
*/
function _withdraw(uint256 amount) private {
}
/*
* @notice Vote on KyberDAO campaigns
* @dev Admin calls with relevant params for each campaign in an epoch
* @param proposalId: DAO proposalId
* @param optionBitMask: voting option
*/
function vote(uint256 proposalId, uint256 optionBitMask)
external
onlyOwnerOrManager
{
}
/*
* @notice Claim reward from previous epoch
* @dev Admin calls with relevant params
* @dev ETH/other asset rewards swapped into KNC
* @param cycle - sourced from Kyber API
* @param index - sourced from Kyber API
* @param tokens - ERC20 fee tokens
* @param merkleProof - sourced from Kyber API
* @param minRates - kyberProxy.getExpectedRate(eth/token => knc)
*/
function claimReward(
uint256 cycle,
uint256 index,
IERC20[] calldata tokens,
uint256[] calldata cumulativeAmounts,
bytes32[] calldata merkleProof,
uint256[] calldata minRates
) external onlyOwnerOrManager {
}
function _swapEtherToKnc(uint256 amount, uint256 minRate) private {
}
function _swapTokenToKnc(
address fromAddress,
uint256 amount,
uint256 minRate
) private {
}
/*
* @notice Returns ETH balance belonging to the fund
*/
function getFundEthBalanceWei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance staked to DAO
*/
function getFundKncBalanceTwei() public view returns (uint256) {
}
/*
* @notice Returns KNC balance available to stake
*/
function getAvailableKncBalanceTwei() public view returns (uint256) {
}
function _administerEthFee(FeeTypes _type, uint256 ethBalBefore)
private
returns (uint256 fee)
{
}
function _administerKncFee(uint256 _kncAmount, FeeTypes _type)
private
returns (uint256 fee)
{
}
function getFeeRate(FeeTypes _type) public view returns (uint256) {
}
/* UTILS */
/*
* @notice Called by admin on deployment for KNC
* @dev Approves Kyber Proxy contract to trade KNC
* @param Token to approve on proxy contract
* @param Pass _reset as true if resetting allowance to zero
*/
function approveKyberProxyContract(address _token, bool _reset)
external
onlyOwnerOrManager
{
}
function _approveKyberProxyContract(address _token, bool _reset) private {
}
/*
* @notice Called by admin on deployment
* @dev (1 / feeDivisor) = % fee on mint, burn, ETH claims
* @dev ex: A feeDivisor of 334 suggests a fee of 0.3%
* @param feeDivisors[mint, burn, claim]:
*/
function setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) external onlyOwner {
}
function _setFeeDivisors(
uint256 _mintFee,
uint256 _burnFee,
uint256 _claimFee
) private {
}
function withdrawFees() external onlyOwner {
}
function setManager(address _manager) external onlyOwner {
}
function setManager2(address _manager2) external onlyOwner {
}
function pause() external onlyOwnerOrManager {
}
function unpause() external onlyOwnerOrManager {
}
modifier onlyOwnerOrManager {
}
/*
* @notice Fallback to accommodate claimRewards function
*/
receive() external payable {
}
function migrateV3(
address _newKnc,
IKyberDAO _newKyberDao,
IKyberStaking _newKyberStaking,
IRewardsDistributor _rewardsDistributor
) external onlyOwnerOrManager {
require(<FILL_ME>)
v3Initialized = true;
_withdraw(getFundKncBalanceTwei());
knc.approve(_newKnc, MAX_UINT);
INewKNC(_newKnc).mintWithOldKnc(knc.balanceOf(address(this)));
knc = ERC20(_newKnc);
kyberDao = _newKyberDao;
kyberStaking = _newKyberStaking;
rewardsDistributor = _rewardsDistributor;
knc.approve(address(kyberStaking), MAX_UINT);
_deposit(getAvailableKncBalanceTwei());
}
function setRewardsDistributor(IRewardsDistributor _rewardsDistributor)
external
onlyOwner
{
}
function getRewardDistributor()
external
view
returns (IRewardsDistributor)
{
}
}
| !v3Initialized,"Initialized already" | 49,346 | !v3Initialized |
null | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////THIS IS THE RPEPEBLU POOL OF KEK STAKING - rPepe Token Staking//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: UNLICENSED
/**
* @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) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
interface IKEK{
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function transfer(address to, uint256 tokens) external returns (bool success);
function claimRewards(uint256 rewards, address rewardedTo) external returns(bool);
function stakingRewardsAvailable() external view returns(uint256 _rewardsAvailable);
}
pragma solidity ^0.6.0;
contract rPepeToKEK {
using SafeMath for uint256;
uint256 public currentStakingRate;
address public KEK = 0x31AEe7Db3b390bAaD34213C173A9df0dd11D84bd;
address public RPepe = 0x0e9b56D2233ea2b5883861754435f9C51Dbca141;
uint256 public totalRewards;
uint256 private basePercent = 100;
struct DepositedToken{
uint256 activeDeposit;
uint256 totalDeposits;
uint256 startTime;
uint256 pendingGains;
uint256 lastClaimedDate;
uint256 totalGained;
uint rate;
}
mapping(address => DepositedToken) users;
event Staked(address indexed staker, uint256 indexed tokens);
event StakingRateChanged(uint256 indexed stakingRatePerHour);
event TokensClaimed(address indexed claimer, uint256 indexed stakedTokens);
event RewardClaimed(address indexed claimer, uint256 indexed reward);
constructor() public{
}
// ------------------------------------------------------------------------
// Start staking
// @param _amount amount of tokens to deposit
// ------------------------------------------------------------------------
function Stake(uint256 _amount) external {
// transfer tokens from user to the contract balance
require(<FILL_ME>)
uint256 tokensBurned = findTwoPointFivePercent(_amount);
uint256 tokensTransferred = _amount.sub(tokensBurned);
// add new stake
_addToStake(tokensTransferred);
emit Staked(msg.sender, _amount);
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimStakedTokens() public {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimReward() public {
}
function Exit() external{
}
// ------------------------------------------------------------------------
// Private function to update the staking rate
// ------------------------------------------------------------------------
function _updateStakingRate() private{
}
// ------------------------------------------------------------------------
// Query to get the pending reward
// ------------------------------------------------------------------------
function PendingReward(address _caller) public view returns(uint256 _pendingReward){
}
// ------------------------------------------------------------------------
// Query to get the active stake of the user
// ------------------------------------------------------------------------
function YourActiveStake(address _user) external view returns(uint256 _activeStake){
}
// ------------------------------------------------------------------------
// Query to get the total stakes of the user
// ------------------------------------------------------------------------
function YourTotalStakes(address _user) external view returns(uint256 _totalStakes){
}
// ------------------------------------------------------------------------
// Query to get total earned rewards from stake
// ------------------------------------------------------------------------
function TotalStakeRewardsClaimed(address _user) external view returns(uint256 _totalEarned){
}
// ------------------------------------------------------------------------
// Query to get the staking rate you staked at
// ------------------------------------------------------------------------
function YourStakingRate(address _user) external view returns(uint256 _stakingRate){
}
// ------------------------------------------------------------------------
// Internal function to add new deposit
// ------------------------------------------------------------------------
function _addToStake(uint256 _amount) internal{
}
//// utility function from RPepe
function findTwoPointFivePercent(uint256 value) public view returns (uint256) {
}
}
| IKEK(RPepe).transferFrom(msg.sender,address(this),_amount) | 49,500 | IKEK(RPepe).transferFrom(msg.sender,address(this),_amount) |
"no running stake" | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////THIS IS THE RPEPEBLU POOL OF KEK STAKING - rPepe Token Staking//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: UNLICENSED
/**
* @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) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
interface IKEK{
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function transfer(address to, uint256 tokens) external returns (bool success);
function claimRewards(uint256 rewards, address rewardedTo) external returns(bool);
function stakingRewardsAvailable() external view returns(uint256 _rewardsAvailable);
}
pragma solidity ^0.6.0;
contract rPepeToKEK {
using SafeMath for uint256;
uint256 public currentStakingRate;
address public KEK = 0x31AEe7Db3b390bAaD34213C173A9df0dd11D84bd;
address public RPepe = 0x0e9b56D2233ea2b5883861754435f9C51Dbca141;
uint256 public totalRewards;
uint256 private basePercent = 100;
struct DepositedToken{
uint256 activeDeposit;
uint256 totalDeposits;
uint256 startTime;
uint256 pendingGains;
uint256 lastClaimedDate;
uint256 totalGained;
uint rate;
}
mapping(address => DepositedToken) users;
event Staked(address indexed staker, uint256 indexed tokens);
event StakingRateChanged(uint256 indexed stakingRatePerHour);
event TokensClaimed(address indexed claimer, uint256 indexed stakedTokens);
event RewardClaimed(address indexed claimer, uint256 indexed reward);
constructor() public{
}
// ------------------------------------------------------------------------
// Start staking
// @param _amount amount of tokens to deposit
// ------------------------------------------------------------------------
function Stake(uint256 _amount) external {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimStakedTokens() public {
require(<FILL_ME>)
uint256 _currentDeposit = users[msg.sender].activeDeposit;
// check if we have any pending reward, add it to pendingGains var
users[msg.sender].pendingGains = PendingReward(msg.sender);
// update amount
users[msg.sender].activeDeposit = 0;
// transfer staked tokens
require(IKEK(RPepe).transfer(msg.sender, _currentDeposit));
emit TokensClaimed(msg.sender, _currentDeposit);
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimReward() public {
}
function Exit() external{
}
// ------------------------------------------------------------------------
// Private function to update the staking rate
// ------------------------------------------------------------------------
function _updateStakingRate() private{
}
// ------------------------------------------------------------------------
// Query to get the pending reward
// ------------------------------------------------------------------------
function PendingReward(address _caller) public view returns(uint256 _pendingReward){
}
// ------------------------------------------------------------------------
// Query to get the active stake of the user
// ------------------------------------------------------------------------
function YourActiveStake(address _user) external view returns(uint256 _activeStake){
}
// ------------------------------------------------------------------------
// Query to get the total stakes of the user
// ------------------------------------------------------------------------
function YourTotalStakes(address _user) external view returns(uint256 _totalStakes){
}
// ------------------------------------------------------------------------
// Query to get total earned rewards from stake
// ------------------------------------------------------------------------
function TotalStakeRewardsClaimed(address _user) external view returns(uint256 _totalEarned){
}
// ------------------------------------------------------------------------
// Query to get the staking rate you staked at
// ------------------------------------------------------------------------
function YourStakingRate(address _user) external view returns(uint256 _stakingRate){
}
// ------------------------------------------------------------------------
// Internal function to add new deposit
// ------------------------------------------------------------------------
function _addToStake(uint256 _amount) internal{
}
//// utility function from RPepe
function findTwoPointFivePercent(uint256 value) public view returns (uint256) {
}
}
| users[msg.sender].activeDeposit>0,"no running stake" | 49,500 | users[msg.sender].activeDeposit>0 |
null | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////THIS IS THE RPEPEBLU POOL OF KEK STAKING - rPepe Token Staking//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: UNLICENSED
/**
* @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) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
interface IKEK{
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function transfer(address to, uint256 tokens) external returns (bool success);
function claimRewards(uint256 rewards, address rewardedTo) external returns(bool);
function stakingRewardsAvailable() external view returns(uint256 _rewardsAvailable);
}
pragma solidity ^0.6.0;
contract rPepeToKEK {
using SafeMath for uint256;
uint256 public currentStakingRate;
address public KEK = 0x31AEe7Db3b390bAaD34213C173A9df0dd11D84bd;
address public RPepe = 0x0e9b56D2233ea2b5883861754435f9C51Dbca141;
uint256 public totalRewards;
uint256 private basePercent = 100;
struct DepositedToken{
uint256 activeDeposit;
uint256 totalDeposits;
uint256 startTime;
uint256 pendingGains;
uint256 lastClaimedDate;
uint256 totalGained;
uint rate;
}
mapping(address => DepositedToken) users;
event Staked(address indexed staker, uint256 indexed tokens);
event StakingRateChanged(uint256 indexed stakingRatePerHour);
event TokensClaimed(address indexed claimer, uint256 indexed stakedTokens);
event RewardClaimed(address indexed claimer, uint256 indexed reward);
constructor() public{
}
// ------------------------------------------------------------------------
// Start staking
// @param _amount amount of tokens to deposit
// ------------------------------------------------------------------------
function Stake(uint256 _amount) external {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimStakedTokens() public {
require(users[msg.sender].activeDeposit > 0, "no running stake");
uint256 _currentDeposit = users[msg.sender].activeDeposit;
// check if we have any pending reward, add it to pendingGains var
users[msg.sender].pendingGains = PendingReward(msg.sender);
// update amount
users[msg.sender].activeDeposit = 0;
// transfer staked tokens
require(<FILL_ME>)
emit TokensClaimed(msg.sender, _currentDeposit);
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimReward() public {
}
function Exit() external{
}
// ------------------------------------------------------------------------
// Private function to update the staking rate
// ------------------------------------------------------------------------
function _updateStakingRate() private{
}
// ------------------------------------------------------------------------
// Query to get the pending reward
// ------------------------------------------------------------------------
function PendingReward(address _caller) public view returns(uint256 _pendingReward){
}
// ------------------------------------------------------------------------
// Query to get the active stake of the user
// ------------------------------------------------------------------------
function YourActiveStake(address _user) external view returns(uint256 _activeStake){
}
// ------------------------------------------------------------------------
// Query to get the total stakes of the user
// ------------------------------------------------------------------------
function YourTotalStakes(address _user) external view returns(uint256 _totalStakes){
}
// ------------------------------------------------------------------------
// Query to get total earned rewards from stake
// ------------------------------------------------------------------------
function TotalStakeRewardsClaimed(address _user) external view returns(uint256 _totalEarned){
}
// ------------------------------------------------------------------------
// Query to get the staking rate you staked at
// ------------------------------------------------------------------------
function YourStakingRate(address _user) external view returns(uint256 _stakingRate){
}
// ------------------------------------------------------------------------
// Internal function to add new deposit
// ------------------------------------------------------------------------
function _addToStake(uint256 _amount) internal{
}
//// utility function from RPepe
function findTwoPointFivePercent(uint256 value) public view returns (uint256) {
}
}
| IKEK(RPepe).transfer(msg.sender,_currentDeposit) | 49,500 | IKEK(RPepe).transfer(msg.sender,_currentDeposit) |
"nothing pending to claim" | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////THIS IS THE RPEPEBLU POOL OF KEK STAKING - rPepe Token Staking//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: UNLICENSED
/**
* @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) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
interface IKEK{
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function transfer(address to, uint256 tokens) external returns (bool success);
function claimRewards(uint256 rewards, address rewardedTo) external returns(bool);
function stakingRewardsAvailable() external view returns(uint256 _rewardsAvailable);
}
pragma solidity ^0.6.0;
contract rPepeToKEK {
using SafeMath for uint256;
uint256 public currentStakingRate;
address public KEK = 0x31AEe7Db3b390bAaD34213C173A9df0dd11D84bd;
address public RPepe = 0x0e9b56D2233ea2b5883861754435f9C51Dbca141;
uint256 public totalRewards;
uint256 private basePercent = 100;
struct DepositedToken{
uint256 activeDeposit;
uint256 totalDeposits;
uint256 startTime;
uint256 pendingGains;
uint256 lastClaimedDate;
uint256 totalGained;
uint rate;
}
mapping(address => DepositedToken) users;
event Staked(address indexed staker, uint256 indexed tokens);
event StakingRateChanged(uint256 indexed stakingRatePerHour);
event TokensClaimed(address indexed claimer, uint256 indexed stakedTokens);
event RewardClaimed(address indexed claimer, uint256 indexed reward);
constructor() public{
}
// ------------------------------------------------------------------------
// Start staking
// @param _amount amount of tokens to deposit
// ------------------------------------------------------------------------
function Stake(uint256 _amount) external {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimStakedTokens() public {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimReward() public {
require(<FILL_ME>)
uint256 _pendingReward = PendingReward(msg.sender);
// add claimed reward to global stats
totalRewards = totalRewards.add(_pendingReward);
// add the reward to total claimed rewards
users[msg.sender].totalGained = users[msg.sender].totalGained.add(_pendingReward);
// update lastClaim amount
users[msg.sender].lastClaimedDate = now;
// reset previous rewards
users[msg.sender].pendingGains = 0;
// send tokens from KEK to the user
require(IKEK(KEK).claimRewards(_pendingReward, msg.sender));
_updateStakingRate();
// update staking rate
users[msg.sender].rate = currentStakingRate;
emit RewardClaimed(msg.sender, _pendingReward);
}
function Exit() external{
}
// ------------------------------------------------------------------------
// Private function to update the staking rate
// ------------------------------------------------------------------------
function _updateStakingRate() private{
}
// ------------------------------------------------------------------------
// Query to get the pending reward
// ------------------------------------------------------------------------
function PendingReward(address _caller) public view returns(uint256 _pendingReward){
}
// ------------------------------------------------------------------------
// Query to get the active stake of the user
// ------------------------------------------------------------------------
function YourActiveStake(address _user) external view returns(uint256 _activeStake){
}
// ------------------------------------------------------------------------
// Query to get the total stakes of the user
// ------------------------------------------------------------------------
function YourTotalStakes(address _user) external view returns(uint256 _totalStakes){
}
// ------------------------------------------------------------------------
// Query to get total earned rewards from stake
// ------------------------------------------------------------------------
function TotalStakeRewardsClaimed(address _user) external view returns(uint256 _totalEarned){
}
// ------------------------------------------------------------------------
// Query to get the staking rate you staked at
// ------------------------------------------------------------------------
function YourStakingRate(address _user) external view returns(uint256 _stakingRate){
}
// ------------------------------------------------------------------------
// Internal function to add new deposit
// ------------------------------------------------------------------------
function _addToStake(uint256 _amount) internal{
}
//// utility function from RPepe
function findTwoPointFivePercent(uint256 value) public view returns (uint256) {
}
}
| PendingReward(msg.sender)>0,"nothing pending to claim" | 49,500 | PendingReward(msg.sender)>0 |
null | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////THIS IS THE RPEPEBLU POOL OF KEK STAKING - rPepe Token Staking//////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////################################################################/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: UNLICENSED
/**
* @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) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
interface IKEK{
function transferFrom(address from, address to, uint256 tokens) external returns (bool success);
function transfer(address to, uint256 tokens) external returns (bool success);
function claimRewards(uint256 rewards, address rewardedTo) external returns(bool);
function stakingRewardsAvailable() external view returns(uint256 _rewardsAvailable);
}
pragma solidity ^0.6.0;
contract rPepeToKEK {
using SafeMath for uint256;
uint256 public currentStakingRate;
address public KEK = 0x31AEe7Db3b390bAaD34213C173A9df0dd11D84bd;
address public RPepe = 0x0e9b56D2233ea2b5883861754435f9C51Dbca141;
uint256 public totalRewards;
uint256 private basePercent = 100;
struct DepositedToken{
uint256 activeDeposit;
uint256 totalDeposits;
uint256 startTime;
uint256 pendingGains;
uint256 lastClaimedDate;
uint256 totalGained;
uint rate;
}
mapping(address => DepositedToken) users;
event Staked(address indexed staker, uint256 indexed tokens);
event StakingRateChanged(uint256 indexed stakingRatePerHour);
event TokensClaimed(address indexed claimer, uint256 indexed stakedTokens);
event RewardClaimed(address indexed claimer, uint256 indexed reward);
constructor() public{
}
// ------------------------------------------------------------------------
// Start staking
// @param _amount amount of tokens to deposit
// ------------------------------------------------------------------------
function Stake(uint256 _amount) external {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimStakedTokens() public {
}
// ------------------------------------------------------------------------
// Claim reward and staked tokens
// @required user must be a staker
// @required must be claimable
// ------------------------------------------------------------------------
function ClaimReward() public {
require(PendingReward(msg.sender) > 0, "nothing pending to claim");
uint256 _pendingReward = PendingReward(msg.sender);
// add claimed reward to global stats
totalRewards = totalRewards.add(_pendingReward);
// add the reward to total claimed rewards
users[msg.sender].totalGained = users[msg.sender].totalGained.add(_pendingReward);
// update lastClaim amount
users[msg.sender].lastClaimedDate = now;
// reset previous rewards
users[msg.sender].pendingGains = 0;
// send tokens from KEK to the user
require(<FILL_ME>)
_updateStakingRate();
// update staking rate
users[msg.sender].rate = currentStakingRate;
emit RewardClaimed(msg.sender, _pendingReward);
}
function Exit() external{
}
// ------------------------------------------------------------------------
// Private function to update the staking rate
// ------------------------------------------------------------------------
function _updateStakingRate() private{
}
// ------------------------------------------------------------------------
// Query to get the pending reward
// ------------------------------------------------------------------------
function PendingReward(address _caller) public view returns(uint256 _pendingReward){
}
// ------------------------------------------------------------------------
// Query to get the active stake of the user
// ------------------------------------------------------------------------
function YourActiveStake(address _user) external view returns(uint256 _activeStake){
}
// ------------------------------------------------------------------------
// Query to get the total stakes of the user
// ------------------------------------------------------------------------
function YourTotalStakes(address _user) external view returns(uint256 _totalStakes){
}
// ------------------------------------------------------------------------
// Query to get total earned rewards from stake
// ------------------------------------------------------------------------
function TotalStakeRewardsClaimed(address _user) external view returns(uint256 _totalEarned){
}
// ------------------------------------------------------------------------
// Query to get the staking rate you staked at
// ------------------------------------------------------------------------
function YourStakingRate(address _user) external view returns(uint256 _stakingRate){
}
// ------------------------------------------------------------------------
// Internal function to add new deposit
// ------------------------------------------------------------------------
function _addToStake(uint256 _amount) internal{
}
//// utility function from RPepe
function findTwoPointFivePercent(uint256 value) public view returns (uint256) {
}
}
| IKEK(KEK).claimRewards(_pendingReward,msg.sender) | 49,500 | IKEK(KEK).claimRewards(_pendingReward,msg.sender) |
"BlacklistedRole: caller is Blacklisted" | pragma solidity 0.5.10;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
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 private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner`.
*/
constructor(address initialOwner) internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* See https://eips.ethereum.org/EIPS/eip-20
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
function _mint(address account, uint256 value) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function burn(uint256 value) public {
}
function burnFrom(address from, uint256 value) public {
}
}
/**
* @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) {
}
}
/**
* @title BlacklistedRole
* @dev Blacklisted accounts have been dismissed to perform certain actions.
*/
contract BlacklistedRole is Ownable {
using Roles for Roles.Role;
event BlacklistedAdded(address indexed account);
event BlacklistedRemoved(address indexed account);
Roles.Role private _blacklisteds;
modifier notBlacklisted(address account) {
require(<FILL_ME>)
_;
}
function isBlacklisted(address account) public view returns (bool) {
}
function addBlacklisted(address account) public onlyOwner {
}
function removeBlacklisted(address account) public onlyOwner {
}
}
/**
* @title ApproveAndCall Interface.
* @dev ApproveAndCall system allows to communicate with smart-contracts.
*/
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 amount, address token, bytes calldata extraData) external;
}
/**
* @title The main contract (g.s).
*/
contract asgX is ERC20, BlacklistedRole {
// name of the token
string private _name = "asgX";
// symbol of the token
string private _symbol = "asgX";
// decimals of the token
uint8 private _decimals = 18;
// initial supply
uint256 internal constant INITIAL_SUPPLY = 1000000000 * (10 ** 18);
// Pausable feature
bool internal _paused;
// registered contracts (to prevent loss of token via transfer function)
mapping (address => bool) private _contracts;
// events
event Paused(uint256 time);
event Unpaused(uint256 time);
event ContractAdded(address contractAddr);
event ContractRemoved(address contractAddr);
modifier notPaused {
}
/**
* @dev constructor function that is called once at deployment of the contract.
* @param recipient Address to receive initial supply.
*/
constructor(address recipient, address initialOwner) public Ownable(initialOwner) {
}
/**
* @dev modified internal transfer function with Pausable and Blacklist features.
* @param from The address of token holder.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal notPaused notBlacklisted(from) {
}
/**
* @dev modified transfer function that allows to safely send tokens to registered smart contract.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Allows to owner of the contract to suspend any transfer of the token.
*/
function pause() public onlyOwner {
}
/**
* @dev Allows to owner of the contract to revive transfers of the token.
*/
function unpause() public onlyOwner {
}
/**
* @dev Allows to register other smart contracts (to prevent loss of tokens via transfer function).
* @param addr Address of smart contracts to work with.
*/
function registerContract(address addr) public onlyOwner {
}
/**
* @dev Allows to unregister registered smart contracts.
* @param addr Address of smart contracts to work with.
*/
function unregisterContract(address addr) external onlyOwner {
}
/**
* @dev Allows to send tokens (via Approve and TransferFrom) to other smart contract.
* @param spender Address of smart contracts to work with.
* @param amount Amount of tokens to send.
* @param extraData Any extra data.
*/
function approveAndCall(address spender, uint256 amount, bytes memory extraData) public returns (bool) {
}
/**
* @dev Allows to owner of the contract withdraw needed ERC20 token from this contract (promo or bounties for example).
* @param ERC20Token Address of ERC20 token.
* @param recipient Account to receive tokens.
*/
function withdrawERC20(address ERC20Token, address recipient) external onlyOwner {
}
/**
* @return true if transfers of token are suspended.
*/
function paused() public view returns (bool) {
}
/**
* @return true if the address is registered as contract
*/
function isRegistered(address addr) public view returns (bool) {
}
/**
* @return true if the address is a сontract
*/
function isContract(address addr) internal view returns (bool) {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
}
| !isBlacklisted(account),"BlacklistedRole: caller is Blacklisted" | 49,508 | !isBlacklisted(account) |
'Address is not a contract' | pragma solidity 0.5.10;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
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 private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner`.
*/
constructor(address initialOwner) internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* See https://eips.ethereum.org/EIPS/eip-20
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
function _mint(address account, uint256 value) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function burn(uint256 value) public {
}
function burnFrom(address from, uint256 value) public {
}
}
/**
* @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) {
}
}
/**
* @title BlacklistedRole
* @dev Blacklisted accounts have been dismissed to perform certain actions.
*/
contract BlacklistedRole is Ownable {
using Roles for Roles.Role;
event BlacklistedAdded(address indexed account);
event BlacklistedRemoved(address indexed account);
Roles.Role private _blacklisteds;
modifier notBlacklisted(address account) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function addBlacklisted(address account) public onlyOwner {
}
function removeBlacklisted(address account) public onlyOwner {
}
}
/**
* @title ApproveAndCall Interface.
* @dev ApproveAndCall system allows to communicate with smart-contracts.
*/
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 amount, address token, bytes calldata extraData) external;
}
/**
* @title The main contract (g.s).
*/
contract asgX is ERC20, BlacklistedRole {
// name of the token
string private _name = "asgX";
// symbol of the token
string private _symbol = "asgX";
// decimals of the token
uint8 private _decimals = 18;
// initial supply
uint256 internal constant INITIAL_SUPPLY = 1000000000 * (10 ** 18);
// Pausable feature
bool internal _paused;
// registered contracts (to prevent loss of token via transfer function)
mapping (address => bool) private _contracts;
// events
event Paused(uint256 time);
event Unpaused(uint256 time);
event ContractAdded(address contractAddr);
event ContractRemoved(address contractAddr);
modifier notPaused {
}
/**
* @dev constructor function that is called once at deployment of the contract.
* @param recipient Address to receive initial supply.
*/
constructor(address recipient, address initialOwner) public Ownable(initialOwner) {
}
/**
* @dev modified internal transfer function with Pausable and Blacklist features.
* @param from The address of token holder.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal notPaused notBlacklisted(from) {
}
/**
* @dev modified transfer function that allows to safely send tokens to registered smart contract.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Allows to owner of the contract to suspend any transfer of the token.
*/
function pause() public onlyOwner {
}
/**
* @dev Allows to owner of the contract to revive transfers of the token.
*/
function unpause() public onlyOwner {
}
/**
* @dev Allows to register other smart contracts (to prevent loss of tokens via transfer function).
* @param addr Address of smart contracts to work with.
*/
function registerContract(address addr) public onlyOwner {
require(<FILL_ME>)
_contracts[addr] = true;
emit ContractAdded(addr);
}
/**
* @dev Allows to unregister registered smart contracts.
* @param addr Address of smart contracts to work with.
*/
function unregisterContract(address addr) external onlyOwner {
}
/**
* @dev Allows to send tokens (via Approve and TransferFrom) to other smart contract.
* @param spender Address of smart contracts to work with.
* @param amount Amount of tokens to send.
* @param extraData Any extra data.
*/
function approveAndCall(address spender, uint256 amount, bytes memory extraData) public returns (bool) {
}
/**
* @dev Allows to owner of the contract withdraw needed ERC20 token from this contract (promo or bounties for example).
* @param ERC20Token Address of ERC20 token.
* @param recipient Account to receive tokens.
*/
function withdrawERC20(address ERC20Token, address recipient) external onlyOwner {
}
/**
* @return true if transfers of token are suspended.
*/
function paused() public view returns (bool) {
}
/**
* @return true if the address is registered as contract
*/
function isRegistered(address addr) public view returns (bool) {
}
/**
* @return true if the address is a сontract
*/
function isContract(address addr) internal view returns (bool) {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
}
| isContract(addr),'Address is not a contract' | 49,508 | isContract(addr) |
null | pragma solidity 0.5.10;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
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 private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner`.
*/
constructor(address initialOwner) internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* See https://eips.ethereum.org/EIPS/eip-20
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
function _mint(address account, uint256 value) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function burn(uint256 value) public {
}
function burnFrom(address from, uint256 value) public {
}
}
/**
* @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) {
}
}
/**
* @title BlacklistedRole
* @dev Blacklisted accounts have been dismissed to perform certain actions.
*/
contract BlacklistedRole is Ownable {
using Roles for Roles.Role;
event BlacklistedAdded(address indexed account);
event BlacklistedRemoved(address indexed account);
Roles.Role private _blacklisteds;
modifier notBlacklisted(address account) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function addBlacklisted(address account) public onlyOwner {
}
function removeBlacklisted(address account) public onlyOwner {
}
}
/**
* @title ApproveAndCall Interface.
* @dev ApproveAndCall system allows to communicate with smart-contracts.
*/
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 amount, address token, bytes calldata extraData) external;
}
/**
* @title The main contract (g.s).
*/
contract asgX is ERC20, BlacklistedRole {
// name of the token
string private _name = "asgX";
// symbol of the token
string private _symbol = "asgX";
// decimals of the token
uint8 private _decimals = 18;
// initial supply
uint256 internal constant INITIAL_SUPPLY = 1000000000 * (10 ** 18);
// Pausable feature
bool internal _paused;
// registered contracts (to prevent loss of token via transfer function)
mapping (address => bool) private _contracts;
// events
event Paused(uint256 time);
event Unpaused(uint256 time);
event ContractAdded(address contractAddr);
event ContractRemoved(address contractAddr);
modifier notPaused {
}
/**
* @dev constructor function that is called once at deployment of the contract.
* @param recipient Address to receive initial supply.
*/
constructor(address recipient, address initialOwner) public Ownable(initialOwner) {
}
/**
* @dev modified internal transfer function with Pausable and Blacklist features.
* @param from The address of token holder.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal notPaused notBlacklisted(from) {
}
/**
* @dev modified transfer function that allows to safely send tokens to registered smart contract.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Allows to owner of the contract to suspend any transfer of the token.
*/
function pause() public onlyOwner {
}
/**
* @dev Allows to owner of the contract to revive transfers of the token.
*/
function unpause() public onlyOwner {
}
/**
* @dev Allows to register other smart contracts (to prevent loss of tokens via transfer function).
* @param addr Address of smart contracts to work with.
*/
function registerContract(address addr) public onlyOwner {
}
/**
* @dev Allows to unregister registered smart contracts.
* @param addr Address of smart contracts to work with.
*/
function unregisterContract(address addr) external onlyOwner {
require(<FILL_ME>)
_contracts[addr] = false;
emit ContractRemoved(addr);
}
/**
* @dev Allows to send tokens (via Approve and TransferFrom) to other smart contract.
* @param spender Address of smart contracts to work with.
* @param amount Amount of tokens to send.
* @param extraData Any extra data.
*/
function approveAndCall(address spender, uint256 amount, bytes memory extraData) public returns (bool) {
}
/**
* @dev Allows to owner of the contract withdraw needed ERC20 token from this contract (promo or bounties for example).
* @param ERC20Token Address of ERC20 token.
* @param recipient Account to receive tokens.
*/
function withdrawERC20(address ERC20Token, address recipient) external onlyOwner {
}
/**
* @return true if transfers of token are suspended.
*/
function paused() public view returns (bool) {
}
/**
* @return true if the address is registered as contract
*/
function isRegistered(address addr) public view returns (bool) {
}
/**
* @return true if the address is a сontract
*/
function isContract(address addr) internal view returns (bool) {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
}
| _contracts[addr] | 49,508 | _contracts[addr] |
null | pragma solidity 0.5.10;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
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 private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner`.
*/
constructor(address initialOwner) internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* See https://eips.ethereum.org/EIPS/eip-20
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
function _mint(address account, uint256 value) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function burn(uint256 value) public {
}
function burnFrom(address from, uint256 value) public {
}
}
/**
* @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) {
}
}
/**
* @title BlacklistedRole
* @dev Blacklisted accounts have been dismissed to perform certain actions.
*/
contract BlacklistedRole is Ownable {
using Roles for Roles.Role;
event BlacklistedAdded(address indexed account);
event BlacklistedRemoved(address indexed account);
Roles.Role private _blacklisteds;
modifier notBlacklisted(address account) {
}
function isBlacklisted(address account) public view returns (bool) {
}
function addBlacklisted(address account) public onlyOwner {
}
function removeBlacklisted(address account) public onlyOwner {
}
}
/**
* @title ApproveAndCall Interface.
* @dev ApproveAndCall system allows to communicate with smart-contracts.
*/
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 amount, address token, bytes calldata extraData) external;
}
/**
* @title The main contract (g.s).
*/
contract asgX is ERC20, BlacklistedRole {
// name of the token
string private _name = "asgX";
// symbol of the token
string private _symbol = "asgX";
// decimals of the token
uint8 private _decimals = 18;
// initial supply
uint256 internal constant INITIAL_SUPPLY = 1000000000 * (10 ** 18);
// Pausable feature
bool internal _paused;
// registered contracts (to prevent loss of token via transfer function)
mapping (address => bool) private _contracts;
// events
event Paused(uint256 time);
event Unpaused(uint256 time);
event ContractAdded(address contractAddr);
event ContractRemoved(address contractAddr);
modifier notPaused {
}
/**
* @dev constructor function that is called once at deployment of the contract.
* @param recipient Address to receive initial supply.
*/
constructor(address recipient, address initialOwner) public Ownable(initialOwner) {
}
/**
* @dev modified internal transfer function with Pausable and Blacklist features.
* @param from The address of token holder.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal notPaused notBlacklisted(from) {
}
/**
* @dev modified transfer function that allows to safely send tokens to registered smart contract.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
}
/**
* @dev Allows to owner of the contract to suspend any transfer of the token.
*/
function pause() public onlyOwner {
}
/**
* @dev Allows to owner of the contract to revive transfers of the token.
*/
function unpause() public onlyOwner {
}
/**
* @dev Allows to register other smart contracts (to prevent loss of tokens via transfer function).
* @param addr Address of smart contracts to work with.
*/
function registerContract(address addr) public onlyOwner {
}
/**
* @dev Allows to unregister registered smart contracts.
* @param addr Address of smart contracts to work with.
*/
function unregisterContract(address addr) external onlyOwner {
}
/**
* @dev Allows to send tokens (via Approve and TransferFrom) to other smart contract.
* @param spender Address of smart contracts to work with.
* @param amount Amount of tokens to send.
* @param extraData Any extra data.
*/
function approveAndCall(address spender, uint256 amount, bytes memory extraData) public returns (bool) {
require(<FILL_ME>)
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, amount, address(this), extraData);
return true;
}
/**
* @dev Allows to owner of the contract withdraw needed ERC20 token from this contract (promo or bounties for example).
* @param ERC20Token Address of ERC20 token.
* @param recipient Account to receive tokens.
*/
function withdrawERC20(address ERC20Token, address recipient) external onlyOwner {
}
/**
* @return true if transfers of token are suspended.
*/
function paused() public view returns (bool) {
}
/**
* @return true if the address is registered as contract
*/
function isRegistered(address addr) public view returns (bool) {
}
/**
* @return true if the address is a сontract
*/
function isContract(address addr) internal view returns (bool) {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
}
}
| approve(spender,amount) | 49,508 | approve(spender,amount) |
"Sale has already ended" | // contracts/Ethersparks.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// Inspired from BGANPUNKS V2 (bastardganpunks.club) & Chubbies
contract Ethersparks is ERC721, Ownable {
using SafeMath for uint256;
uint public constant MAX_ETHERSPARKS = 10200;
bool public hasSaleStarted = false;
// The IPFS hash for all Ethersparks concatenated *might* stored here once all Ethersparks are issued and if I figure it out
string public METADATA_PROVENANCE_HASH = "";
// Truth.
string public constant R =
"Those cute little Ethersparks are on a mission to the moon.";
constructor() ERC721("Ethersparks", "ETHERSPARKS") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function calculatePrice() public view returns (uint256) {
require(hasSaleStarted == true, "Sale hasn't started");
require(<FILL_ME>)
uint currentSupply = totalSupply();
if (currentSupply >= 10000) {
return 130000000000000000; // 10000-10199: 0.13 ETH
} else if (currentSupply >= 9500) {
return 110000000000000000; // 9500-9999: 0.11 ETH
} else if (currentSupply >= 7500) {
return 90000000000000000; // 7500-9499: 0.09 ETH
} else if (currentSupply >= 3500) {
return 70000000000000000; // 3500-7499: 0.07 ETH
} else if (currentSupply >= 1500) {
return 50000000000000000; // 1500-3499: 0.05 ETH
} else if (currentSupply >= 500) {
return 30000000000000000; // 500-1499: 0.03 ETH
} else {
return 10000000000000000; // 0-499: 0.01 ETH
}
}
function calculatePriceForToken(uint _id) public view returns (uint256) {
}
function adoptEthersparks(uint256 numEthersparks) public payable {
}
// God Mode
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveGiveaway(uint256 numEthersparks) public onlyOwner {
}
}
| totalSupply()<MAX_ETHERSPARKS,"Sale has already ended" | 49,519 | totalSupply()<MAX_ETHERSPARKS |
"Exceeds MAX_ETHERSPARKS" | // contracts/Ethersparks.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// Inspired from BGANPUNKS V2 (bastardganpunks.club) & Chubbies
contract Ethersparks is ERC721, Ownable {
using SafeMath for uint256;
uint public constant MAX_ETHERSPARKS = 10200;
bool public hasSaleStarted = false;
// The IPFS hash for all Ethersparks concatenated *might* stored here once all Ethersparks are issued and if I figure it out
string public METADATA_PROVENANCE_HASH = "";
// Truth.
string public constant R =
"Those cute little Ethersparks are on a mission to the moon.";
constructor() ERC721("Ethersparks", "ETHERSPARKS") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function calculatePrice() public view returns (uint256) {
}
function calculatePriceForToken(uint _id) public view returns (uint256) {
}
function adoptEthersparks(uint256 numEthersparks) public payable {
require(totalSupply() < MAX_ETHERSPARKS, "Sale has already ended");
require(
numEthersparks > 0 && numEthersparks <= 20,
"You can adopt minimum 1, maximum 20 Ethersparks"
);
require(<FILL_ME>)
require(
msg.value >= calculatePrice().mul(numEthersparks),
"Ether value sent is below the price"
);
for (uint i = 0; i < numEthersparks; i++) {
uint mintIndex = totalSupply();
_safeMint(msg.sender, mintIndex);
}
}
// God Mode
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveGiveaway(uint256 numEthersparks) public onlyOwner {
}
}
| totalSupply().add(numEthersparks)<=MAX_ETHERSPARKS,"Exceeds MAX_ETHERSPARKS" | 49,519 | totalSupply().add(numEthersparks)<=MAX_ETHERSPARKS |
Subsets and Splits