comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
pragma solidity =0.8.0; // ---------------------------------------------------------------------------- // NBU token main contract (2020) // // Symbol : NBU // Name : Nimbus // Total supply : 1.000.000.000 (burnable) // Decimals : 18 // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed to); constructor() { } modifier onlyOwner { } function transferOwnership(address transferOwner) public onlyOwner { } function acceptOwnership() virtual public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(<FILL_ME>) _; } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract NBU is IERC20, Ownable, Pausable { using SafeMath for uint; mapping (address => mapping (address => uint)) private _allowances; mapping (address => uint) private _unfrozenBalances; mapping (address => uint) private _vestingNonces; mapping (address => mapping (uint => uint)) private _vestingAmounts; mapping (address => mapping (uint => uint)) private _unvestedAmounts; mapping (address => mapping (uint => uint)) private _vestingTypes; //0 - multivest, 1 - single vest, > 2 give by vester id mapping (address => mapping (uint => uint)) private _vestingReleaseStartDates; uint private _totalSupply = 1_000_000_000e18; string private constant _name = "Nimbus"; string private constant _symbol = "NBU"; uint8 private constant _decimals = 18; uint private vestingFirstPeriod = 60 days; uint private vestingSecondPeriod = 152 days; uint public giveAmount; mapping (address => bool) public vesters; bytes32 public immutable DOMAIN_SEPARATOR; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); mapping (address => uint) public nonces; event Unvest(address user, uint amount); constructor () { } function approve(address spender, uint amount) external override whenNotPaused returns (bool) { } function transfer(address recipient, uint amount) external override whenNotPaused returns (bool) { } function transferFrom(address sender, address recipient, uint amount) external override whenNotPaused returns (bool) { } function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external whenNotPaused { } function increaseAllowance(address spender, uint addedValue) external returns (bool) { } function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) { } function unvest() external whenNotPaused returns (uint unvested) { } function give(address user, uint amount, uint vesterId) external { } function vest(address user, uint amount) external { } function burnTokens(uint amount) external onlyOwner returns (bool success) { } function allowance(address owner, address spender) external view override returns (uint) { } function decimals() external pure returns (uint8) { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function totalSupply() external view override returns (uint) { } function balanceOf(address account) external view override returns (uint) { } function availableForUnvesting(address user) external view returns (uint unvestAmount) { } function availableForTransfer(address account) external view returns (uint) { } function vestingInfo(address user, uint nonce) external view returns (uint vestingAmount, uint unvestedAmount, uint vestingReleaseStartDate, uint vestType) { } function vestingNonces(address user) external view returns (uint lastNonce) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address sender, address recipient, uint amount) private { } function _vest(address user, uint amount, uint vestType) private { } function multisend(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function multivest(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function updateVesters(address vester, bool isActive) external onlyOwner { } function updateGiveAmount(uint amount) external onlyOwner { } function transferAnyERC20Token(address tokenAddress, uint tokens) external onlyOwner returns (bool success) { } function acceptOwnership() public override { } }
!paused
1,580
!paused
"NBU::unvest:No vested amount"
pragma solidity =0.8.0; // ---------------------------------------------------------------------------- // NBU token main contract (2020) // // Symbol : NBU // Name : Nimbus // Total supply : 1.000.000.000 (burnable) // Decimals : 18 // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed to); constructor() { } modifier onlyOwner { } function transferOwnership(address transferOwner) public onlyOwner { } function acceptOwnership() virtual public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract NBU is IERC20, Ownable, Pausable { using SafeMath for uint; mapping (address => mapping (address => uint)) private _allowances; mapping (address => uint) private _unfrozenBalances; mapping (address => uint) private _vestingNonces; mapping (address => mapping (uint => uint)) private _vestingAmounts; mapping (address => mapping (uint => uint)) private _unvestedAmounts; mapping (address => mapping (uint => uint)) private _vestingTypes; //0 - multivest, 1 - single vest, > 2 give by vester id mapping (address => mapping (uint => uint)) private _vestingReleaseStartDates; uint private _totalSupply = 1_000_000_000e18; string private constant _name = "Nimbus"; string private constant _symbol = "NBU"; uint8 private constant _decimals = 18; uint private vestingFirstPeriod = 60 days; uint private vestingSecondPeriod = 152 days; uint public giveAmount; mapping (address => bool) public vesters; bytes32 public immutable DOMAIN_SEPARATOR; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); mapping (address => uint) public nonces; event Unvest(address user, uint amount); constructor () { } function approve(address spender, uint amount) external override whenNotPaused returns (bool) { } function transfer(address recipient, uint amount) external override whenNotPaused returns (bool) { } function transferFrom(address sender, address recipient, uint amount) external override whenNotPaused returns (bool) { } function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external whenNotPaused { } function increaseAllowance(address spender, uint addedValue) external returns (bool) { } function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) { } function unvest() external whenNotPaused returns (uint unvested) { require(<FILL_ME>) for (uint i = 1; i <= _vestingNonces[msg.sender]; i++) { if (_vestingAmounts[msg.sender][i] == _unvestedAmounts[msg.sender][i]) continue; if (_vestingReleaseStartDates[msg.sender][i] > block.timestamp) break; uint toUnvest = block.timestamp.sub(_vestingReleaseStartDates[msg.sender][i]).mul(_vestingAmounts[msg.sender][i]) / vestingSecondPeriod; if (toUnvest > _vestingAmounts[msg.sender][i]) { toUnvest = _vestingAmounts[msg.sender][i]; } uint totalUnvestedForNonce = toUnvest; toUnvest = toUnvest.sub(_unvestedAmounts[msg.sender][i]); unvested = unvested.add(toUnvest); _unvestedAmounts[msg.sender][i] = totalUnvestedForNonce; } _unfrozenBalances[msg.sender] = _unfrozenBalances[msg.sender].add(unvested); emit Unvest(msg.sender, unvested); } function give(address user, uint amount, uint vesterId) external { } function vest(address user, uint amount) external { } function burnTokens(uint amount) external onlyOwner returns (bool success) { } function allowance(address owner, address spender) external view override returns (uint) { } function decimals() external pure returns (uint8) { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function totalSupply() external view override returns (uint) { } function balanceOf(address account) external view override returns (uint) { } function availableForUnvesting(address user) external view returns (uint unvestAmount) { } function availableForTransfer(address account) external view returns (uint) { } function vestingInfo(address user, uint nonce) external view returns (uint vestingAmount, uint unvestedAmount, uint vestingReleaseStartDate, uint vestType) { } function vestingNonces(address user) external view returns (uint lastNonce) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address sender, address recipient, uint amount) private { } function _vest(address user, uint amount, uint vestType) private { } function multisend(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function multivest(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function updateVesters(address vester, bool isActive) external onlyOwner { } function updateGiveAmount(uint amount) external onlyOwner { } function transferAnyERC20Token(address tokenAddress, uint tokens) external onlyOwner returns (bool success) { } function acceptOwnership() public override { } }
_vestingNonces[msg.sender]>0,"NBU::unvest:No vested amount"
1,580
_vestingNonces[msg.sender]>0
"NBU::give: not vester"
pragma solidity =0.8.0; // ---------------------------------------------------------------------------- // NBU token main contract (2020) // // Symbol : NBU // Name : Nimbus // Total supply : 1.000.000.000 (burnable) // Decimals : 18 // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed to); constructor() { } modifier onlyOwner { } function transferOwnership(address transferOwner) public onlyOwner { } function acceptOwnership() virtual public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract NBU is IERC20, Ownable, Pausable { using SafeMath for uint; mapping (address => mapping (address => uint)) private _allowances; mapping (address => uint) private _unfrozenBalances; mapping (address => uint) private _vestingNonces; mapping (address => mapping (uint => uint)) private _vestingAmounts; mapping (address => mapping (uint => uint)) private _unvestedAmounts; mapping (address => mapping (uint => uint)) private _vestingTypes; //0 - multivest, 1 - single vest, > 2 give by vester id mapping (address => mapping (uint => uint)) private _vestingReleaseStartDates; uint private _totalSupply = 1_000_000_000e18; string private constant _name = "Nimbus"; string private constant _symbol = "NBU"; uint8 private constant _decimals = 18; uint private vestingFirstPeriod = 60 days; uint private vestingSecondPeriod = 152 days; uint public giveAmount; mapping (address => bool) public vesters; bytes32 public immutable DOMAIN_SEPARATOR; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); mapping (address => uint) public nonces; event Unvest(address user, uint amount); constructor () { } function approve(address spender, uint amount) external override whenNotPaused returns (bool) { } function transfer(address recipient, uint amount) external override whenNotPaused returns (bool) { } function transferFrom(address sender, address recipient, uint amount) external override whenNotPaused returns (bool) { } function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external whenNotPaused { } function increaseAllowance(address spender, uint addedValue) external returns (bool) { } function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) { } function unvest() external whenNotPaused returns (uint unvested) { } function give(address user, uint amount, uint vesterId) external { require (giveAmount > amount, "NBU::give: give finished"); require(<FILL_ME>) giveAmount = giveAmount.sub(amount); _vest(user, amount, vesterId); } function vest(address user, uint amount) external { } function burnTokens(uint amount) external onlyOwner returns (bool success) { } function allowance(address owner, address spender) external view override returns (uint) { } function decimals() external pure returns (uint8) { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function totalSupply() external view override returns (uint) { } function balanceOf(address account) external view override returns (uint) { } function availableForUnvesting(address user) external view returns (uint unvestAmount) { } function availableForTransfer(address account) external view returns (uint) { } function vestingInfo(address user, uint nonce) external view returns (uint vestingAmount, uint unvestedAmount, uint vestingReleaseStartDate, uint vestType) { } function vestingNonces(address user) external view returns (uint lastNonce) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address sender, address recipient, uint amount) private { } function _vest(address user, uint amount, uint vestType) private { } function multisend(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function multivest(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function updateVesters(address vester, bool isActive) external onlyOwner { } function updateGiveAmount(uint amount) external onlyOwner { } function transferAnyERC20Token(address tokenAddress, uint tokens) external onlyOwner returns (bool success) { } function acceptOwnership() public override { } }
vesters[msg.sender],"NBU::give: not vester"
1,580
vesters[msg.sender]
"NBU::updateGiveAmount: exceed owner balance"
pragma solidity =0.8.0; // ---------------------------------------------------------------------------- // NBU token main contract (2020) // // Symbol : NBU // Name : Nimbus // Total supply : 1.000.000.000 (burnable) // Decimals : 18 // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed to); constructor() { } modifier onlyOwner { } function transferOwnership(address transferOwner) public onlyOwner { } function acceptOwnership() virtual public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract NBU is IERC20, Ownable, Pausable { using SafeMath for uint; mapping (address => mapping (address => uint)) private _allowances; mapping (address => uint) private _unfrozenBalances; mapping (address => uint) private _vestingNonces; mapping (address => mapping (uint => uint)) private _vestingAmounts; mapping (address => mapping (uint => uint)) private _unvestedAmounts; mapping (address => mapping (uint => uint)) private _vestingTypes; //0 - multivest, 1 - single vest, > 2 give by vester id mapping (address => mapping (uint => uint)) private _vestingReleaseStartDates; uint private _totalSupply = 1_000_000_000e18; string private constant _name = "Nimbus"; string private constant _symbol = "NBU"; uint8 private constant _decimals = 18; uint private vestingFirstPeriod = 60 days; uint private vestingSecondPeriod = 152 days; uint public giveAmount; mapping (address => bool) public vesters; bytes32 public immutable DOMAIN_SEPARATOR; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); mapping (address => uint) public nonces; event Unvest(address user, uint amount); constructor () { } function approve(address spender, uint amount) external override whenNotPaused returns (bool) { } function transfer(address recipient, uint amount) external override whenNotPaused returns (bool) { } function transferFrom(address sender, address recipient, uint amount) external override whenNotPaused returns (bool) { } function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external whenNotPaused { } function increaseAllowance(address spender, uint addedValue) external returns (bool) { } function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) { } function unvest() external whenNotPaused returns (uint unvested) { } function give(address user, uint amount, uint vesterId) external { } function vest(address user, uint amount) external { } function burnTokens(uint amount) external onlyOwner returns (bool success) { } function allowance(address owner, address spender) external view override returns (uint) { } function decimals() external pure returns (uint8) { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function totalSupply() external view override returns (uint) { } function balanceOf(address account) external view override returns (uint) { } function availableForUnvesting(address user) external view returns (uint unvestAmount) { } function availableForTransfer(address account) external view returns (uint) { } function vestingInfo(address user, uint nonce) external view returns (uint vestingAmount, uint unvestedAmount, uint vestingReleaseStartDate, uint vestType) { } function vestingNonces(address user) external view returns (uint lastNonce) { } function _approve(address owner, address spender, uint amount) private { } function _transfer(address sender, address recipient, uint amount) private { } function _vest(address user, uint amount, uint vestType) private { } function multisend(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function multivest(address[] memory to, uint[] memory values) external onlyOwner returns (uint) { } function updateVesters(address vester, bool isActive) external onlyOwner { } function updateGiveAmount(uint amount) external onlyOwner { require(<FILL_ME>) giveAmount = amount; } function transferAnyERC20Token(address tokenAddress, uint tokens) external onlyOwner returns (bool success) { } function acceptOwnership() public override { } }
_unfrozenBalances[owner]>amount,"NBU::updateGiveAmount: exceed owner balance"
1,580
_unfrozenBalances[owner]>amount
"TOKEN: Your account is blacklisted!"
//Website - https://twitter.com/Dogindereth //Twitter - // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; 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 ); } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } 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) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Doginder is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Doginder"; string private constant _symbol = "DOGINDER"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 2000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); address payable private _marketingAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 20 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } 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()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(<FILL_ME>) if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) 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) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
!bots[from]&&!bots[to],"TOKEN: Your account is blacklisted!"
1,619
!bots[from]&&!bots[to]
"TOKEN: Balance exceeds wallet size!"
//Website - https://twitter.com/Dogindereth //Twitter - // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; 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 ); } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } 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) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Doginder is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Doginder"; string private constant _symbol = "DOGINDER"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 2000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); address payable private _marketingAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 20 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } 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()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(<FILL_ME>) } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) 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) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
balanceOf(to)+amount<_maxWalletSize,"TOKEN: Balance exceeds wallet size!"
1,619
balanceOf(to)+amount<_maxWalletSize
null
//Website - https://twitter.com/Dogindereth //Twitter - // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; 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 ); } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } 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) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Doginder is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Doginder"; string private constant _symbol = "DOGINDER"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 2000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); address payable private _marketingAddress = payable(0xa4854b75a7e43b2Ed55CA10AF4631435cfd4AbcB); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 20 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) 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) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
_msgSender()==_developmentAddress||_msgSender()==_marketingAddress
1,619
_msgSender()==_developmentAddress||_msgSender()==_marketingAddress
"JPEG: must have minter role to mint"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; /** * JPEG - governance token */ contract JPEG is ERC20Votes, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor(uint256 totalSupply) ERC20("JPEG\xE2\x80\x99d Governance Token", "JPEG") ERC20Permit("JPEG") { } function mint(address to, uint256 amount) external { require(<FILL_ME>) _mint(to, amount); } }
hasRole(MINTER_ROLE,_msgSender()),"JPEG: must have minter role to mint"
1,655
hasRole(MINTER_ROLE,_msgSender())
null
pragma solidity ^0.5.4; contract NiftyWallet { /** * The Nifty Wallet - the niftiest wallet around! * Author - Duncan Cock Foster. duncan@niftygateway.com */ /** * Constants * The address of the master contract, and the account ID for this wallet * Account ID is used to retrieve the signing private key for this wallet */ address masterContractAdd = 0x4CADB4bAd0e2a49CC5D6CE26D8628C8f451dA346; uint userAccountID = 0; uint walletTxCount = 0; /** / Events */ event Execution(address indexed destinationAddress, uint value, bytes txData); event ExecutionFailure(address indexed destinationAddress, uint value, bytes txData); event Deposit(address indexed sender, uint value); /** * @dev returns signing private key that controls this wallet */ function returnUserAccountAddress() public view returns(address) { } function returnWalletTxCount() public view returns(uint) { } /** * Modifier to check msg.sender */ modifier onlyValidSender() { MasterContract m_c_instance = MasterContract(masterContractAdd); require(<FILL_ME>) _; } /** * Fall back function - get paid and static calls */ function() payable external { } /** * @dev function to call any on chain transaction * @dev verifies that the transaction data has been signed by the wallets controlling private key * @dev and that the transaction has been sent from an approved sending wallet * @param _signedData bytes - signature of txData + wallet address * @param destination address - destination for this transaction * @param value uint - value of this transaction * @param data bytes - transaction data */ function callTx(bytes memory _signedData, address destination, uint value, bytes memory data) public onlyValidSender returns (bool) { } /** External call function * Taken from Gnosis Mutli Sig wallet * https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol */ // call has been separated into its own function in order to take advantage // of the Solidity's code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes memory data) private returns (bool) { } } contract MasterContract { function returnUserControlAddress(uint account_id) public view returns (address); function returnIsValidSendingKey(address sending_key) public view returns (bool); function returnStaticContractAddress() public view returns (address); function recover(bytes32 hash, bytes memory sig) public pure returns (address); function returnTxMessageToSign(bytes memory txData, address des_add, uint value, uint tx_count) public view returns(bytes32); }
m_c_instance.returnIsValidSendingKey(msg.sender)==true
1,658
m_c_instance.returnIsValidSendingKey(msg.sender)==true
null
pragma solidity ^0.4.13; /** * This is the official SHS Token smart contract (SHS) - https://SHS.io/ */ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint256 balance) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require(<FILL_ME>) allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @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) constant 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) returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { } } /** * @title SHSToken */ contract SHSToken is StandardToken { string public constant name = "QiJiaoBei"; string public constant symbol = "SHS"; uint8 public constant decimals = 18; // only two deciminals, token cannot be divided past 1/100th uint256 public constant INITIAL_SUPPLY = 10000000000000000000000000000; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function SHSToken() { } }
(_value==0)||(allowed[msg.sender][_spender]==0)
1,692
(_value==0)||(allowed[msg.sender][_spender]==0)
null
pragma solidity ^0.8.4; // SPDX-License-Identifier: UNLICENSED 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 EternatusInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "EternatusInu"; string private constant _symbol = "EternatusInu"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { 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"); _feeAddr1 = 1; _feeAddr2 = 1; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(<FILL_ME>) cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _feeAddr2 = 1; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
cooldown[to]<block.timestamp
1,738
cooldown[to]<block.timestamp
null
pragma solidity ^0.8.4; // SPDX-License-Identifier: UNLICENSED 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 EternatusInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "EternatusInu"; string private constant _symbol = "EternatusInu"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
_msgSender()==_feeAddrWallet1
1,738
_msgSender()==_feeAddrWallet1
"Ownable: caller is not the owner"
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { require(<FILL_ME>) _; } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { } function mintDrop(uint _dropId) external hasEmpire(){ } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
owner()==_msgSender(),"Ownable: caller is not the owner"
1,786
owner()==_msgSender()
"Only one empire per wallet."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { require(<FILL_ME>) require(ethereanContract.balanceOf(msg.sender) >= ETHEREAN_MIN, "Did not meet minimum ethereans requirement."); empires[msg.sender] = Empire(_name, _motto, true); empireAddresses.push(msg.sender); emit EmpireCreated(msg.sender, _name, _motto); } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { } function mintDrop(uint _dropId) external hasEmpire(){ } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
empires[msg.sender].exists==false,"Only one empire per wallet."
1,786
empires[msg.sender].exists==false
"Did not meet minimum ethereans requirement."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { require(empires[msg.sender].exists == false, "Only one empire per wallet."); require(<FILL_ME>) empires[msg.sender] = Empire(_name, _motto, true); empireAddresses.push(msg.sender); emit EmpireCreated(msg.sender, _name, _motto); } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { } function mintDrop(uint _dropId) external hasEmpire(){ } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
ethereanContract.balanceOf(msg.sender)>=ETHEREAN_MIN,"Did not meet minimum ethereans requirement."
1,786
ethereanContract.balanceOf(msg.sender)>=ETHEREAN_MIN
"Does not own empire."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { require(<FILL_ME>) _; } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { } function mintDrop(uint _dropId) external hasEmpire(){ } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
empires[msg.sender].exists==true,"Does not own empire."
1,786
empires[msg.sender].exists==true
"Etherean does not belong to you."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { uint ethereanBalance = ethereanContract.balanceOf(msg.sender); require(ethereanBalance >= ETHEREAN_MIN, "Did not meet minimum ethereans requirement to claim rewards."); uint currentTime = min(block.timestamp, END_REWARDS); uint totalElapsedTime; for (uint i=0; i<_tokenIds.length; i++) { uint tokenId = _tokenIds[i]; uint lastUpdated = tokenToLastUpdated[tokenId]; require(<FILL_ME>) if (lastUpdated == 0) { tokenToLastUpdated[tokenId] = currentTime; } else if (lastUpdated > 0) { totalElapsedTime += currentTime.sub(lastUpdated); tokenToLastUpdated[tokenId] = currentTime; } } if (totalElapsedTime > 0) { uint multiplier = getMultiplier(ethereanBalance); uint rewardAmount = totalElapsedTime.mul(multiplier).mul(10**18).div(86400); invaderContract.claimReward(msg.sender, rewardAmount); emit RewardClaimed(msg.sender, rewardAmount); } } function mintDrop(uint _dropId) external hasEmpire(){ } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
ethereanContract.ownerOf(tokenId)==msg.sender,"Etherean does not belong to you."
1,786
ethereanContract.ownerOf(tokenId)==msg.sender
"Only one drop allowed per empire."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface EthereansInterface { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); } interface InvaderTokenInterface { function claimReward(address owner, uint amount) external; function burnFrom(address from, uint amount) external; } interface EmpireDropsInterface { function mint(address from, uint tokenId) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract EthereanEmpire is Ownable { using SafeMath for uint256; event EmpireCreated(address owner, string name, string motto); event EmpireCustomized(address owner, string newName, string newMotto); event RewardClaimed(address claimer, uint amount); event DropCreated(uint tokenId, string title, string description, string artist, uint cost, uint supply, uint end); event DropMinted(address minter, uint dropId); struct Empire { string name; string motto; bool exists; } struct Drop { uint tokenId; string title; string description; string artist; uint cost; uint supply; uint end; bool exists; uint minted; } uint public ETHEREAN_MIN = 3; uint public EMPIRE_EDIT_FEE = 200 ether; uint public numDrops = 0; address public ETHEREANS_CONTRACT_ADDRESS; address public INVADER_CONTRACT_ADDRESS; address public EMPIRE_DROPS_CONTRACT_ADDRESS; uint constant public END_REWARDS = 1735693200; EthereansInterface private ethereanContract; InvaderTokenInterface private invaderContract; EmpireDropsInterface private empireDropsContract; mapping(address => Empire) public empires; address[] private empireAddresses; mapping(uint => uint) public tokenToLastUpdated; mapping(uint => Drop) public drops; mapping(address => mapping(uint => bool)) public addressOwnsDrop; constructor(address _ethereansAddress, address _invaderAddress) { } function setEthereansContractAddress(address _contractAddress) external onlyOwner() { } function setEmpireDropsContractAddress(address _contractAddress) external onlyOwner() { } function newEmpire(string memory _name, string memory _motto) public { } function newDrop(uint _tokenId, string memory _title, string memory _description, string memory _artist, uint _cost, uint _supply, uint _end) external onlyOwner() { } function getEmpireAddresses() public view returns (address[] memory) { } function setEmpireEditFee(uint _newFee) external onlyOwner(){ } modifier hasEmpire { } function customizeEmpire(string memory _newName, string memory _newMotto) external hasEmpire(){ } function claimReward(uint[] memory _tokenIds) external hasEmpire() { } function mintDrop(uint _dropId) external hasEmpire(){ Drop storage drop = drops[_dropId]; require(drop.exists == true, "Drop does not exist."); require(block.timestamp < drop.end, "Drop has expired."); require(drop.minted < drop.supply, "Drop is sold out."); require(<FILL_ME>) uint ethereanBalance = ethereanContract.balanceOf(msg.sender); require(ethereanBalance >= ETHEREAN_MIN, "Did not meet minimum ethereans requirement to mint drop."); if (drop.cost > 0) { invaderContract.burnFrom(msg.sender, drop.cost); } empireDropsContract.mint(msg.sender, drop.tokenId); drop.minted += 1; addressOwnsDrop[msg.sender][_dropId] = true; emit DropMinted(msg.sender, _dropId); } function min(uint a, uint b) internal pure returns (uint) { } function getMultiplier(uint ethereanBalance) internal pure returns (uint) { } function withdraw() public onlyOwner() { } function recoverERC20(address _tokenAddress, uint _tokenAmount) public onlyOwner() { } function recoverERC721(address _tokenAddress, uint _tokenId) public onlyOwner() { } }
addressOwnsDrop[msg.sender][_dropId]==false,"Only one drop allowed per empire."
1,786
addressOwnsDrop[msg.sender][_dropId]==false
"ERC20: transfer amount exceeds balance"
contract CustomERC20 is InitializableOwnable { using SafeMath for uint256; string public name; uint8 public decimals; string public symbol; uint256 public totalSupply; uint256 public tradeBurnRatio; uint256 public tradeFeeRatio; address public team; bool public isMintable; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) internal allowed; event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); event Mint(address indexed user, uint256 value); event Burn(address indexed user, uint256 value); event ChangeTeam(address oldTeam, address newTeam); function init( address _creator, uint256 _initSupply, string memory _name, string memory _symbol, uint8 _decimals, uint256 _tradeBurnRatio, uint256 _tradeFeeRatio, address _team, bool _isMintable ) public { } function transfer(address to, uint256 amount) public returns (bool) { } function balanceOf(address owner) public view returns (uint256 balance) { } function transferFrom( address from, address to, uint256 amount ) public returns (bool) { } function approve(address spender, uint256 amount) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) balances[sender] = balances[sender].sub(amount); uint256 burnAmount; uint256 feeAmount; if(tradeBurnRatio > 0) { burnAmount = amount.mul(tradeBurnRatio).div(10000); balances[address(0)] = balances[address(0)].add(burnAmount); } if(tradeFeeRatio > 0) { feeAmount = amount.mul(tradeFeeRatio).div(10000); balances[team] = balances[team].add(feeAmount); } balances[recipient] = balances[recipient].add(amount.sub(burnAmount).sub(feeAmount)); emit Transfer(sender, recipient, amount); } function burn(uint256 value) external { } //=================== Ownable ====================== function mint(address user, uint256 value) external onlyOwner { } function changeTeamAccount(address newTeam) external onlyOwner { } }
balances[sender]>=amount,"ERC20: transfer amount exceeds balance"
1,801
balances[sender]>=amount
"VALUE_NOT_ENOUGH"
contract CustomERC20 is InitializableOwnable { using SafeMath for uint256; string public name; uint8 public decimals; string public symbol; uint256 public totalSupply; uint256 public tradeBurnRatio; uint256 public tradeFeeRatio; address public team; bool public isMintable; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) internal allowed; event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); event Mint(address indexed user, uint256 value); event Burn(address indexed user, uint256 value); event ChangeTeam(address oldTeam, address newTeam); function init( address _creator, uint256 _initSupply, string memory _name, string memory _symbol, uint8 _decimals, uint256 _tradeBurnRatio, uint256 _tradeFeeRatio, address _team, bool _isMintable ) public { } function transfer(address to, uint256 amount) public returns (bool) { } function balanceOf(address owner) public view returns (uint256 balance) { } function transferFrom( address from, address to, uint256 amount ) public returns (bool) { } function approve(address spender, uint256 amount) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function burn(uint256 value) external { require(isMintable, "NOT_MINTABEL_TOKEN"); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].sub(value); totalSupply = totalSupply.sub(value); emit Burn(msg.sender, value); emit Transfer(msg.sender, address(0), value); } //=================== Ownable ====================== function mint(address user, uint256 value) external onlyOwner { } function changeTeamAccount(address newTeam) external onlyOwner { } }
balances[msg.sender]>=value,"VALUE_NOT_ENOUGH"
1,801
balances[msg.sender]>=value
null
pragma solidity ^0.4.17; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant public returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } interface Version { function blockVersion() constant public returns (string version); } contract StandardToken is Token { function transfer(address _to, uint256 _value) public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function balanceOf(address _owner) constant public returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; } contract SimpleToken is StandardToken,Ownable{ using SafeMath for uint; function () public { } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ string public name; //fancy name: eg Simon Bucks uint8 public decimals; //How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ether. string public symbol; //An identifier: eg SBX string public version = 'simpleToken'; //human 0.1 standard. Just an arbitrary versioning scheme. bool public allowBack; bool public allowIssua; function SimpleToken( uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, bool _allowBack, bool _allowIssua ) public { } function back(address _ads,uint256 _value) public onlyOwner returns (bool success) { require(allowBack); require(<FILL_ME>) balances[_ads] -= _value; balances[msg.sender] += _value; Transfer(_ads, msg.sender, _value); return true; } function issua(uint256 _value) public onlyOwner returns (bool success) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } }
balances[_ads]>=_value&&_value>0
1,804
balances[_ads]>=_value&&_value>0
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20 { uint256 public totalSupply; bool public transfersEnabled; function balanceOf(address _owner) public constant returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract ERC223Basic { uint256 public totalSupply; bool public transfersEnabled; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transfer(address to, uint256 value, bytes data) public; event Transfer(address indexed from, address indexed to, uint256 value, bytes data); } contract ERC223ReceivingContract { /** * @dev Standard ERC223 function that will handle incoming token transfers. * * @param _from Token sender address. * @param _value Amount of tokens. * @param _data Transaction metadata. */ function tokenFallback(address _from, uint _value, bytes _data) public; } contract ERC223Token is ERC20, ERC223Basic { using SafeMath for uint256; mapping(address => uint256) balances; // List of user balances. /** * @dev protection against short address attack */ modifier onlyPayloadSize(uint numwords) { } /** * @dev Transfer the specified amount of tokens to the specified address. * Invokes the `tokenFallback` function if the recipient is a contract. * The token transfer fails if the recipient is a contract * but does not implement the `tokenFallback` function * or the fallback function to receive funds. * * @param _to Receiver address. * @param _value Amount of tokens that will be transferred. * @param _data Transaction metadata. */ function transfer(address _to, uint _value, bytes _data) public onlyPayloadSize(3) { } /** * @dev Transfer the specified amount of tokens to the specified address. * This function works the same with the previous one * but doesn't contain `_data` param. * Added due to backwards compatibility reasons. * * @param _to Receiver address. * @param _value Amount of tokens that will be transferred. */ function transfer(address _to, uint _value) public onlyPayloadSize(2) returns(bool) { } /** * @dev Returns balance of the `_owner`. * * @param _owner The address whose balance will be returned. * @return balance Balance of the `_owner`. */ function balanceOf(address _owner) public constant returns (uint256 balance) { } } contract StandardToken is ERC223Token { 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 onlyPayloadSize(3) returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public onlyPayloadSize(2) constant 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) { } } contract TRIPLER is StandardToken { string public constant name = "TRIPLER"; string public constant symbol = "TPR"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 2000000000000000000000000000; address public owner; mapping (address => bool) public contractUsers; bool public mintingFinished; uint256 public tokenAllocated = 0; // list of valid claim` mapping (address => uint) public countClaimsToken; uint256 public priceToken = 950000; uint256 public priceClaim = 0.0005 ether; uint256 public numberClaimToken = 500 * (10**uint256(decimals)); uint256 public startTimeDay = 1; uint256 public endTimeDay = 86400; event OwnerChanged(address indexed previousOwner, address indexed newOwner); event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount); event TokenLimitReached(uint256 tokenRaised, uint256 purchasedToken); event MinWeiLimitReached(address indexed sender, uint256 weiAmount); event Mint(address indexed to, uint256 amount); event MintFinished(); constructor(address _owner) public { } // fallback function can be used to buy tokens function() payable public { } function buyTokens(address _investor) public payable returns (uint256){ } function validPurchaseTokens(uint256 _weiAmount) public returns (uint256) { } modifier onlyOwner() { } modifier canMint() { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { } function changeOwner(address _newOwner) onlyOwner public returns (bool){ } function enableTransfers(bool _transfersEnabled) onlyOwner public { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount, address _owner) canMint internal returns (bool) { } function claim() canMint public payable returns (bool) { uint256 currentTime = now; //currentTime = 1540037100; //for test's require(<FILL_ME>) require(msg.value >= priceClaim); address beneficiar = msg.sender; require(beneficiar != address(0)); require(!mintingFinished); uint256 amount = calcAmount(beneficiar); require(amount <= balances[owner]); balances[beneficiar] = balances[beneficiar].add(amount); balances[owner] = balances[owner].sub(amount); tokenAllocated = tokenAllocated.add(amount); owner.transfer(msg.value); emit Mint(beneficiar, amount); emit Transfer(owner, beneficiar, amount); return true; } //function calcAmount(address _beneficiar) canMint public returns (uint256 amount) { //for test's function calcAmount(address _beneficiar) canMint internal returns (uint256 amount) { } function validPurchaseTime(uint256 _currentTime) canMint public view returns (bool) { } function changeTime(uint256 _newStartTimeDay, uint256 _newEndTimeDay) public { } /** * Peterson's Law Protection * Claim tokens */ function claimTokensToOwner(address _token) public onlyOwner { } function setPriceClaim(uint256 _newPriceClaim) external onlyOwner { } function setNumberClaimToken(uint256 _newNumClaimToken) external onlyOwner { } }
validPurchaseTime(currentTime)
1,807
validPurchaseTime(currentTime)
"Not governance"
pragma solidity >=0.5.16; import "./Storage.sol"; contract Governable { Storage public store; constructor(address _store) public { } modifier onlyGovernance() { require(<FILL_ME>) _; } function setStorage(address _store) public onlyGovernance { } function governance() public view returns (address) { } }
store.isGovernance(msg.sender),"Not governance"
1,846
store.isGovernance(msg.sender)
"ERC721Pausable: token transfer while paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721.sol"; import "./Pausable.sol"; import "./Ownable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Ownable, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ event AddToWhiteList(address _address); event RemovedFromWhiteList(address _address); event WhiteListMultipleAddress(address[] accounts); event RemoveWhiteListedMultipleAddress(address[] accounts); mapping (address => bool) public isWhiteListed; function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (_msgSender() != owner() && !isWhiteListed[_msgSender()]) { require(<FILL_ME>) } } function whiteListAddress(address _address) public onlyOwner{ } function removeWhiteListedAddress (address _address) public onlyOwner{ } function whiteListMultipleAddress(address[] calldata accounts) public onlyOwner { } function removeWhiteListedMultipleAddress(address[] calldata accounts) public onlyOwner { } }
!paused(),"ERC721Pausable: token transfer while paused"
1,850
!paused()
null
pragma solidity ^0.4.18; contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public start; uint256 public period; uint256 public periodDuration; bool public revocable; mapping (address => uint256) public released; mapping (address => bool) public revoked; /** * @dev Creates a vesting contract that vests its balance of any ERC20 token to the * _beneficiary, gradually in a linear fashion until _start + _duration. By then all * of the balance will have vested. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _revocable whether the vesting is revocable or not */ function TokenVesting(address _beneficiary, uint256 _start, uint256 _period, uint256 _periodDuration, bool _revocable) public { } /** * @notice Transfers vested tokens to beneficiary. * @param token ERC20 token which is being vested */ function release(ERC20Basic token) public { } /** * @notice Allows the owner to revoke the vesting. Tokens already vested * remain in the contract, the rest are returned to the owner. * @param token ERC20 token which is being vested */ function revoke(ERC20Basic token) public onlyOwner { require(revocable); require(<FILL_ME>) uint256 balance = token.balanceOf(this); uint256 unreleased = releasableAmount(token); uint256 refund = balance.sub(unreleased); token.safeTransfer(owner, refund); Revoked(); } /** * @dev Calculates the amount that has already vested but hasn't been released yet. * @param token ERC20 token which is being vested */ function releasableAmount(ERC20Basic token) public view returns (uint256) { } /** * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */ function vestedAmount(ERC20Basic token) public view returns (uint256) { } } 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) { } } library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { } function safeApprove(ERC20 token, address spender, uint256 value) internal { } } 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); } 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); }
!revoked[token]
1,867
!revoked[token]
"transfer is not complete"
pragma solidity ^0.6.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } /* * Robonomics DAO BigBag sale. * (c) Robonomics Team <research@robonomics.network> * * SPDX-License-Identifier: MIT */ pragma solidity 0.6.12; contract BigBag { using SafeERC20 for IERC20; address payable dao = 0x28A3D3467A3198D1bb5311836036D53c3C64b999; address public dao_agent = 0x8c3ad3580A8635e236ccE26D2851AAf10401E262; IERC20 public xrt = IERC20(0x7dE91B204C1C737bcEe6F000AAA6569Cf7061cb7); uint256 public amount_wei = 200 ether; uint256 public amount_wn = 6034274680183; function buy() payable external { require(msg.value == amount_wei, "transaction value does not match"); xrt.safeTransferFrom(dao_agent, msg.sender, amount_wn); dao.call{gas: 50000, value: msg.value}(""); require(<FILL_ME>) } }
address(this).balance==0,"transfer is not complete"
1,897
address(this).balance==0
"must be minter"
/* Copyright 2021 Project Galaxy. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.7.6; //import "SafeMath.sol"; //import "Address.sol"; import "ERC1155.sol"; import "Ownable.sol"; import "IStarNFT.sol"; /** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFTV1 is ERC1155, IStarNFT, Ownable { using SafeMath for uint256; // using Address for address; // using ERC165Checker for address; /* ============ Events ============ */ event EventMinterAdded(address indexed newMinter); event EventMinterRemoved(address indexed oldMinter); /* ============ Modifiers ============ */ /** * Only minter. */ modifier onlyMinter() { require(<FILL_ME>) _; } /* ============ Enums ================ */ /* ============ Structs ============ */ /* ============ State Variables ============ */ // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string public baseURI; // Mint and burn star. mapping(address => bool) public minters; // Total star count, including burnt nft uint256 public starCount; /* ============ Constructor ============ */ constructor () ERC1155("") {} /* ============ External Functions ============ */ function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } function getNumMinted() external view override returns (uint256) { } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
minters[msg.sender],"must be minter"
1,927
minters[msg.sender]
"ERC1155: caller is not approved"
/* Copyright 2021 Project Galaxy. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.7.6; //import "SafeMath.sol"; //import "Address.sol"; import "ERC1155.sol"; import "Ownable.sol"; import "IStarNFT.sol"; /** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFTV1 is ERC1155, IStarNFT, Ownable { using SafeMath for uint256; // using Address for address; // using ERC165Checker for address; /* ============ Events ============ */ event EventMinterAdded(address indexed newMinter); event EventMinterRemoved(address indexed oldMinter); /* ============ Modifiers ============ */ /** * Only minter. */ modifier onlyMinter() { } /* ============ Enums ================ */ /* ============ Structs ============ */ /* ============ State Variables ============ */ // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string public baseURI; // Mint and burn star. mapping(address => bool) public minters; // Total star count, including burnt nft uint256 public starCount; /* ============ Constructor ============ */ constructor () ERC1155("") {} /* ============ External Functions ============ */ function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { require(<FILL_ME>) _burn(account, id, 1); } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } function getNumMinted() external view override returns (uint256) { } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
isApprovedForAll(account,_msgSender()),"ERC1155: caller is not approved"
1,927
isApprovedForAll(account,_msgSender())
"Minter already added"
/* Copyright 2021 Project Galaxy. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.7.6; //import "SafeMath.sol"; //import "Address.sol"; import "ERC1155.sol"; import "Ownable.sol"; import "IStarNFT.sol"; /** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFTV1 is ERC1155, IStarNFT, Ownable { using SafeMath for uint256; // using Address for address; // using ERC165Checker for address; /* ============ Events ============ */ event EventMinterAdded(address indexed newMinter); event EventMinterRemoved(address indexed oldMinter); /* ============ Modifiers ============ */ /** * Only minter. */ modifier onlyMinter() { } /* ============ Enums ================ */ /* ============ Structs ============ */ /* ============ State Variables ============ */ // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string public baseURI; // Mint and burn star. mapping(address => bool) public minters; // Total star count, including burnt nft uint256 public starCount; /* ============ Constructor ============ */ constructor () ERC1155("") {} /* ============ External Functions ============ */ function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { require(minter != address(0), "Minter must not be null address"); require(<FILL_ME>) minters[minter] = true; emit EventMinterAdded(minter); } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } function getNumMinted() external view override returns (uint256) { } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
!minters[minter],"Minter already added"
1,927
!minters[minter]
"Minter does not exist"
/* Copyright 2021 Project Galaxy. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.7.6; //import "SafeMath.sol"; //import "Address.sol"; import "ERC1155.sol"; import "Ownable.sol"; import "IStarNFT.sol"; /** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFTV1 is ERC1155, IStarNFT, Ownable { using SafeMath for uint256; // using Address for address; // using ERC165Checker for address; /* ============ Events ============ */ event EventMinterAdded(address indexed newMinter); event EventMinterRemoved(address indexed oldMinter); /* ============ Modifiers ============ */ /** * Only minter. */ modifier onlyMinter() { } /* ============ Enums ================ */ /* ============ Structs ============ */ /* ============ State Variables ============ */ // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string public baseURI; // Mint and burn star. mapping(address => bool) public minters; // Total star count, including burnt nft uint256 public starCount; /* ============ Constructor ============ */ constructor () ERC1155("") {} /* ============ External Functions ============ */ function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { require(<FILL_ME>) delete minters[minter]; emit EventMinterRemoved(minter); } /* ============ External Getter Functions ============ */ /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } function getNumMinted() external view override returns (uint256) { } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
minters[minter],"Minter does not exist"
1,927
minters[minter]
"mint error"
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.2.2 * ********************* */ contract Strategy is BaseStrategy, DydxFlashloanBase, ICallee { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; // @notice emitted when trying to do Flash Loan. flashLoan address is 0x00 when no flash loan used event Leverage(uint256 amountRequested, uint256 amountGiven, bool deficit, address flashLoan); //Flash Loan Providers address private constant SOLO = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e; // Comptroller address for compound.finance ComptrollerI public constant compound = ComptrollerI(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); //Only three tokens we use address public constant comp = address(0xc00e94Cb662C3520282E6f5717214004A7f26888); CErc20I public cToken; //address public constant DAI = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); address public constant uniswapRouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); //Operating variables uint256 public collateralTarget = 0.73 ether; // 73% uint256 public blocksToLiquidationDangerZone = 46500; // 7 days = 60*60*24*7/13 uint256 public minWant = 0; //Only lend if we have enough want to be worth it. Can be set to non-zero uint256 public minCompToSell = 0.1 ether; //used both as the threshold to sell but also as a trigger for harvest //To deactivate flash loan provider if needed bool public DyDxActive = true; bool public forceMigrate = false; uint256 public dyDxMarketId; constructor(address _vault, address _cToken) public BaseStrategy(_vault) { } function name() external override view returns (string memory){ } /* * Control Functions */ function setDyDx(bool _dydx) external management { } function setForceMigrate(bool _force) external onlyGovernance { } function setMinCompToSell(uint256 _minCompToSell) external management { } function setMinWant(uint256 _minWant) external management { } function updateMarketId() external management { } function setCollateralTarget(uint256 _collateralTarget) external management { } /* * Base External Facing Functions */ /* * An accurate estimate for the total amount of assets (principle + return) * that this strategy is currently managing, denominated in terms of want tokens. */ function estimatedTotalAssets() public override view returns (uint256) { } //predicts our profit at next report function expectedReturn() public view returns (uint256) { } /* * Provide a signal to the keeper that `tend()` should be called. * (keepers are always reimbursed by yEarn) * * NOTE: this call and `harvestTrigger` should never return `true` at the same time. * tendTrigger should be called with same gasCost as harvestTrigger */ function tendTrigger(uint256 gasCost) public override view returns (bool) { } /* * Provide a signal to the keeper that `harvest()` should be called. * gasCost is expected_gas_use * gas_price * (keepers are always reimbursed by yEarn) * * NOTE: this call and `tendTrigger` should never return `true` at the same time. */ function harvestTrigger(uint256 gasCost) public override view returns (bool) { } //WARNING. manipulatable and simple routing. Only use for safe functions function priceCheck(address start, address end, uint256 _amount) public view returns (uint256) { } /***************** * Public non-base function ******************/ //Calculate how many blocks until we are in liquidation based on current interest rates //WARNING does not include compounding so the estimate becomes more innacurate the further ahead we look //equation. Compound doesn't include compounding for most blocks //((deposits*colateralThreshold - borrows) / (borrows*borrowrate - deposits*colateralThreshold*interestrate)); function getblocksUntilLiquidation() public view returns (uint256) { } // This function makes a prediction on how much comp is accrued // It is not 100% accurate as it uses current balances in Compound to predict into the past function predictCompAccrued() public view returns (uint256) { } //Returns the current position //WARNING - this returns just the balance at last time someone touched the cToken token. Does not accrue interst in between //cToken is very active so not normally an issue. function getCurrentPosition() public view returns (uint256 deposits, uint256 borrows) { } //statechanging version function getLivePosition() public returns (uint256 deposits, uint256 borrows) { } //Same warning as above function netBalanceLent() public view returns (uint256) { } /*********** * internal core logic *********** */ /* * A core method. * Called at beggining of harvest before providing report to owner * 1 - claim accrued comp * 2 - if enough to be worth it we sell * 3 - because we lose money on our loans we need to offset profit from comp. */ function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment ) { } /* * Second core function. Happens after report call. * * Similar to deposit function from V1 strategy */ function adjustPosition(uint256 _debtOutstanding) internal override { } /************* * Very important function * Input: amount we want to withdraw and whether we are happy to pay extra for Aave. * cannot be more than we have * Returns amount we were able to withdraw. notall if user has some balance left * * Deleverage position -> redeem our cTokens ******************** */ function _withdrawSome(uint256 _amount) internal returns (bool notAll) { } /*********** * This is the main logic for calculating how to change our lends and borrows * Input: balance. The net amount we are going to deposit/withdraw. * Input: dep. Is it a deposit or withdrawal * Output: position. The amount we want to change our current borrow position. * Output: deficit. True if we are reducing position size * * For instance deficit =false, position 100 means increase borrowed balance by 100 ****** */ function _calculateDesiredPosition(uint256 balance, bool dep) internal returns (uint256 position, bool deficit) { } /* * Liquidate as many assets as possible to `want`, irregardless of slippage, * up to `_amount`. Any excess should be re-invested here as well. */ function liquidatePosition(uint256 _amountNeeded) internal override returns (uint256 _amountFreed, uint256 _loss) { } function _claimComp() internal { } //sell comp function function _disposeOfComp() internal { } //lets leave //if we can't deleverage in one go set collateralFactor to 0 and call harvest multiple times until delevered function prepareMigration(address _newStrategy) internal override { } //Three functions covering normal leverage and deleverage situations // max is the max amount we want to increase our borrowed balance // returns the amount we actually did function _noFlashLoan(uint256 max, bool deficit) internal returns (uint256 amount) { } //maxDeleverage is how much we want to reduce by function _normalDeleverage( uint256 maxDeleverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 deleveragedAmount) { } //maxDeleverage is how much we want to increase by function _normalLeverage( uint256 maxLeverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 leveragedAmount) { } //called by flash loan function _loanLogic( bool deficit, uint256 amount, uint256 repayAmount ) internal { uint256 bal = want.balanceOf(address(this)); require(bal >= amount, "FLASH_FAILED"); // to stop malicious calls //if in deficit we repay amount and then withdraw if (deficit) { cToken.repayBorrow(amount); //if we are withdrawing we take more to cover fee cToken.redeemUnderlying(repayAmount); } else { //check if this failed incase we borrow into liquidation require(<FILL_ME>) //borrow more to cover fee // fee is so low for dydx that it does not effect our liquidation risk. //DONT USE FOR AAVE cToken.borrow(repayAmount); } } //emergency function that we can use to deleverage manually if something is broken function manualDeleverage(uint256 amount) external management{ } //emergency function that we can use to deleverage manually if something is broken function manualReleaseWant(uint256 amount) external onlyGovernance{ } function protectedTokens() internal override view returns (address[] memory) { } /****************** * Flash loan stuff ****************/ // Flash loan DXDY // amount desired is how much we are willing for position to change function doDyDxFlashLoan(bool deficit, uint256 amountDesired) internal returns (uint256) { } //returns our current collateralisation ratio. Should be compared with collateralTarget function storedCollateralisation() public view returns (uint256 collat) { } //DyDx calls this function after doing flash loan function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { } // -- Internal Helper functions -- // function _setMarketIdFromTokenAddress() internal { } modifier management(){ } }
cToken.mint(bal)==0,"mint error"
1,969
cToken.mint(bal)==0
"failed redeem"
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.2.2 * ********************* */ contract Strategy is BaseStrategy, DydxFlashloanBase, ICallee { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; // @notice emitted when trying to do Flash Loan. flashLoan address is 0x00 when no flash loan used event Leverage(uint256 amountRequested, uint256 amountGiven, bool deficit, address flashLoan); //Flash Loan Providers address private constant SOLO = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e; // Comptroller address for compound.finance ComptrollerI public constant compound = ComptrollerI(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); //Only three tokens we use address public constant comp = address(0xc00e94Cb662C3520282E6f5717214004A7f26888); CErc20I public cToken; //address public constant DAI = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); address public constant uniswapRouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); //Operating variables uint256 public collateralTarget = 0.73 ether; // 73% uint256 public blocksToLiquidationDangerZone = 46500; // 7 days = 60*60*24*7/13 uint256 public minWant = 0; //Only lend if we have enough want to be worth it. Can be set to non-zero uint256 public minCompToSell = 0.1 ether; //used both as the threshold to sell but also as a trigger for harvest //To deactivate flash loan provider if needed bool public DyDxActive = true; bool public forceMigrate = false; uint256 public dyDxMarketId; constructor(address _vault, address _cToken) public BaseStrategy(_vault) { } function name() external override view returns (string memory){ } /* * Control Functions */ function setDyDx(bool _dydx) external management { } function setForceMigrate(bool _force) external onlyGovernance { } function setMinCompToSell(uint256 _minCompToSell) external management { } function setMinWant(uint256 _minWant) external management { } function updateMarketId() external management { } function setCollateralTarget(uint256 _collateralTarget) external management { } /* * Base External Facing Functions */ /* * An accurate estimate for the total amount of assets (principle + return) * that this strategy is currently managing, denominated in terms of want tokens. */ function estimatedTotalAssets() public override view returns (uint256) { } //predicts our profit at next report function expectedReturn() public view returns (uint256) { } /* * Provide a signal to the keeper that `tend()` should be called. * (keepers are always reimbursed by yEarn) * * NOTE: this call and `harvestTrigger` should never return `true` at the same time. * tendTrigger should be called with same gasCost as harvestTrigger */ function tendTrigger(uint256 gasCost) public override view returns (bool) { } /* * Provide a signal to the keeper that `harvest()` should be called. * gasCost is expected_gas_use * gas_price * (keepers are always reimbursed by yEarn) * * NOTE: this call and `tendTrigger` should never return `true` at the same time. */ function harvestTrigger(uint256 gasCost) public override view returns (bool) { } //WARNING. manipulatable and simple routing. Only use for safe functions function priceCheck(address start, address end, uint256 _amount) public view returns (uint256) { } /***************** * Public non-base function ******************/ //Calculate how many blocks until we are in liquidation based on current interest rates //WARNING does not include compounding so the estimate becomes more innacurate the further ahead we look //equation. Compound doesn't include compounding for most blocks //((deposits*colateralThreshold - borrows) / (borrows*borrowrate - deposits*colateralThreshold*interestrate)); function getblocksUntilLiquidation() public view returns (uint256) { } // This function makes a prediction on how much comp is accrued // It is not 100% accurate as it uses current balances in Compound to predict into the past function predictCompAccrued() public view returns (uint256) { } //Returns the current position //WARNING - this returns just the balance at last time someone touched the cToken token. Does not accrue interst in between //cToken is very active so not normally an issue. function getCurrentPosition() public view returns (uint256 deposits, uint256 borrows) { } //statechanging version function getLivePosition() public returns (uint256 deposits, uint256 borrows) { } //Same warning as above function netBalanceLent() public view returns (uint256) { } /*********** * internal core logic *********** */ /* * A core method. * Called at beggining of harvest before providing report to owner * 1 - claim accrued comp * 2 - if enough to be worth it we sell * 3 - because we lose money on our loans we need to offset profit from comp. */ function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment ) { } /* * Second core function. Happens after report call. * * Similar to deposit function from V1 strategy */ function adjustPosition(uint256 _debtOutstanding) internal override { } /************* * Very important function * Input: amount we want to withdraw and whether we are happy to pay extra for Aave. * cannot be more than we have * Returns amount we were able to withdraw. notall if user has some balance left * * Deleverage position -> redeem our cTokens ******************** */ function _withdrawSome(uint256 _amount) internal returns (bool notAll) { } /*********** * This is the main logic for calculating how to change our lends and borrows * Input: balance. The net amount we are going to deposit/withdraw. * Input: dep. Is it a deposit or withdrawal * Output: position. The amount we want to change our current borrow position. * Output: deficit. True if we are reducing position size * * For instance deficit =false, position 100 means increase borrowed balance by 100 ****** */ function _calculateDesiredPosition(uint256 balance, bool dep) internal returns (uint256 position, bool deficit) { } /* * Liquidate as many assets as possible to `want`, irregardless of slippage, * up to `_amount`. Any excess should be re-invested here as well. */ function liquidatePosition(uint256 _amountNeeded) internal override returns (uint256 _amountFreed, uint256 _loss) { } function _claimComp() internal { } //sell comp function function _disposeOfComp() internal { } //lets leave //if we can't deleverage in one go set collateralFactor to 0 and call harvest multiple times until delevered function prepareMigration(address _newStrategy) internal override { } //Three functions covering normal leverage and deleverage situations // max is the max amount we want to increase our borrowed balance // returns the amount we actually did function _noFlashLoan(uint256 max, bool deficit) internal returns (uint256 amount) { } //maxDeleverage is how much we want to reduce by function _normalDeleverage( uint256 maxDeleverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 deleveragedAmount) { } //maxDeleverage is how much we want to increase by function _normalLeverage( uint256 maxLeverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 leveragedAmount) { } //called by flash loan function _loanLogic( bool deficit, uint256 amount, uint256 repayAmount ) internal { } //emergency function that we can use to deleverage manually if something is broken function manualDeleverage(uint256 amount) external management{ require(<FILL_ME>) require(cToken.repayBorrow(amount) == 0, "failed repay borrow"); } //emergency function that we can use to deleverage manually if something is broken function manualReleaseWant(uint256 amount) external onlyGovernance{ } function protectedTokens() internal override view returns (address[] memory) { } /****************** * Flash loan stuff ****************/ // Flash loan DXDY // amount desired is how much we are willing for position to change function doDyDxFlashLoan(bool deficit, uint256 amountDesired) internal returns (uint256) { } //returns our current collateralisation ratio. Should be compared with collateralTarget function storedCollateralisation() public view returns (uint256 collat) { } //DyDx calls this function after doing flash loan function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { } // -- Internal Helper functions -- // function _setMarketIdFromTokenAddress() internal { } modifier management(){ } }
cToken.redeemUnderlying(amount)==0,"failed redeem"
1,969
cToken.redeemUnderlying(amount)==0
"failed repay borrow"
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.2.2 * ********************* */ contract Strategy is BaseStrategy, DydxFlashloanBase, ICallee { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; // @notice emitted when trying to do Flash Loan. flashLoan address is 0x00 when no flash loan used event Leverage(uint256 amountRequested, uint256 amountGiven, bool deficit, address flashLoan); //Flash Loan Providers address private constant SOLO = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e; // Comptroller address for compound.finance ComptrollerI public constant compound = ComptrollerI(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); //Only three tokens we use address public constant comp = address(0xc00e94Cb662C3520282E6f5717214004A7f26888); CErc20I public cToken; //address public constant DAI = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); address public constant uniswapRouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); //Operating variables uint256 public collateralTarget = 0.73 ether; // 73% uint256 public blocksToLiquidationDangerZone = 46500; // 7 days = 60*60*24*7/13 uint256 public minWant = 0; //Only lend if we have enough want to be worth it. Can be set to non-zero uint256 public minCompToSell = 0.1 ether; //used both as the threshold to sell but also as a trigger for harvest //To deactivate flash loan provider if needed bool public DyDxActive = true; bool public forceMigrate = false; uint256 public dyDxMarketId; constructor(address _vault, address _cToken) public BaseStrategy(_vault) { } function name() external override view returns (string memory){ } /* * Control Functions */ function setDyDx(bool _dydx) external management { } function setForceMigrate(bool _force) external onlyGovernance { } function setMinCompToSell(uint256 _minCompToSell) external management { } function setMinWant(uint256 _minWant) external management { } function updateMarketId() external management { } function setCollateralTarget(uint256 _collateralTarget) external management { } /* * Base External Facing Functions */ /* * An accurate estimate for the total amount of assets (principle + return) * that this strategy is currently managing, denominated in terms of want tokens. */ function estimatedTotalAssets() public override view returns (uint256) { } //predicts our profit at next report function expectedReturn() public view returns (uint256) { } /* * Provide a signal to the keeper that `tend()` should be called. * (keepers are always reimbursed by yEarn) * * NOTE: this call and `harvestTrigger` should never return `true` at the same time. * tendTrigger should be called with same gasCost as harvestTrigger */ function tendTrigger(uint256 gasCost) public override view returns (bool) { } /* * Provide a signal to the keeper that `harvest()` should be called. * gasCost is expected_gas_use * gas_price * (keepers are always reimbursed by yEarn) * * NOTE: this call and `tendTrigger` should never return `true` at the same time. */ function harvestTrigger(uint256 gasCost) public override view returns (bool) { } //WARNING. manipulatable and simple routing. Only use for safe functions function priceCheck(address start, address end, uint256 _amount) public view returns (uint256) { } /***************** * Public non-base function ******************/ //Calculate how many blocks until we are in liquidation based on current interest rates //WARNING does not include compounding so the estimate becomes more innacurate the further ahead we look //equation. Compound doesn't include compounding for most blocks //((deposits*colateralThreshold - borrows) / (borrows*borrowrate - deposits*colateralThreshold*interestrate)); function getblocksUntilLiquidation() public view returns (uint256) { } // This function makes a prediction on how much comp is accrued // It is not 100% accurate as it uses current balances in Compound to predict into the past function predictCompAccrued() public view returns (uint256) { } //Returns the current position //WARNING - this returns just the balance at last time someone touched the cToken token. Does not accrue interst in between //cToken is very active so not normally an issue. function getCurrentPosition() public view returns (uint256 deposits, uint256 borrows) { } //statechanging version function getLivePosition() public returns (uint256 deposits, uint256 borrows) { } //Same warning as above function netBalanceLent() public view returns (uint256) { } /*********** * internal core logic *********** */ /* * A core method. * Called at beggining of harvest before providing report to owner * 1 - claim accrued comp * 2 - if enough to be worth it we sell * 3 - because we lose money on our loans we need to offset profit from comp. */ function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment ) { } /* * Second core function. Happens after report call. * * Similar to deposit function from V1 strategy */ function adjustPosition(uint256 _debtOutstanding) internal override { } /************* * Very important function * Input: amount we want to withdraw and whether we are happy to pay extra for Aave. * cannot be more than we have * Returns amount we were able to withdraw. notall if user has some balance left * * Deleverage position -> redeem our cTokens ******************** */ function _withdrawSome(uint256 _amount) internal returns (bool notAll) { } /*********** * This is the main logic for calculating how to change our lends and borrows * Input: balance. The net amount we are going to deposit/withdraw. * Input: dep. Is it a deposit or withdrawal * Output: position. The amount we want to change our current borrow position. * Output: deficit. True if we are reducing position size * * For instance deficit =false, position 100 means increase borrowed balance by 100 ****** */ function _calculateDesiredPosition(uint256 balance, bool dep) internal returns (uint256 position, bool deficit) { } /* * Liquidate as many assets as possible to `want`, irregardless of slippage, * up to `_amount`. Any excess should be re-invested here as well. */ function liquidatePosition(uint256 _amountNeeded) internal override returns (uint256 _amountFreed, uint256 _loss) { } function _claimComp() internal { } //sell comp function function _disposeOfComp() internal { } //lets leave //if we can't deleverage in one go set collateralFactor to 0 and call harvest multiple times until delevered function prepareMigration(address _newStrategy) internal override { } //Three functions covering normal leverage and deleverage situations // max is the max amount we want to increase our borrowed balance // returns the amount we actually did function _noFlashLoan(uint256 max, bool deficit) internal returns (uint256 amount) { } //maxDeleverage is how much we want to reduce by function _normalDeleverage( uint256 maxDeleverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 deleveragedAmount) { } //maxDeleverage is how much we want to increase by function _normalLeverage( uint256 maxLeverage, uint256 lent, uint256 borrowed, uint256 collatRatio ) internal returns (uint256 leveragedAmount) { } //called by flash loan function _loanLogic( bool deficit, uint256 amount, uint256 repayAmount ) internal { } //emergency function that we can use to deleverage manually if something is broken function manualDeleverage(uint256 amount) external management{ require(cToken.redeemUnderlying(amount) == 0, "failed redeem"); require(<FILL_ME>) } //emergency function that we can use to deleverage manually if something is broken function manualReleaseWant(uint256 amount) external onlyGovernance{ } function protectedTokens() internal override view returns (address[] memory) { } /****************** * Flash loan stuff ****************/ // Flash loan DXDY // amount desired is how much we are willing for position to change function doDyDxFlashLoan(bool deficit, uint256 amountDesired) internal returns (uint256) { } //returns our current collateralisation ratio. Should be compared with collateralTarget function storedCollateralisation() public view returns (uint256 collat) { } //DyDx calls this function after doing flash loan function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { } // -- Internal Helper functions -- // function _setMarketIdFromTokenAddress() internal { } modifier management(){ } }
cToken.repayBorrow(amount)==0,"failed repay borrow"
1,969
cToken.repayBorrow(amount)==0
null
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } } contract OKBI is StandardToken, BurnableToken, Ownable { // Constants string public constant name = "OKBIcommunity"; string public constant symbol = "OKBI"; uint8 public constant decimals = 18; uint256 constant INITIAL_SUPPLY = 750000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY = 250000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY1 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY2 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY3 = 50000000 * (10 ** uint256(decimals)); bool mintY1; bool mintY2; bool mintY3; uint256 constant MINT_OKBI = 328767 * (10 ** uint256(decimals)); uint256 constant DAY = 1 days ; uint256 startTime = now; uint256 public lastMintTime; constructor() public { } function _transfer(address _from, address _to, uint _value) internal { require(<FILL_ME>) // Check if the sender has enough require (balances[_to] + _value > balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool) { } function () external payable { } function withdrawalToken( ) onlyOwner public { } function mint() internal returns (bool) { } /* Batch token transfer. Used by contract creator to distribute initial tokens to holders */ function batchTransfer(address[] _recipients, uint[] _values) onlyOwner public returns (bool) { } }
balances[_from]>=_value
1,983
balances[_from]>=_value
null
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } } contract OKBI is StandardToken, BurnableToken, Ownable { // Constants string public constant name = "OKBIcommunity"; string public constant symbol = "OKBI"; uint8 public constant decimals = 18; uint256 constant INITIAL_SUPPLY = 750000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY = 250000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY1 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY2 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY3 = 50000000 * (10 ** uint256(decimals)); bool mintY1; bool mintY2; bool mintY3; uint256 constant MINT_OKBI = 328767 * (10 ** uint256(decimals)); uint256 constant DAY = 1 days ; uint256 startTime = now; uint256 public lastMintTime; constructor() public { } function _transfer(address _from, address _to, uint _value) internal { require (balances[_from] >= _value); // Check if the sender has enough require(<FILL_ME>) // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool) { } function () external payable { } function withdrawalToken( ) onlyOwner public { } function mint() internal returns (bool) { } /* Batch token transfer. Used by contract creator to distribute initial tokens to holders */ function batchTransfer(address[] _recipients, uint[] _values) onlyOwner public returns (bool) { } }
balances[_to]+_value>balances[_to]
1,983
balances[_to]+_value>balances[_to]
null
pragma solidity ^0.4.13; contract Ownable { address public owner; function Ownable() { } modifier onlyOwner() { } function transferOwnership(address newOwner) onlyOwner { } } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Peony is Ownable { string public version; string public unit = "piece"; uint256 public total; struct Bullion { string index; string unit; uint256 amount; string ipfs; } bytes32[] public storehouseIndex; mapping (bytes32 => Bullion) public storehouse; address public tokenAddress; uint256 public rate = 10; PeonyToken token; function Peony(string _version) { } event Stock ( string index, string unit, uint256 amount, string ipfs, uint256 total ); event Ship ( string index, uint256 total ); event Mint ( uint256 amount, uint256 total ); event Reduce ( uint256 amount, uint256 total ); function stock(string _index, string _unit, uint256 _amount, string _ipfs) onlyOwner returns (bool); function ship(string _index) onlyOwner returns (bool); function mint(uint256 _ptAmount) onlyOwner returns (bool); function reduce(uint256 _tokenAmount) onlyOwner returns (bool); function setRate(uint256 _rate) onlyOwner returns (bool); function setTokenAddress(address _address) onlyOwner returns (bool); function convert2Peony(uint256 _amount) constant returns (uint256); function convert2PeonyToken(uint256 _amount) constant returns (uint256); function info(string _index) constant returns (string, string, uint256, string); function suicide() onlyOwner returns (bool); } contract PeonyToken is Ownable, ERC20 { using SafeMath for uint256; string public version; string public name; string public symbol; uint256 public decimals; address public peony; mapping(address => mapping (address => uint256)) allowed; mapping(address => uint256) balances; uint256 public totalSupply; uint256 public totalSupplyLimit; mapping(address => uint256) public transferLimits; function PeonyToken( string _version, uint256 initialSupply, uint256 totalSupplyLimit_, string tokenName, uint8 decimalUnits, string tokenSymbol ) { } modifier isPeonyContract() { } modifier isOwnerOrPeonyContract() { } /** * @notice produce `amount` of tokens to `_owner` * @param amount The amount of tokens to produce * @return Whether or not producing was successful */ function produce(uint256 amount) isPeonyContract returns (bool) { } /** * @notice Reduce digital artwork tokens for changing physical artwork * @param amount Reduce token amount */ function reduce(uint256 amount) isPeonyContract returns (bool) { require(<FILL_ME>) require(totalSupply.sub(amount) >= 0); balances[owner] = balances[owner].sub(amount); totalSupply = totalSupply.sub(amount); return true; } /** * @notice Set address of Peony contract. * @param _address the address of Peony contract */ function setPeonyAddress(address _address) onlyOwner returns (bool) { } /** * Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20 * @notice send `_value` token to `_to` * @param _to The address of the recipient * @param _value The amount of token to be transferred * @return Whether the transfer was successful or not */ function transfer(address _to, uint256 _value) returns (bool) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint256) { } /** * @notice return total amount of tokens uint256 public totalSupply; * @param _owner The address from which the balance will be retrieved * @return The balance */ function balanceOf(address _owner) constant returns (uint256 balance) { } /** * @notice Set transfer upper limit * @param transferLimit Transfer upper limit * @return Whether the operation was successful or not */ function setTransferLimit(uint256 transferLimit) returns (bool) { } /** * @notice Delete the contract */ function suicide() onlyOwner returns (bool) { } } library ConvertStringByte { function bytes32ToString(bytes32 x) constant returns (string) { } function stringToBytes32(string memory source) returns (bytes32 result) { } } library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } }
balances[owner].sub(amount)>=0
2,009
balances[owner].sub(amount)>=0
null
pragma solidity ^0.4.13; contract Ownable { address public owner; function Ownable() { } modifier onlyOwner() { } function transferOwnership(address newOwner) onlyOwner { } } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Peony is Ownable { string public version; string public unit = "piece"; uint256 public total; struct Bullion { string index; string unit; uint256 amount; string ipfs; } bytes32[] public storehouseIndex; mapping (bytes32 => Bullion) public storehouse; address public tokenAddress; uint256 public rate = 10; PeonyToken token; function Peony(string _version) { } event Stock ( string index, string unit, uint256 amount, string ipfs, uint256 total ); event Ship ( string index, uint256 total ); event Mint ( uint256 amount, uint256 total ); event Reduce ( uint256 amount, uint256 total ); function stock(string _index, string _unit, uint256 _amount, string _ipfs) onlyOwner returns (bool); function ship(string _index) onlyOwner returns (bool); function mint(uint256 _ptAmount) onlyOwner returns (bool); function reduce(uint256 _tokenAmount) onlyOwner returns (bool); function setRate(uint256 _rate) onlyOwner returns (bool); function setTokenAddress(address _address) onlyOwner returns (bool); function convert2Peony(uint256 _amount) constant returns (uint256); function convert2PeonyToken(uint256 _amount) constant returns (uint256); function info(string _index) constant returns (string, string, uint256, string); function suicide() onlyOwner returns (bool); } contract PeonyToken is Ownable, ERC20 { using SafeMath for uint256; string public version; string public name; string public symbol; uint256 public decimals; address public peony; mapping(address => mapping (address => uint256)) allowed; mapping(address => uint256) balances; uint256 public totalSupply; uint256 public totalSupplyLimit; mapping(address => uint256) public transferLimits; function PeonyToken( string _version, uint256 initialSupply, uint256 totalSupplyLimit_, string tokenName, uint8 decimalUnits, string tokenSymbol ) { } modifier isPeonyContract() { } modifier isOwnerOrPeonyContract() { } /** * @notice produce `amount` of tokens to `_owner` * @param amount The amount of tokens to produce * @return Whether or not producing was successful */ function produce(uint256 amount) isPeonyContract returns (bool) { } /** * @notice Reduce digital artwork tokens for changing physical artwork * @param amount Reduce token amount */ function reduce(uint256 amount) isPeonyContract returns (bool) { require(balances[owner].sub(amount) >= 0); require(<FILL_ME>) balances[owner] = balances[owner].sub(amount); totalSupply = totalSupply.sub(amount); return true; } /** * @notice Set address of Peony contract. * @param _address the address of Peony contract */ function setPeonyAddress(address _address) onlyOwner returns (bool) { } /** * Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20 * @notice send `_value` token to `_to` * @param _to The address of the recipient * @param _value The amount of token to be transferred * @return Whether the transfer was successful or not */ function transfer(address _to, uint256 _value) returns (bool) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint256) { } /** * @notice return total amount of tokens uint256 public totalSupply; * @param _owner The address from which the balance will be retrieved * @return The balance */ function balanceOf(address _owner) constant returns (uint256 balance) { } /** * @notice Set transfer upper limit * @param transferLimit Transfer upper limit * @return Whether the operation was successful or not */ function setTransferLimit(uint256 transferLimit) returns (bool) { } /** * @notice Delete the contract */ function suicide() onlyOwner returns (bool) { } } library ConvertStringByte { function bytes32ToString(bytes32 x) constant returns (string) { } function stringToBytes32(string memory source) returns (bytes32 result) { } } library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } }
totalSupply.sub(amount)>=0
2,009
totalSupply.sub(amount)>=0
null
pragma solidity ^0.4.13; contract Ownable { address public owner; function Ownable() { } modifier onlyOwner() { } function transferOwnership(address newOwner) onlyOwner { } } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Peony is Ownable { string public version; string public unit = "piece"; uint256 public total; struct Bullion { string index; string unit; uint256 amount; string ipfs; } bytes32[] public storehouseIndex; mapping (bytes32 => Bullion) public storehouse; address public tokenAddress; uint256 public rate = 10; PeonyToken token; function Peony(string _version) { } event Stock ( string index, string unit, uint256 amount, string ipfs, uint256 total ); event Ship ( string index, uint256 total ); event Mint ( uint256 amount, uint256 total ); event Reduce ( uint256 amount, uint256 total ); function stock(string _index, string _unit, uint256 _amount, string _ipfs) onlyOwner returns (bool); function ship(string _index) onlyOwner returns (bool); function mint(uint256 _ptAmount) onlyOwner returns (bool); function reduce(uint256 _tokenAmount) onlyOwner returns (bool); function setRate(uint256 _rate) onlyOwner returns (bool); function setTokenAddress(address _address) onlyOwner returns (bool); function convert2Peony(uint256 _amount) constant returns (uint256); function convert2PeonyToken(uint256 _amount) constant returns (uint256); function info(string _index) constant returns (string, string, uint256, string); function suicide() onlyOwner returns (bool); } contract PeonyToken is Ownable, ERC20 { using SafeMath for uint256; string public version; string public name; string public symbol; uint256 public decimals; address public peony; mapping(address => mapping (address => uint256)) allowed; mapping(address => uint256) balances; uint256 public totalSupply; uint256 public totalSupplyLimit; mapping(address => uint256) public transferLimits; function PeonyToken( string _version, uint256 initialSupply, uint256 totalSupplyLimit_, string tokenName, uint8 decimalUnits, string tokenSymbol ) { } modifier isPeonyContract() { } modifier isOwnerOrPeonyContract() { } /** * @notice produce `amount` of tokens to `_owner` * @param amount The amount of tokens to produce * @return Whether or not producing was successful */ function produce(uint256 amount) isPeonyContract returns (bool) { } /** * @notice Reduce digital artwork tokens for changing physical artwork * @param amount Reduce token amount */ function reduce(uint256 amount) isPeonyContract returns (bool) { } /** * @notice Set address of Peony contract. * @param _address the address of Peony contract */ function setPeonyAddress(address _address) onlyOwner returns (bool) { } /** * Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20 * @notice send `_value` token to `_to` * @param _to The address of the recipient * @param _value The amount of token to be transferred * @return Whether the transfer was successful or not */ function transfer(address _to, uint256 _value) returns (bool) { require(_to != address(0)); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint256) { } /** * @notice return total amount of tokens uint256 public totalSupply; * @param _owner The address from which the balance will be retrieved * @return The balance */ function balanceOf(address _owner) constant returns (uint256 balance) { } /** * @notice Set transfer upper limit * @param transferLimit Transfer upper limit * @return Whether the operation was successful or not */ function setTransferLimit(uint256 transferLimit) returns (bool) { } /** * @notice Delete the contract */ function suicide() onlyOwner returns (bool) { } } library ConvertStringByte { function bytes32ToString(bytes32 x) constant returns (string) { } function stringToBytes32(string memory source) returns (bytes32 result) { } } library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } }
transferLimits[msg.sender]==0||transferLimits[msg.sender]>=_value
2,009
transferLimits[msg.sender]==0||transferLimits[msg.sender]>=_value
null
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Ryancoin { using SafeMath for uint256; uint256 public constant _initialSupply = 15000000 * (10 ** uint256(decimals)); uint256 _totalSupply = 0; uint256 _totalSold = 0; string public constant symbol = "RYC"; string public constant name = "Ryancoin"; uint8 public constant decimals = 6; uint256 public rate = 1 ether / (500 * (10 ** uint256(decimals))); address public owner; bool public _contractStatus = true; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; //control allow to spend mapping (address => bool) _frozenAccount; mapping (address => bool) _tokenAccount; address[] tokenHolders; //Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event UpdateStatus(string newStatus); event Burn(address target, uint256 _value); event MintedToken(address target, uint256 _value); event FrozenFunds(address target, bool _value); event Approval(address indexed owner, address indexed spender, uint256 value); function Ryancoin() { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } function stopContract() public onlyOwner { } function enableContract() public onlyOwner { } function totalSupply() public constant returns (uint256){ } function totalSold() public constant returns (uint256){ } function totalRate() public constant returns (uint256){ } function updateRate(uint256 _value) onlyOwner public returns (bool success){ } function () payable public { } function createTokens() public payable{ require(msg.value > 0 && msg.value > rate && _contractStatus); uint256 tokens = msg.value.div(rate); require(<FILL_ME>) require( balances[owner] >= tokens && tokens > 0 ); _transfer(owner, msg.sender, tokens); Transfer(owner, msg.sender, tokens); _totalSold = _totalSold.add(tokens); owner.transfer(msg.value); //transfer ether to contract ower } function balanceOf(address _owner) public constant returns (uint256 balance){ } function transfer(address _to, uint256 _value) public returns (bool success){ } function _transfer(address _from, address _to, uint256 _value) internal { } function transferFromOwner(address _from, address _to, uint256 _value) onlyOwner public returns (bool success){ } function setTokenHolders(address _holder) internal { } function getTokenHolders() view public returns (address[]) { } function countTokenHolders() view public returns (uint) { } function burn(uint256 _value) public returns (bool success) { } function burnFromOwner(address _from, uint256 _value) onlyOwner public returns (bool success) { } function mintToken(address _target, uint256 _mintedAmount) onlyOwner public { } function getfreezeAccount(address _target) public constant returns (bool freeze) { } function freezeAccount(address _target, bool freeze) onlyOwner public { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * @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 constant 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) */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } }
tokens+_totalSold<_totalSupply
2,020
tokens+_totalSold<_totalSupply
null
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Ryancoin { using SafeMath for uint256; uint256 public constant _initialSupply = 15000000 * (10 ** uint256(decimals)); uint256 _totalSupply = 0; uint256 _totalSold = 0; string public constant symbol = "RYC"; string public constant name = "Ryancoin"; uint8 public constant decimals = 6; uint256 public rate = 1 ether / (500 * (10 ** uint256(decimals))); address public owner; bool public _contractStatus = true; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; //control allow to spend mapping (address => bool) _frozenAccount; mapping (address => bool) _tokenAccount; address[] tokenHolders; //Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event UpdateStatus(string newStatus); event Burn(address target, uint256 _value); event MintedToken(address target, uint256 _value); event FrozenFunds(address target, bool _value); event Approval(address indexed owner, address indexed spender, uint256 value); function Ryancoin() { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } function stopContract() public onlyOwner { } function enableContract() public onlyOwner { } function totalSupply() public constant returns (uint256){ } function totalSold() public constant returns (uint256){ } function totalRate() public constant returns (uint256){ } function updateRate(uint256 _value) onlyOwner public returns (bool success){ } function () payable public { } function createTokens() public payable{ require(msg.value > 0 && msg.value > rate && _contractStatus); uint256 tokens = msg.value.div(rate); require(tokens + _totalSold < _totalSupply); require(<FILL_ME>) _transfer(owner, msg.sender, tokens); Transfer(owner, msg.sender, tokens); _totalSold = _totalSold.add(tokens); owner.transfer(msg.value); //transfer ether to contract ower } function balanceOf(address _owner) public constant returns (uint256 balance){ } function transfer(address _to, uint256 _value) public returns (bool success){ } function _transfer(address _from, address _to, uint256 _value) internal { } function transferFromOwner(address _from, address _to, uint256 _value) onlyOwner public returns (bool success){ } function setTokenHolders(address _holder) internal { } function getTokenHolders() view public returns (address[]) { } function countTokenHolders() view public returns (uint) { } function burn(uint256 _value) public returns (bool success) { } function burnFromOwner(address _from, uint256 _value) onlyOwner public returns (bool success) { } function mintToken(address _target, uint256 _mintedAmount) onlyOwner public { } function getfreezeAccount(address _target) public constant returns (bool freeze) { } function freezeAccount(address _target, bool freeze) onlyOwner public { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * @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 constant 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) */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } }
balances[owner]>=tokens&&tokens>0
2,020
balances[owner]>=tokens&&tokens>0
null
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Ryancoin { using SafeMath for uint256; uint256 public constant _initialSupply = 15000000 * (10 ** uint256(decimals)); uint256 _totalSupply = 0; uint256 _totalSold = 0; string public constant symbol = "RYC"; string public constant name = "Ryancoin"; uint8 public constant decimals = 6; uint256 public rate = 1 ether / (500 * (10 ** uint256(decimals))); address public owner; bool public _contractStatus = true; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; //control allow to spend mapping (address => bool) _frozenAccount; mapping (address => bool) _tokenAccount; address[] tokenHolders; //Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event UpdateStatus(string newStatus); event Burn(address target, uint256 _value); event MintedToken(address target, uint256 _value); event FrozenFunds(address target, bool _value); event Approval(address indexed owner, address indexed spender, uint256 value); function Ryancoin() { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } function stopContract() public onlyOwner { } function enableContract() public onlyOwner { } function totalSupply() public constant returns (uint256){ } function totalSold() public constant returns (uint256){ } function totalRate() public constant returns (uint256){ } function updateRate(uint256 _value) onlyOwner public returns (bool success){ } function () payable public { } function createTokens() public payable{ } function balanceOf(address _owner) public constant returns (uint256 balance){ } function transfer(address _to, uint256 _value) public returns (bool success){ //Check contract is stop require(_contractStatus); require(<FILL_ME>) _transfer(msg.sender, _to, _value); return true; } function _transfer(address _from, address _to, uint256 _value) internal { } function transferFromOwner(address _from, address _to, uint256 _value) onlyOwner public returns (bool success){ } function setTokenHolders(address _holder) internal { } function getTokenHolders() view public returns (address[]) { } function countTokenHolders() view public returns (uint) { } function burn(uint256 _value) public returns (bool success) { } function burnFromOwner(address _from, uint256 _value) onlyOwner public returns (bool success) { } function mintToken(address _target, uint256 _mintedAmount) onlyOwner public { } function getfreezeAccount(address _target) public constant returns (bool freeze) { } function freezeAccount(address _target, bool freeze) onlyOwner public { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * @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 constant 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) */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } }
!_frozenAccount[msg.sender]
2,020
!_frozenAccount[msg.sender]
null
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Ryancoin { using SafeMath for uint256; uint256 public constant _initialSupply = 15000000 * (10 ** uint256(decimals)); uint256 _totalSupply = 0; uint256 _totalSold = 0; string public constant symbol = "RYC"; string public constant name = "Ryancoin"; uint8 public constant decimals = 6; uint256 public rate = 1 ether / (500 * (10 ** uint256(decimals))); address public owner; bool public _contractStatus = true; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; //control allow to spend mapping (address => bool) _frozenAccount; mapping (address => bool) _tokenAccount; address[] tokenHolders; //Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event UpdateStatus(string newStatus); event Burn(address target, uint256 _value); event MintedToken(address target, uint256 _value); event FrozenFunds(address target, bool _value); event Approval(address indexed owner, address indexed spender, uint256 value); function Ryancoin() { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } function stopContract() public onlyOwner { } function enableContract() public onlyOwner { } function totalSupply() public constant returns (uint256){ } function totalSold() public constant returns (uint256){ } function totalRate() public constant returns (uint256){ } function updateRate(uint256 _value) onlyOwner public returns (bool success){ } function () payable public { } function createTokens() public payable{ } function balanceOf(address _owner) public constant returns (uint256 balance){ } function transfer(address _to, uint256 _value) public returns (bool success){ } function _transfer(address _from, address _to, uint256 _value) internal { } function transferFromOwner(address _from, address _to, uint256 _value) onlyOwner public returns (bool success){ } function setTokenHolders(address _holder) internal { } function getTokenHolders() view public returns (address[]) { } function countTokenHolders() view public returns (uint) { } function burn(uint256 _value) public returns (bool success) { require(_value > 0); require(<FILL_ME>) // Check if the sender has enough balances[msg.sender] -= _value; // Subtract from the sender _totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } function burnFromOwner(address _from, uint256 _value) onlyOwner public returns (bool success) { } function mintToken(address _target, uint256 _mintedAmount) onlyOwner public { } function getfreezeAccount(address _target) public constant returns (bool freeze) { } function freezeAccount(address _target, bool freeze) onlyOwner public { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * @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 constant 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) */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } }
balances[msg.sender]>=_value
2,020
balances[msg.sender]>=_value
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0 <0.9.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC721/ERC721.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/access/Ownable.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/math/SafeMath.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./Dorkis.sol"; import "./Royalties.sol"; contract HalloweenDorkis is Ownable, ERC721Enumerable , Royalties { using SafeMath for uint256; uint256 public MAX_TOKENS; uint256[] private royalties = new uint256[](1); uint public constant MAX_PURCHASE = 25; bool public freeMintIsActive; bool[] private hasMinted; Dorkis private dorkis; address payable[] private addr = new address payable[](1); address private dorkisContract = 0x0588a0182eE72F74D0BA3b1fC6f5109599A46A9C; address private constant TORI = 0x51Be0a47282afbE3a330F7738A0Ab5b277810Fe4; address private constant FRANK = 0xF40Fd88ac59A206D009A07F8c09828a01e2ACC0d; address private constant FCCVIEW = 0xf450a5d6C4205ca8151fb1c6FAF49A02c8A527FC; // Base URI for Meta data string private _baseTokenURI; event priceChange(address _by, uint256 price); event PaymentReleased(address to, uint256 amount); constructor() ERC721("Halloween Dorkis", "HDRK") { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view override (ERC721Enumerable,Royalties) returns (bool){ } /** * Get all tokens for a specific wallet * */ function getTokensForAddress(address fromAddress) external view returns (uint256 [] memory){ } /** * Get all tokens for a specific wallet * */ function getDorkisForAddress(address fromAddress) external view returns (uint256 [] memory){ } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Set the base token URI */ function setBaseTokenURI(string memory baseURI) public onlyOwner { } /** * Pause sale if active, make active if paused */ function flipFreeMintState() public onlyOwner { } /** * Set Dorkis contract address */ function setDorkisContract(address newAddress) public onlyOwner { } function numberOfMintsForArray(uint256 [] memory dorkisMinted) external view returns (uint){ } /** * Mint FREE Haloween Dorkis */ function mintFreeHalloweenDorkis(uint256 [] memory tokenIds) external { require(freeMintIsActive, "Free Mint Sale must be active to mint the Free Dorkis"); preMintChecks(tokenIds.length); for(uint i = 0; i < tokenIds.length; i++) { require(<FILL_ME>) _safeMint(msg.sender, tokenIds[i]); hasMinted[tokenIds[i]]=true; } } function preMintChecks(uint numberOfTokens) internal view { } function getMintedDorkis() public view returns (bool [] memory){ } // Royalties implemetations function getFeeRecipients(uint256 tokenId) external view override returns (address payable[] memory){ } // fees.value is the royalties percentage, by default this value is 1000 on Rarible which is a 10% royalties fee. function getFeeBps(uint256 tokenId) external view override returns (uint[] memory){ } function getFees(uint256 tokenId) external view override returns (address payable[] memory, uint256[] memory){ } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address, uint256){ } }
dorkis.ownerOf(tokenIds[i])==msg.sender
2,021
dorkis.ownerOf(tokenIds[i])==msg.sender
"Purchase would exceed max supply of Dorkis"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0 <0.9.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC721/ERC721.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/access/Ownable.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/math/SafeMath.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./Dorkis.sol"; import "./Royalties.sol"; contract HalloweenDorkis is Ownable, ERC721Enumerable , Royalties { using SafeMath for uint256; uint256 public MAX_TOKENS; uint256[] private royalties = new uint256[](1); uint public constant MAX_PURCHASE = 25; bool public freeMintIsActive; bool[] private hasMinted; Dorkis private dorkis; address payable[] private addr = new address payable[](1); address private dorkisContract = 0x0588a0182eE72F74D0BA3b1fC6f5109599A46A9C; address private constant TORI = 0x51Be0a47282afbE3a330F7738A0Ab5b277810Fe4; address private constant FRANK = 0xF40Fd88ac59A206D009A07F8c09828a01e2ACC0d; address private constant FCCVIEW = 0xf450a5d6C4205ca8151fb1c6FAF49A02c8A527FC; // Base URI for Meta data string private _baseTokenURI; event priceChange(address _by, uint256 price); event PaymentReleased(address to, uint256 amount); constructor() ERC721("Halloween Dorkis", "HDRK") { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view override (ERC721Enumerable,Royalties) returns (bool){ } /** * Get all tokens for a specific wallet * */ function getTokensForAddress(address fromAddress) external view returns (uint256 [] memory){ } /** * Get all tokens for a specific wallet * */ function getDorkisForAddress(address fromAddress) external view returns (uint256 [] memory){ } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Set the base token URI */ function setBaseTokenURI(string memory baseURI) public onlyOwner { } /** * Pause sale if active, make active if paused */ function flipFreeMintState() public onlyOwner { } /** * Set Dorkis contract address */ function setDorkisContract(address newAddress) public onlyOwner { } function numberOfMintsForArray(uint256 [] memory dorkisMinted) external view returns (uint){ } /** * Mint FREE Haloween Dorkis */ function mintFreeHalloweenDorkis(uint256 [] memory tokenIds) external { } function preMintChecks(uint numberOfTokens) internal view { require(numberOfTokens > 0, "numberOfNfts cannot be 0."); require(numberOfTokens <= MAX_PURCHASE, "Can only mint 25 tokens at a time."); require(<FILL_ME>) } function getMintedDorkis() public view returns (bool [] memory){ } // Royalties implemetations function getFeeRecipients(uint256 tokenId) external view override returns (address payable[] memory){ } // fees.value is the royalties percentage, by default this value is 1000 on Rarible which is a 10% royalties fee. function getFeeBps(uint256 tokenId) external view override returns (uint[] memory){ } function getFees(uint256 tokenId) external view override returns (address payable[] memory, uint256[] memory){ } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address, uint256){ } }
totalSupply().add(numberOfTokens)<=MAX_TOKENS,"Purchase would exceed max supply of Dorkis"
2,021
totalSupply().add(numberOfTokens)<=MAX_TOKENS
null
pragma solidity >=0.4.22 <0.6.0; contract SafeMath { function safeMul(uint256 a, uint256 b) public pure returns (uint256) { } function safeDiv(uint256 a, uint256 b)public pure returns (uint256) { } function safeSub(uint256 a, uint256 b)public pure returns (uint256) { } function safeAdd(uint256 a, uint256 b)public pure returns (uint256) { } function _assert(bool assertion)public pure { } } contract ERC20Interface { string public name; string public symbol; uint8 public decimals; uint public totalSupply; function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender)public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract ERC20 is ERC20Interface,SafeMath { mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) allowed; constructor(string memory _name) public { } function transfer(address _to, uint256 _value) public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); require(<FILL_ME>) require(balanceOf[_from] >= _value); require(balanceOf[_to] + _value >= balanceOf[_to]); balanceOf[_from] =SafeMath.safeSub(balanceOf[_from],_value) ; balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to],_value); allowed[_from][msg.sender] =SafeMath.safeSub(allowed[_from][msg.sender], _value); emit Transfer(msg.sender, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract owned { address public owner; constructor () public { } modifier onlyOwner { } function transferOwnerShip(address newOwer) public onlyOwner { } } contract MYT is ERC20,owned{ mapping (address => bool) public frozenAccount; event FrozenFunds(address target, bool frozen); event Burn(address target, uint amount); constructor (string memory _name) ERC20(_name) public { } function freezeAccount(address target, bool freeze) public onlyOwner { } function transfer(address _to, uint256 _value) public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function _transfer(address _from, address _to, uint256 _value) internal returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } }
allowed[_from][msg.sender]>=_value
2,036
allowed[_from][msg.sender]>=_value
null
/** * @title RTELockingVault * @dev For RTE token holders to lock up their tokens for incentives */ contract RTELockingVault is HasNoEther, CanReclaimToken { using SafeERC20 for ERC20; using SafeMath for uint256; ERC20 public token; bool public vaultUnlocked; uint256 public cap; uint256 public minimumDeposit; uint256 public tokensDeposited; uint256 public interestRate; uint256 public vaultDepositDeadlineTime; uint256 public vaultUnlockTime; uint256 public vaultLockDays; address public rewardWallet; mapping(address => uint256) public lockedBalances; /** * @dev Locked tokens event * @param _investor Investor address * @param _value Tokens locked */ event TokenLocked(address _investor, uint256 _value); /** * @dev Withdrawal event * @param _investor Investor address * @param _value Tokens withdrawn */ event TokenWithdrawal(address _investor, uint256 _value); constructor ( ERC20 _token, uint256 _cap, uint256 _minimumDeposit, uint256 _interestRate, uint256 _vaultDepositDeadlineTime, uint256 _vaultUnlockTime, uint256 _vaultLockDays, address _rewardWallet ) public { } /** * @dev Deposit and lock tokens * @param _amount Amount of tokens to transfer and lock */ function lockToken(uint256 _amount) public { require(_amount >= minimumDeposit); require(now < vaultDepositDeadlineTime); require(<FILL_ME>) token.safeTransferFrom(msg.sender, address(this), _amount); lockedBalances[msg.sender] = lockedBalances[msg.sender].add(_amount); tokensDeposited = tokensDeposited.add(_amount); emit TokenLocked(msg.sender, _amount); } /** * @dev Withdraw locked tokens */ function withdrawToken() public { } /** * @dev Force Withdraw locked tokens */ function forceWithdrawToken(address _forceAddress) public onlyOwner { } /** * @dev Irreversibly finalizes and unlocks the vault - only owner of contract can call this */ function finalizeVault() public onlyOwner { } }
tokensDeposited.add(_amount)<=cap
2,039
tokensDeposited.add(_amount)<=cap
null
pragma solidity ^0.4.23; contract CSC { mapping (address => uint256) private balances; mapping (address => uint256[2]) private lockedBalances; string public name; //fancy name: eg Simon Bucks uint8 public decimals; //How many decimals to show. string public symbol; //An identifier: eg SBX uint256 public totalSupply; address public owner; uint256 private icoLockUntil = 1543593540; event Transfer(address indexed _from, address indexed _to, uint256 _value); constructor( uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, address _owner, address[] _lockedAddress, uint256[] _lockedBalances, uint256[] _lockedTimes ) public { } /*外部直投和空投 */ /*转账 会检测是否有锁仓限额和期限 */ function transfer(address _to, uint256 _value) public returns (bool success) { //当ICO未完成时,除owner外禁止转账 require(msg.sender == owner || icoLockUntil < now); if(_to != address(0)){ if(lockedBalances[msg.sender][1] >= now) { require(<FILL_ME>) } else { require(balances[msg.sender] >= _value); } balances[msg.sender] -= _value; balances[_to] += _value; emit Transfer(msg.sender, _to, _value); return true; } } /*从某地址摧毁某数量的代币并减少总供应量 需要拥有者权限 */ function burnFrom(address _who,uint256 _value)public returns (bool){ } /*铸币到创始者账户并增加总供应量 需要拥有者权限 */ function makeCoin(uint256 _value)public returns (bool){ } /*设置ICO锁仓到期时间,需要拥有管理者权限 */ function setIcoLockUntil(uint256 _until) public{ } function balanceOf(address _owner) public view returns (uint256 balance) { } /*将合约中的ETH提取到创始者地址中 需求拥有者权限 */ function withdraw() public{ } /*将合约中的ETH提取到某个地址中 需求拥有者权限 */ function withdrawTo(address _to) public{ } }
(balances[msg.sender]>lockedBalances[msg.sender][0])&&(balances[msg.sender]-lockedBalances[msg.sender][0]>=_value)
2,087
(balances[msg.sender]>lockedBalances[msg.sender][0])&&(balances[msg.sender]-lockedBalances[msg.sender][0]>=_value)
"The caller is not Admin"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { require(<FILL_ME>) _; } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
isAdmin(msg.sender),"The caller is not Admin"
2,091
isAdmin(msg.sender)
null
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { if (token == address(0)) require(<FILL_ME>) else { ERC20 erc20 = ERC20(token); require (erc20.balanceOf(address(this)) >= founds); } sendFounds(dst,founds, token); } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
address(this).balance>=founds
2,091
address(this).balance>=founds
null
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { if (token == address(0)) require (address(this).balance >= founds); else { ERC20 erc20 = ERC20(token); require(<FILL_ME>) } sendFounds(dst,founds, token); } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
erc20.balanceOf(address(this))>=founds
2,091
erc20.balanceOf(address(this))>=founds
"Impossible send founds"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { ERC20 erc20; if (token == address(0)) require(<FILL_ME>) else { erc20 = ERC20(token); require(erc20.transfer(dst, amount), "Impossible send founds"); } } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
address(dst).send(amount),"Impossible send founds"
2,091
address(dst).send(amount)
"Impossible send founds"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { ERC20 erc20; if (token == address(0)) require(address(dst).send(amount), "Impossible send founds"); else { erc20 = ERC20(token); require(<FILL_ME>) } } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
erc20.transfer(dst,amount),"Impossible send founds"
2,091
erc20.transfer(dst,amount)
"Unable to transferFrom()"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { uint256 start_gas = gasleft(); ERC20 token = ERC20(srcToken); require(<FILL_ME>) swapOnBest(srcToken, srcQty, dstToken, dstAddress); if (useReserveOfGas) { if (isAdmin(msg.sender)) { useGas(start_gas); } } } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
token.transferFrom(msg.sender,address(this),srcQty),"Unable to transferFrom()"
2,091
token.transferFrom(msg.sender,address(this),srcQty)
"Unable to appove()"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { SwapProxyInterface spi; ERC20 token = ERC20(srcToken); uint256 index; uint256 rate; require(swapProxySize != 0, "Unable to found a configured swap"); (index,rate) = getBestRate(srcToken,dstToken,srcQty); require(rate != 0, "Unable to found a valid rate"); // Set the spender's token allowance to tokenQty require(<FILL_ME>) spi = SwapProxyInterface(swapProxy[index]); require(spi.executeSwap(srcToken,srcQty,dstToken,dstAddress), "Unable to executeSwap"); emit TokenSwapped(srcToken,dstToken,spi.name()); return true; } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
token.approve(swapProxy[index],srcQty),"Unable to appove()"
2,091
token.approve(swapProxy[index],srcQty)
"Unable to executeSwap"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { SwapProxyInterface spi; ERC20 token = ERC20(srcToken); uint256 index; uint256 rate; require(swapProxySize != 0, "Unable to found a configured swap"); (index,rate) = getBestRate(srcToken,dstToken,srcQty); require(rate != 0, "Unable to found a valid rate"); // Set the spender's token allowance to tokenQty require(token.approve(swapProxy[index], srcQty), "Unable to appove()"); spi = SwapProxyInterface(swapProxy[index]); require(<FILL_ME>) emit TokenSwapped(srcToken,dstToken,spi.name()); return true; } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
spi.executeSwap(srcToken,srcQty,dstToken,dstAddress),"Unable to executeSwap"
2,091
spi.executeSwap(srcToken,srcQty,dstToken,dstAddress)
"Unable to appove()"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { SwapProxyInterface spi; ERC20 token = ERC20(srcToken); require(swapProxySize != 0 && swapProxy[dex] != address(0), "Unable to found a swap identified by dex"); // Set the spender's token allowance to tokenQty require(<FILL_ME>) spi = SwapProxyInterface(swapProxy[dex]); require(spi.executeSwap(srcToken,srcQty,dstToken,dstAddress), "Unable to executeSwap"); emit TokenSwapped(srcToken,dstToken,spi.name()); return true; } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
token.approve(swapProxy[dex],srcQty),"Unable to appove()"
2,091
token.approve(swapProxy[dex],srcQty)
"Unable to transferFrom()"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { uint256 start_gas = gasleft(); uint256 quantity; Auction auction = Auction(auctionAddress); ERC20 srcToken = ERC20(src); ERC20 dstToken = ERC20(dst); uint256 dst_startBalance = dstToken.balanceOf(address(this)); /** * 1- Traemos los fondos para poder participar de la subasta */ require(<FILL_ME>) /** * 2- Habilitamos el approve al transfer proxy si no esta habilitado */ require(srcToken.approve(transferProxy,srcQty), "Unable to approve"); /** * 3- Calculamos la cantidad para participar */ quantity = (srcQty / inflow) * minimumBid; /** * 4- Participamos en la subasta */ auction.bidAndWithdraw(tokenset,quantity,true); /** * 5- En este punto debemos tener mas balance del dstToken y esa diferencia es la que tenemos que * intercambiar */ swapOn(dex,dst,dstToken.balanceOf(address(this))-dst_startBalance,src,msg.sender); if (useReserveOfGas) { if (isAdmin(msg.sender)) { useGas(start_gas); } } } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
srcToken.transferFrom(msg.sender,address(this),srcQty),"Unable to transferFrom()"
2,091
srcToken.transferFrom(msg.sender,address(this),srcQty)
"Unable to approve"
pragma solidity 0.5.14; contract SwapProxyInterface { function name() public view returns(string memory); function getSwapQuantity(address src, address dst, uint256 srcQty) public view returns(uint256); function getSwapRate(address src, address dst, uint256 srcQty) public view returns(uint256); function executeSwap(address srcToken, uint256 srcQty, address dstToken, address dstAddress) public returns(bool); } contract ERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function decimals() public view returns(uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); } contract Auction { function bidAndWithdraw(address _rebalancingSetToken, uint256 _quantity, bool _allowPartialFill) external; } contract AdminRole { mapping (address => bool) adminGroup; address payable owner; constructor () public { } modifier onlyAdmin() { } modifier onlyOwner { } function addAdmin(address addr) external onlyAdmin { } function delAdmin(address addr) external onlyAdmin { } function isAdmin(address addr) public view returns(bool) { } function kill() external onlyOwner { } } contract Withdrawable is AdminRole { /* * External Function to withdraw founds -> Gas or Tokens */ function withdrawTo (address payable dst, uint founds, address token) external onlyAdmin { } /* * Function to send founds -> Gas or Tokens */ function sendFounds(address payable dst, uint amount, address token) internal returns(bool) { } } contract GasReserve { uint256[] g; event GasReport( uint256 total_gas_consumed, uint256 words_used ); function reserveGas(uint256 quantity) public { } function gasWordsQuantity() external view returns(uint256) { } function useGas(uint256 start_gas) internal { } function releaseGas(uint256 quantity) internal { } function getReserveAddr () private pure returns(uint256 reserve) { } function reserve(uint256 quantity) private { } function release(uint256 quantity) private { } } contract Swapper is Withdrawable, GasReserve { event TokenSwapped(address indexed srcToken, address indexed dstToken, string swapProxy); address[10] swapProxy; uint256 swapProxySize = 0; function addSwapProxy (address addr) external onlyAdmin { } function delSwapProxy(address addr) external onlyAdmin { } function getBestSwapRate(address src, address dst, uint256 srcQty) external view returns (string memory name, uint256 rate, uint256 index) { } function TokenSwapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function TokenSwapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress, bool useReserveOfGas) external { } function getBestRate(address src, address dst, uint256 srcQty) internal view returns(uint256 index, uint256 rate ) { } function swapOnBest(address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } function swapOn(uint256 dex, address srcToken, uint256 srcQty, address dstToken, address dstAddress) internal returns(bool) { } } contract Bidder is Swapper { address public auctionAddress = 0xe23FB31dD2edacEbF7d92720358bB92445F47fDB; address public transferProxy = 0x882d80D3a191859d64477eb78Cca46599307ec1C; function bidAndSwapOn(uint256 dex, address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { uint256 start_gas = gasleft(); uint256 quantity; Auction auction = Auction(auctionAddress); ERC20 srcToken = ERC20(src); ERC20 dstToken = ERC20(dst); uint256 dst_startBalance = dstToken.balanceOf(address(this)); /** * 1- Traemos los fondos para poder participar de la subasta */ require(srcToken.transferFrom(msg.sender,address(this),srcQty), "Unable to transferFrom()"); /** * 2- Habilitamos el approve al transfer proxy si no esta habilitado */ require(<FILL_ME>) /** * 3- Calculamos la cantidad para participar */ quantity = (srcQty / inflow) * minimumBid; /** * 4- Participamos en la subasta */ auction.bidAndWithdraw(tokenset,quantity,true); /** * 5- En este punto debemos tener mas balance del dstToken y esa diferencia es la que tenemos que * intercambiar */ swapOn(dex,dst,dstToken.balanceOf(address(this))-dst_startBalance,src,msg.sender); if (useReserveOfGas) { if (isAdmin(msg.sender)) { useGas(start_gas); } } } function bidAndSwapOnBest(address tokenset, uint256 inflow, uint256 minimumBid, uint256 srcQty, address src, address dst, bool useReserveOfGas) external { } }
srcToken.approve(transferProxy,srcQty),"Unable to approve"
2,091
srcToken.approve(transferProxy,srcQty)
"Implementation must be a contract"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; import "@openzeppelin/contracts/utils/Address.sol"; import "./GraphProxyStorage.sol"; /** * @title Graph Proxy * @dev Graph Proxy contract used to delegate call implementation contracts and support upgrades. * This contract should NOT define storage as it is managed by GraphProxyStorage. * This contract implements a proxy that is upgradeable by an admin. * https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies#transparent-proxies-and-function-clashes */ contract GraphProxy is GraphProxyStorage { /** * @dev Modifier used internally that will delegate the call to the implementation unless * the sender is the admin. */ modifier ifAdmin() { } /** * @dev Modifier used internally that will delegate the call to the implementation unless * the sender is the admin or pending implementation. */ modifier ifAdminOrPendingImpl() { } /** * @dev Contract constructor. * @param _impl Address of the initial implementation * @param _admin Address of the proxy admin */ constructor(address _impl, address _admin) { } /** * @dev Returns the current admin. * * NOTE: Only the admin and implementation can call this function. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function admin() external ifAdminOrPendingImpl returns (address) { } /** * @dev Returns the current implementation. * * NOTE: Only the admin can call this function. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ function implementation() external ifAdminOrPendingImpl returns (address) { } /** * @dev Returns the current pending implementation. * * NOTE: Only the admin can call this function. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x9e5eddc59e0b171f57125ab86bee043d9128098c3a6b9adb4f2e86333c2f6f8c` */ function pendingImplementation() external ifAdminOrPendingImpl returns (address) { } /** * @dev Changes the admin of the proxy. * * NOTE: Only the admin can call this function. */ function setAdmin(address _newAdmin) external ifAdmin { } /** * @dev Upgrades to a new implementation contract. * @param _newImplementation Address of implementation contract * * NOTE: Only the admin can call this function. */ function upgradeTo(address _newImplementation) external ifAdmin { } /** * @dev Admin function for new implementation to accept its role as implementation. */ function acceptUpgrade() external ifAdminOrPendingImpl { } /** * @dev Admin function for new implementation to accept its role as implementation. */ function acceptUpgradeAndCall(bytes calldata data) external ifAdminOrPendingImpl { } /** * @dev Admin function for new implementation to accept its role as implementation. */ function _acceptUpgrade() internal { address _pendingImplementation = _pendingImplementation(); require(<FILL_ME>) require( _pendingImplementation != address(0) && msg.sender == _pendingImplementation, "Caller must be the pending implementation" ); _setImplementation(_pendingImplementation); _setPendingImplementation(address(0)); } /** * @dev Delegates the current call to implementation. * This function does not return to its internal call site, it will return directly to the * external caller. */ function _fallback() internal { } /** * @dev Fallback function that delegates calls to implementation. Will run if no other * function in the contract matches the call data. */ fallback() external payable { } /** * @dev Fallback function that delegates calls to implementation. Will run if call data * is empty. */ receive() external payable { } }
Address.isContract(_pendingImplementation),"Implementation must be a contract"
2,251
Address.isContract(_pendingImplementation)
null
// SPDX-License-Identifier: UNLICENSED /* Welcome to Dinoshiba! ($DINOSHI) Would you be able to help Rawl, the Dinoshiba and his father Dino, a T Rex to sustain their life? The sell tax of this project will be raised to 17% to avoid the situation of jeets selling our token at the early stage of our launch. The sell tax will be gradually decrease 3% per hour until it reaches 4%. Telegram @dinoshiba */ 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 DINOSHI is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "DinoShiba"; string private constant _symbol = "DINOSHIBA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setRemoveMaxTx(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { 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"); require(<FILL_ME>) if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance/4; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function createPair() external onlyOwner(){ } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() public onlyOwner() { } function manualsend() public onlyOwner() { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _setSellTax(uint256 sellTax) external onlyOwner() { } function setBuyTax(uint256 buyTax) external onlyOwner() { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
!bots[from]
2,254
!bots[from]
null
// SPDX-License-Identifier: UNLICENSED /* Welcome to Dinoshiba! ($DINOSHI) Would you be able to help Rawl, the Dinoshiba and his father Dino, a T Rex to sustain their life? The sell tax of this project will be raised to 17% to avoid the situation of jeets selling our token at the early stage of our launch. The sell tax will be gradually decrease 3% per hour until it reaches 4%. Telegram @dinoshiba */ 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 DINOSHI is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "DinoShiba"; string private constant _symbol = "DINOSHIBA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setRemoveMaxTx(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { 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"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(<FILL_ME>) } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance/4; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function createPair() external onlyOwner(){ } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() public onlyOwner() { } function manualsend() public onlyOwner() { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _setSellTax(uint256 sellTax) external onlyOwner() { } function setBuyTax(uint256 buyTax) external onlyOwner() { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
amount.add(walletBalance)<=_maxTxAmount
2,254
amount.add(walletBalance)<=_maxTxAmount
null
pragma solidity ^0.4.24; import "./OwnerRole.sol"; contract CroupierRole is OwnerRole{ using Roles for Roles.Role; event CroupierAdded(address indexed account); event CroupierRemoved(address indexed account); Roles.Role private _croupiers; constructor () internal { } modifier onlyCroupier() { require(<FILL_ME>) _; } function isCroupier(address account) public view returns (bool) { } function addCroupier(address account) public onlyOwner { } function removeCroupier(address account) public onlyOwner { } function _addCroupier(address account) internal { } function _removeCroupier(address account) internal { } }
isCroupier(msg.sender)
2,319
isCroupier(msg.sender)
"Timelock::executeTransaction: Transaction hasn't been queued."
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 1 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; bool public admin_initialized; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { } receive() external payable { } function setDelay(uint delay_) public { } function acceptAdmin() public { } function setPendingAdmin(address pendingAdmin_) public { } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(<FILL_ME>) require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = (target.call{value:value})(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { } }
queuedTransactions[txHash],"Timelock::executeTransaction: Transaction hasn't been queued."
2,324
queuedTransactions[txHash]
"Timelock::executeTransaction: Transaction hasn't surpassed time lock."
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 1 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; bool public admin_initialized; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { } receive() external payable { } function setDelay(uint delay_) public { } function acceptAdmin() public { } function setPendingAdmin(address pendingAdmin_) public { } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(<FILL_ME>) require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = (target.call{value:value})(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { } }
getBlockTimestamp()>=eta,"Timelock::executeTransaction: Transaction hasn't surpassed time lock."
2,324
getBlockTimestamp()>=eta
"Timelock::executeTransaction: Transaction is stale."
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 1 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; bool public admin_initialized; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { } receive() external payable { } function setDelay(uint delay_) public { } function acceptAdmin() public { } function setPendingAdmin(address pendingAdmin_) public { } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(<FILL_ME>) queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = (target.call{value:value})(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { } }
getBlockTimestamp()<=eta.add(GRACE_PERIOD),"Timelock::executeTransaction: Transaction is stale."
2,324
getBlockTimestamp()<=eta.add(GRACE_PERIOD)
"Ether value sent is not correct"
// SPDX-License-Identifier: MIT pragma solidity >0.5.2; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol'; contract RareBlocks is ERC721, ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; using Strings for uint256; string _baseTokenURI = 'https://rareblocks.xyz/api/metadata/'; uint256 private _price = 0.08 ether; uint256 RESERVED_FOUNDING_MEMBERS = 15; uint256 ACCESS_PASS_SUPPLY = 500; bool public preMintIsActive = false; bool public openMintIsActive = false; Counters.Counter private _tokenIdCounter; event Mint(address indexed _address, uint256 tokenId); mapping(address => uint8) private _allowList; constructor() ERC721("RareBlocks Access Pass", "RAREBLOCKS") { } function setAllowList(address[] calldata addresses) external onlyOwner { } function setPreMintActive(bool _preMintIsActive) external onlyOwner { } function setOpenMintActive(bool _openMintIsActive) external onlyOwner { } function preMint(address _to, uint8 numberOfTokens) whenNotPaused public payable { require(preMintIsActive, "Premint is not active"); require(<FILL_ME>) require(_tokenIdCounter.current() + numberOfTokens <= ACCESS_PASS_SUPPLY, "Can't mint over supply limit"); require(numberOfTokens <= _allowList[_to], "Exceeded max available to purchase"); _allowList[_to] -= numberOfTokens; for (uint256 i = 0; i < numberOfTokens; i++) { _tokenIdCounter.increment(); _safeMint(_to, _tokenIdCounter.current()); emit Mint(_to, _tokenIdCounter.current()); } } function mint(address _to, uint8 numberOfTokens) whenNotPaused public payable { } function getBalance() external view returns(uint) { } function isAllowedToMint(address _address) external view returns(bool) { } function getPrice() external view returns (uint256) { } function getTokenCount() external view returns (uint256) { } function getAccessPassSupply() external view returns (uint256) { } function setPrice(uint256 price) public onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal override view returns (string memory) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } function _safeMint(address to) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function hasAccessPassToken(address wallet) public view returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_price*numberOfTokens<=msg.value,"Ether value sent is not correct"
2,326
_price*numberOfTokens<=msg.value
"Can't mint over supply limit"
// SPDX-License-Identifier: MIT pragma solidity >0.5.2; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol'; contract RareBlocks is ERC721, ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; using Strings for uint256; string _baseTokenURI = 'https://rareblocks.xyz/api/metadata/'; uint256 private _price = 0.08 ether; uint256 RESERVED_FOUNDING_MEMBERS = 15; uint256 ACCESS_PASS_SUPPLY = 500; bool public preMintIsActive = false; bool public openMintIsActive = false; Counters.Counter private _tokenIdCounter; event Mint(address indexed _address, uint256 tokenId); mapping(address => uint8) private _allowList; constructor() ERC721("RareBlocks Access Pass", "RAREBLOCKS") { } function setAllowList(address[] calldata addresses) external onlyOwner { } function setPreMintActive(bool _preMintIsActive) external onlyOwner { } function setOpenMintActive(bool _openMintIsActive) external onlyOwner { } function preMint(address _to, uint8 numberOfTokens) whenNotPaused public payable { require(preMintIsActive, "Premint is not active"); require(_price * numberOfTokens <= msg.value, "Ether value sent is not correct"); require(<FILL_ME>) require(numberOfTokens <= _allowList[_to], "Exceeded max available to purchase"); _allowList[_to] -= numberOfTokens; for (uint256 i = 0; i < numberOfTokens; i++) { _tokenIdCounter.increment(); _safeMint(_to, _tokenIdCounter.current()); emit Mint(_to, _tokenIdCounter.current()); } } function mint(address _to, uint8 numberOfTokens) whenNotPaused public payable { } function getBalance() external view returns(uint) { } function isAllowedToMint(address _address) external view returns(bool) { } function getPrice() external view returns (uint256) { } function getTokenCount() external view returns (uint256) { } function getAccessPassSupply() external view returns (uint256) { } function setPrice(uint256 price) public onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal override view returns (string memory) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } function _safeMint(address to) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function hasAccessPassToken(address wallet) public view returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_tokenIdCounter.current()+numberOfTokens<=ACCESS_PASS_SUPPLY,"Can't mint over supply limit"
2,326
_tokenIdCounter.current()+numberOfTokens<=ACCESS_PASS_SUPPLY
null
pragma solidity >=0.5.0; /** * @title MawCoin contract */ contract MawCoin is ERC20Capped, ERC20Detailed { uint noOfTokens = 30000000000; // 30,000,000,000(30B) // Address of maw coin vault // The vault will have all the maw coin issued. address internal vault; // Address of maw coin owner // The owner can change admin and vault address. address internal owner; // Address of maw coin admin // The admin can change reserve. The reserve is the amount of token // assigned to some address but not permitted to use. address internal admin; event OwnerChanged(address indexed previousOwner, address indexed newOwner); event VaultChanged(address indexed previousVault, address indexed newVault); event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event ReserveChanged(address indexed _address, uint amount); /** * @dev reserved number of tokens per each address * * To limit token transaction for some period by the admin, * each address' balance cannot become lower than this amount * */ mapping(address => uint) public reserves; /** * @dev modifier to limit access to the owner only */ modifier onlyOwner() { } /** * @dev limit access to the vault only */ modifier onlyVault() { } /** * @dev limit access to the admin only */ modifier onlyAdmin() { } /** * @dev limit access to owner or vault */ modifier onlyOwnerOrVault() { } /** * @dev initialize QRC20(ERC20) * * all token will deposit into the vault * later, the vault, owner will be multi sign contract to protect privileged operations * * @param _symbol token symbol * @param _name token name * @param _owner owner address * @param _admin admin address * @param _vault vault address * * Cap the mintable amount to 88.8B(88,800,000,000) * */ constructor (string memory _symbol, string memory _name, address _owner, address _admin, address _vault) ERC20Detailed(_name, _symbol, 9) ERC20Capped(88800000000000000000) public { require(<FILL_ME>) require(bytes(_name).length > 0); owner = _owner; admin = _admin; vault = _vault; // mint coins to the vault _mint(vault, noOfTokens * (10 ** uint(decimals()))); } /** * @dev change the amount of reserved token * * @param _address the target address whose token will be frozen for future use * @param _reserve the amount of reserved token * */ function setReserve(address _address, uint _reserve) public onlyAdmin { } /** * @dev transfer token from sender to other * the result balance should be greater than or equal to the reserved token amount */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev change vault address * * @param _newVault new vault address */ function setVault(address _newVault) public onlyOwner { } /** * @dev change owner address * @param _newOwner new owner address */ function setOwner(address _newOwner) public onlyVault { } /** * @dev change admin address * @param _newAdmin new admin address */ function setAdmin(address _newAdmin) public onlyOwnerOrVault { } /** * @dev Transfer tokens from one address to another * * The _from's maw balance should be larger than the reserved amount(reserves[_from]) plus _value. * * NOTE: no one can tranfer from vault * */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function getOwner() public view returns (address) { } function getVault() public view returns (address) { } function getAdmin() public view returns (address) { } function getOneMawCoin() public view returns (uint) { } /** * @dev get the amount of reserved token */ function reserveOf(address _address) public view returns (uint _reserve) { } /** * @dev get the amount reserved token of the sender */ function reserve() public view returns (uint _reserve) { } }
bytes(_symbol).length>0
2,342
bytes(_symbol).length>0
null
pragma solidity >=0.5.0; /** * @title MawCoin contract */ contract MawCoin is ERC20Capped, ERC20Detailed { uint noOfTokens = 30000000000; // 30,000,000,000(30B) // Address of maw coin vault // The vault will have all the maw coin issued. address internal vault; // Address of maw coin owner // The owner can change admin and vault address. address internal owner; // Address of maw coin admin // The admin can change reserve. The reserve is the amount of token // assigned to some address but not permitted to use. address internal admin; event OwnerChanged(address indexed previousOwner, address indexed newOwner); event VaultChanged(address indexed previousVault, address indexed newVault); event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event ReserveChanged(address indexed _address, uint amount); /** * @dev reserved number of tokens per each address * * To limit token transaction for some period by the admin, * each address' balance cannot become lower than this amount * */ mapping(address => uint) public reserves; /** * @dev modifier to limit access to the owner only */ modifier onlyOwner() { } /** * @dev limit access to the vault only */ modifier onlyVault() { } /** * @dev limit access to the admin only */ modifier onlyAdmin() { } /** * @dev limit access to owner or vault */ modifier onlyOwnerOrVault() { } /** * @dev initialize QRC20(ERC20) * * all token will deposit into the vault * later, the vault, owner will be multi sign contract to protect privileged operations * * @param _symbol token symbol * @param _name token name * @param _owner owner address * @param _admin admin address * @param _vault vault address * * Cap the mintable amount to 88.8B(88,800,000,000) * */ constructor (string memory _symbol, string memory _name, address _owner, address _admin, address _vault) ERC20Detailed(_name, _symbol, 9) ERC20Capped(88800000000000000000) public { require(bytes(_symbol).length > 0); require(<FILL_ME>) owner = _owner; admin = _admin; vault = _vault; // mint coins to the vault _mint(vault, noOfTokens * (10 ** uint(decimals()))); } /** * @dev change the amount of reserved token * * @param _address the target address whose token will be frozen for future use * @param _reserve the amount of reserved token * */ function setReserve(address _address, uint _reserve) public onlyAdmin { } /** * @dev transfer token from sender to other * the result balance should be greater than or equal to the reserved token amount */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev change vault address * * @param _newVault new vault address */ function setVault(address _newVault) public onlyOwner { } /** * @dev change owner address * @param _newOwner new owner address */ function setOwner(address _newOwner) public onlyVault { } /** * @dev change admin address * @param _newAdmin new admin address */ function setAdmin(address _newAdmin) public onlyOwnerOrVault { } /** * @dev Transfer tokens from one address to another * * The _from's maw balance should be larger than the reserved amount(reserves[_from]) plus _value. * * NOTE: no one can tranfer from vault * */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function getOwner() public view returns (address) { } function getVault() public view returns (address) { } function getAdmin() public view returns (address) { } function getOneMawCoin() public view returns (uint) { } /** * @dev get the amount of reserved token */ function reserveOf(address _address) public view returns (uint _reserve) { } /** * @dev get the amount reserved token of the sender */ function reserve() public view returns (uint _reserve) { } }
bytes(_name).length>0
2,342
bytes(_name).length>0
null
pragma solidity >=0.5.0; /** * @title MawCoin contract */ contract MawCoin is ERC20Capped, ERC20Detailed { uint noOfTokens = 30000000000; // 30,000,000,000(30B) // Address of maw coin vault // The vault will have all the maw coin issued. address internal vault; // Address of maw coin owner // The owner can change admin and vault address. address internal owner; // Address of maw coin admin // The admin can change reserve. The reserve is the amount of token // assigned to some address but not permitted to use. address internal admin; event OwnerChanged(address indexed previousOwner, address indexed newOwner); event VaultChanged(address indexed previousVault, address indexed newVault); event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event ReserveChanged(address indexed _address, uint amount); /** * @dev reserved number of tokens per each address * * To limit token transaction for some period by the admin, * each address' balance cannot become lower than this amount * */ mapping(address => uint) public reserves; /** * @dev modifier to limit access to the owner only */ modifier onlyOwner() { } /** * @dev limit access to the vault only */ modifier onlyVault() { } /** * @dev limit access to the admin only */ modifier onlyAdmin() { } /** * @dev limit access to owner or vault */ modifier onlyOwnerOrVault() { } /** * @dev initialize QRC20(ERC20) * * all token will deposit into the vault * later, the vault, owner will be multi sign contract to protect privileged operations * * @param _symbol token symbol * @param _name token name * @param _owner owner address * @param _admin admin address * @param _vault vault address * * Cap the mintable amount to 88.8B(88,800,000,000) * */ constructor (string memory _symbol, string memory _name, address _owner, address _admin, address _vault) ERC20Detailed(_name, _symbol, 9) ERC20Capped(88800000000000000000) public { } /** * @dev change the amount of reserved token * * @param _address the target address whose token will be frozen for future use * @param _reserve the amount of reserved token * */ function setReserve(address _address, uint _reserve) public onlyAdmin { } /** * @dev transfer token from sender to other * the result balance should be greater than or equal to the reserved token amount */ function transfer(address _to, uint256 _value) public returns (bool) { // check the reserve require(<FILL_ME>) return super.transfer(_to, _value); } /** * @dev change vault address * * @param _newVault new vault address */ function setVault(address _newVault) public onlyOwner { } /** * @dev change owner address * @param _newOwner new owner address */ function setOwner(address _newOwner) public onlyVault { } /** * @dev change admin address * @param _newAdmin new admin address */ function setAdmin(address _newAdmin) public onlyOwnerOrVault { } /** * @dev Transfer tokens from one address to another * * The _from's maw balance should be larger than the reserved amount(reserves[_from]) plus _value. * * NOTE: no one can tranfer from vault * */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function getOwner() public view returns (address) { } function getVault() public view returns (address) { } function getAdmin() public view returns (address) { } function getOneMawCoin() public view returns (uint) { } /** * @dev get the amount of reserved token */ function reserveOf(address _address) public view returns (uint _reserve) { } /** * @dev get the amount reserved token of the sender */ function reserve() public view returns (uint _reserve) { } }
balanceOf(msg.sender).sub(_value)>=reserveOf(msg.sender)
2,342
balanceOf(msg.sender).sub(_value)>=reserveOf(msg.sender)
"activateForFund: Max concentration exceeded"
// SPDX-License-Identifier: GPL-3.0 /* This file is part of the Enzyme Protocol. (c) Enzyme Council <council@enzyme.finance> For the full license information, please view the LICENSE file that was distributed with this source code. */ pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "../../../../core/fund/comptroller/ComptrollerLib.sol"; import "../../../../core/fund/vault/VaultLib.sol"; import "../../../../infrastructure/value-interpreter/ValueInterpreter.sol"; import "./utils/PostCallOnIntegrationValidatePolicyBase.sol"; /// @title MaxConcentration Contract /// @author Enzyme Council <security@enzyme.finance> /// @notice A policy that defines a configurable threshold for the concentration of any one asset /// in a fund's holdings contract MaxConcentration is PostCallOnIntegrationValidatePolicyBase { using SafeMath for uint256; event MaxConcentrationSet(address indexed comptrollerProxy, uint256 value); uint256 private constant ONE_HUNDRED_PERCENT = 10**18; // 100% address private immutable VALUE_INTERPRETER; mapping(address => uint256) private comptrollerProxyToMaxConcentration; constructor(address _policyManager, address _valueInterpreter) public PolicyBase(_policyManager) { } /// @notice Validates and initializes a policy as necessary prior to fund activation /// @param _comptrollerProxy The fund's ComptrollerProxy address /// @param _vaultProxy The fund's VaultProxy address /// @dev No need to authenticate access, as there are no state transitions function activateForFund(address _comptrollerProxy, address _vaultProxy) external override onlyPolicyManager { require(<FILL_ME>) } /// @notice Add the initial policy settings for a fund /// @param _comptrollerProxy The fund's ComptrollerProxy address /// @param _encodedSettings Encoded settings to apply to a fund function addFundSettings(address _comptrollerProxy, bytes calldata _encodedSettings) external override onlyPolicyManager { } /// @notice Provides a constant string identifier for a policy /// @return identifier_ The identifer string function identifier() external pure override returns (string memory identifier_) { } /// @notice Checks whether a particular condition passes the rule for a particular fund /// @param _comptrollerProxy The fund's ComptrollerProxy address /// @param _vaultProxy The fund's VaultProxy address /// @param _assets The assets with which to check the rule /// @return isValid_ True if the rule passes /// @dev The fund's denomination asset is exempt from the policy limit. function passesRule( address _comptrollerProxy, address _vaultProxy, address[] memory _assets ) public returns (bool isValid_) { } /// @notice Apply the rule with the specified parameters of a PolicyHook /// @param _comptrollerProxy The fund's ComptrollerProxy address /// @param _vaultProxy The fund's VaultProxy address /// @param _encodedArgs Encoded args with which to validate the rule /// @return isValid_ True if the rule passes function validateRule( address _comptrollerProxy, address _vaultProxy, IPolicyManager.PolicyHook, bytes calldata _encodedArgs ) external override returns (bool isValid_) { } /// @dev Helper to check if the rule holds for a particular asset. /// Avoids the stack-too-deep error. function __rulePassesForAsset( address _vaultProxy, address _denominationAsset, uint256 _maxConcentration, uint256 _totalGav, address _incomingAsset ) private returns (bool isValid_) { } /////////////////// // STATE GETTERS // /////////////////// /// @notice Gets the maxConcentration for a given fund /// @param _comptrollerProxy The ComptrollerProxy of the fund /// @return maxConcentration_ The maxConcentration function getMaxConcentrationForFund(address _comptrollerProxy) external view returns (uint256 maxConcentration_) { } /// @notice Gets the `VALUE_INTERPRETER` variable /// @return valueInterpreter_ The `VALUE_INTERPRETER` variable value function getValueInterpreter() external view returns (address valueInterpreter_) { } }
passesRule(_comptrollerProxy,_vaultProxy,VaultLib(_vaultProxy).getTrackedAssets()),"activateForFund: Max concentration exceeded"
2,369
passesRule(_comptrollerProxy,_vaultProxy,VaultLib(_vaultProxy).getTrackedAssets())
null
pragma solidity ^0.6.0; interface ERC20 { function totalSupply() external view returns (uint supply); function balanceOf(address _owner) external view returns (uint balance); function transfer(address _to, uint _value) external returns (bool success); function transferFrom(address _from, address _to, uint _value) external returns (bool success); function approve(address _spender, uint _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint remaining); function decimals() external view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } abstract contract SaverExchange { function swapTokenToToken( address _src, address _dest, uint256 _amount, uint256 _minPrice, uint256 _exchangeType, address _exchangeAddress, bytes memory _callData, uint256 _0xPrice ) virtual public; } contract Reserve { address ExchangeRedeemerAddr = 0x9523Fe0d1D488CaFDDfb3dcE28d7D177DDdBC300; function retreiveTokens(address _tokenAddr, uint _value) public { } } contract ExchangeRedeemer { address public owner; mapping(address => bool) public callers; address public constant DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F; event Redeemed(address user, address token, uint amount); Reserve reserve; constructor() public { } mapping (address => mapping(address => uint)) public balances; function redeemAllTokens(address[] memory _tokenAddr) public { } function redeemTokens(address _tokenAddr) public { } /// @dev Set fee = 0 for address(this) /// @dev Send a little bit of Dai to this address so we can go over the require > 0 function withdrawTokens(address _exchangeAddr, address _tokenAddr, address _user, uint _amount) public { require(<FILL_ME>) // require(success && tokens[0] > 0, "0x transaction failed"); ERC20(DAI_ADDRESS).transfer(_exchangeAddr, 1); // transfer 1 wei so we can go over this require SaverExchange(_exchangeAddr).swapTokenToToken( DAI_ADDRESS, DAI_ADDRESS, 0, // Exchange amount 0, // minPrice 4, // exchangeType _tokenAddr, // exchangeAddr abi.encodeWithSignature("transferFrom(address,address,uint256)", _user, address(reserve), _amount), 0 // 0xPrixe ); balances[_user][_tokenAddr] = _amount; } function addCallers(address _caller, bool _state) public { } function addReserve(address _reserve) public { } }
callers[msg.sender]
2,484
callers[msg.sender]
"Only called once"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; contract CustomPS is Context { bool public initialized; event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function init(address[] memory payees, uint256[] memory shares_) public { require(<FILL_ME>) require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } initialized = true; } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } }
!initialized,"Only called once"
2,559
!initialized
"PaymentSplitter: account has no shares"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; contract CustomPS is Context { bool public initialized; event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function init(address[] memory payees, uint256[] memory shares_) public { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(<FILL_ME>) uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } }
_shares[account]>0,"PaymentSplitter: account has no shares"
2,559
_shares[account]>0
"PaymentSplitter: account already has shares"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; contract CustomPS is Context { bool public initialized; event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function init(address[] memory payees, uint256[] memory shares_) public { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(<FILL_ME>) _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
_shares[account]==0,"PaymentSplitter: account already has shares"
2,559
_shares[account]==0
null
// pragma experimental ABIEncoderV2; pragma solidity ^0.5.0; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Token { // using SafeMath for uint256; //代币总量 uint256 public totalSupply; //获取账号余额 function balanceOf(address _owner) public view returns(uint256 balance); //转账 function transfer(address _to,uint256 _value) public returns(bool success); function transferFrom(address _from,address _to,uint256 _value)public returns(bool success); function approve(address _spender,uint256 _value)public returns(bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); //监听转账事件端口 event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract GHT is Token{ event Redeem(uint256 _amount); event AddedBlackList(address _addr); event RemovedBlackList(address _addr); // event Issue(uint amount); using SafeMath for uint256; //代币名称 string public name; //代币小数点 uint8 public decimals; //代币简称 string public symbol; //代币项目方 address public owner; //锁定账户 bool public deprecated; //设置账户模型 mapping(address=>uint256) public balances; mapping(address=>mapping (address=>uint256)) allowed; mapping (address => bool) public isBlackListed; //代币初始化 constructor(address _owner)public payable{ } modifier onlyOwner() { } function transferOwnership(address _newOwner)onlyOwner public { } function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function redeem(uint amount) public onlyOwner { require(totalSupply >= amount); require(<FILL_ME>) totalSupply -= amount; balances[owner] -= amount; emit Redeem(amount); } function pause()public onlyOwner{ } function unpause()public onlyOwner{ } //转账函数 function transfer(address _to,uint256 _value) public returns(bool success){ } //委托转账函数 function transferFrom(address _from,address _to,uint256 _value) public returns(bool){ } function balanceOf(address _owner)public view returns(uint256){ } function approve(address _spender,uint256 _value) public returns(bool success){ } //查询委托转币数量 function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function() payable external{} }
balances[owner]>=amount
2,583
balances[owner]>=amount
null
// pragma experimental ABIEncoderV2; pragma solidity ^0.5.0; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Token { // using SafeMath for uint256; //代币总量 uint256 public totalSupply; //获取账号余额 function balanceOf(address _owner) public view returns(uint256 balance); //转账 function transfer(address _to,uint256 _value) public returns(bool success); function transferFrom(address _from,address _to,uint256 _value)public returns(bool success); function approve(address _spender,uint256 _value)public returns(bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); //监听转账事件端口 event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract GHT is Token{ event Redeem(uint256 _amount); event AddedBlackList(address _addr); event RemovedBlackList(address _addr); // event Issue(uint amount); using SafeMath for uint256; //代币名称 string public name; //代币小数点 uint8 public decimals; //代币简称 string public symbol; //代币项目方 address public owner; //锁定账户 bool public deprecated; //设置账户模型 mapping(address=>uint256) public balances; mapping(address=>mapping (address=>uint256)) allowed; mapping (address => bool) public isBlackListed; //代币初始化 constructor(address _owner)public payable{ } modifier onlyOwner() { } function transferOwnership(address _newOwner)onlyOwner public { } function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function redeem(uint amount) public onlyOwner { } function pause()public onlyOwner{ } function unpause()public onlyOwner{ } //转账函数 function transfer(address _to,uint256 _value) public returns(bool success){ require(deprecated==false&&isBlackListed[msg.sender]==false); //判断余额 require(<FILL_ME>) //判断地址是否正确 require(msg.sender!=address(0)); balances[msg.sender]=balances[msg.sender].sub(_value); balances[_to]=balances[_to].add(_value); //触发转币交易事件 emit Transfer(msg.sender, _to, _value); return true; } //委托转账函数 function transferFrom(address _from,address _to,uint256 _value) public returns(bool){ } function balanceOf(address _owner)public view returns(uint256){ } function approve(address _spender,uint256 _value) public returns(bool success){ } //查询委托转币数量 function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function() payable external{} }
balances[msg.sender]>=_value&&balances[_to]+_value>balances[_to]
2,583
balances[msg.sender]>=_value&&balances[_to]+_value>balances[_to]
null
// pragma experimental ABIEncoderV2; pragma solidity ^0.5.0; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Token { // using SafeMath for uint256; //代币总量 uint256 public totalSupply; //获取账号余额 function balanceOf(address _owner) public view returns(uint256 balance); //转账 function transfer(address _to,uint256 _value) public returns(bool success); function transferFrom(address _from,address _to,uint256 _value)public returns(bool success); function approve(address _spender,uint256 _value)public returns(bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); //监听转账事件端口 event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract GHT is Token{ event Redeem(uint256 _amount); event AddedBlackList(address _addr); event RemovedBlackList(address _addr); // event Issue(uint amount); using SafeMath for uint256; //代币名称 string public name; //代币小数点 uint8 public decimals; //代币简称 string public symbol; //代币项目方 address public owner; //锁定账户 bool public deprecated; //设置账户模型 mapping(address=>uint256) public balances; mapping(address=>mapping (address=>uint256)) allowed; mapping (address => bool) public isBlackListed; //代币初始化 constructor(address _owner)public payable{ } modifier onlyOwner() { } function transferOwnership(address _newOwner)onlyOwner public { } function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function redeem(uint amount) public onlyOwner { } function pause()public onlyOwner{ } function unpause()public onlyOwner{ } //转账函数 function transfer(address _to,uint256 _value) public returns(bool success){ } //委托转账函数 function transferFrom(address _from,address _to,uint256 _value) public returns(bool){ require(deprecated==false&&isBlackListed[msg.sender]==false); require(<FILL_ME>) balances[_to]=balances[_to].add(_value); balances[_from]=balances[_from].sub(_value); allowed[_from][msg.sender]=allowed[_from][msg.sender].sub(_value); emit Transfer(_from,_to,_value); return true; } function balanceOf(address _owner)public view returns(uint256){ } function approve(address _spender,uint256 _value) public returns(bool success){ } //查询委托转币数量 function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function() payable external{} }
balances[_from]>=_value&&allowed[_from][msg.sender]>=_value
2,583
balances[_from]>=_value&&allowed[_from][msg.sender]>=_value
"Ownable: caller is not the owner"
pragma solidity =0.5.16; /** * @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 internal _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() { require(<FILL_ME>) _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } }
isOwner(),"Ownable: caller is not the owner"
2,586
isOwner()
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { require(key != address(0)); require(periods.length == percents.length); require(periods.length > 0); require(<FILL_ME>) require(initPercent <= percents[0]); for (uint256 i = 1; i < periods.length; i = i.add(1)) { require(periods[i.sub(1)] < periods[i]); require(percents[i.sub(1)] <= percents[i]); } require(percents[percents.length.sub(1)] == 100); FrozenChecker.Rule memory rule = FrozenChecker.Rule(0, initPercent, periods, percents); uint256 keyIndex = self.data[key].keyIndex; self.data[key].rule = rule; if (keyIndex > 0) { return false; } else { keyIndex = self.keys.length++; self.data[key].keyIndex = keyIndex.add(1); self.keys[keyIndex].key = key; self.size++; return true; } } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
periods[0]==uint256(0)
2,594
periods[0]==uint256(0)
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { require(key != address(0)); require(periods.length == percents.length); require(periods.length > 0); require(periods[0] == uint256(0)); require(initPercent <= percents[0]); for (uint256 i = 1; i < periods.length; i = i.add(1)) { require(<FILL_ME>) require(percents[i.sub(1)] <= percents[i]); } require(percents[percents.length.sub(1)] == 100); FrozenChecker.Rule memory rule = FrozenChecker.Rule(0, initPercent, periods, percents); uint256 keyIndex = self.data[key].keyIndex; self.data[key].rule = rule; if (keyIndex > 0) { return false; } else { keyIndex = self.keys.length++; self.data[key].keyIndex = keyIndex.add(1); self.keys[keyIndex].key = key; self.size++; return true; } } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
periods[i.sub(1)]<periods[i]
2,594
periods[i.sub(1)]<periods[i]
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { require(key != address(0)); require(periods.length == percents.length); require(periods.length > 0); require(periods[0] == uint256(0)); require(initPercent <= percents[0]); for (uint256 i = 1; i < periods.length; i = i.add(1)) { require(periods[i.sub(1)] < periods[i]); require(<FILL_ME>) } require(percents[percents.length.sub(1)] == 100); FrozenChecker.Rule memory rule = FrozenChecker.Rule(0, initPercent, periods, percents); uint256 keyIndex = self.data[key].keyIndex; self.data[key].rule = rule; if (keyIndex > 0) { return false; } else { keyIndex = self.keys.length++; self.data[key].keyIndex = keyIndex.add(1); self.keys[keyIndex].key = key; self.size++; return true; } } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
percents[i.sub(1)]<=percents[i]
2,594
percents[i.sub(1)]<=percents[i]
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { require(key != address(0)); require(periods.length == percents.length); require(periods.length > 0); require(periods[0] == uint256(0)); require(initPercent <= percents[0]); for (uint256 i = 1; i < periods.length; i = i.add(1)) { require(periods[i.sub(1)] < periods[i]); require(percents[i.sub(1)] <= percents[i]); } require(<FILL_ME>) FrozenChecker.Rule memory rule = FrozenChecker.Rule(0, initPercent, periods, percents); uint256 keyIndex = self.data[key].keyIndex; self.data[key].rule = rule; if (keyIndex > 0) { return false; } else { keyIndex = self.keys.length++; self.data[key].keyIndex = keyIndex.add(1); self.keys[keyIndex].key = key; self.size++; return true; } } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
percents[percents.length.sub(1)]==100
2,594
percents[percents.length.sub(1)]==100
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { require(<FILL_ME>) pausedPublic = newPausedPublic; pausedOwnerAdmin = newPausedOwnerAdmin; PausePublic(newPausedPublic); PauseOwnerAdmin(newPausedOwnerAdmin); } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
!(newPausedPublic==false&&newPausedOwnerAdmin==true)
2,594
!(newPausedPublic==false&&newPausedOwnerAdmin==true)
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { require(_to != 0x0); require(<FILL_ME>) require(now > frozenTimestamp[msg.sender]); require(balances[msg.sender].sub(_value) >= validator.validate(msg.sender)); if (validator.containRule(msg.sender) && msg.sender != _to) { validator.addFrozenBalance(msg.sender, _to, _value); } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
!frozenAccount[msg.sender]
2,594
!frozenAccount[msg.sender]
null
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library FrozenChecker { using SafeMath for uint256; /** * Rule for each address */ struct Rule { uint256 timeT; uint8 initPercent; uint256[] periods; uint8[] percents; } function check(Rule storage self, uint256 totalFrozenValue) internal view returns(uint256) { } } library FrozenValidator { using SafeMath for uint256; using FrozenChecker for FrozenChecker.Rule; struct Validator { mapping(address => IndexValue) data; KeyFlag[] keys; uint256 size; } struct IndexValue { uint256 keyIndex; FrozenChecker.Rule rule; mapping (address => uint256) frozenBalances; } struct KeyFlag { address key; bool deleted; } function addRule(Validator storage self, address key, uint8 initPercent, uint256[] periods, uint8[] percents) internal returns (bool replaced) { } function removeRule(Validator storage self, address key) internal returns (bool success) { } function containRule(Validator storage self, address key) internal view returns (bool) { } function addTimeT(Validator storage self, address addr, uint256 timeT) internal returns (bool) { } function addFrozenBalance(Validator storage self, address from, address to, uint256 value) internal returns (uint256) { } function validate(Validator storage self, address addr) internal returns (uint256) { } function iterateStart(Validator storage self) internal view returns (uint256 keyIndex) { } function iterateValid(Validator storage self, uint256 keyIndex) internal view returns (bool) { } function iterateNext(Validator storage self, uint256 keyIndex) internal view returns (uint256) { } function iterateGet(Validator storage self, uint256 keyIndex) internal view returns (address) { } } /** * @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) public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNotPaused() { } /** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */ function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract SEROToken is Pausable { using SafeMath for uint256; using FrozenValidator for FrozenValidator.Validator; string public name; string public symbol; uint8 public decimals = 9; uint256 public totalSupply; // Create array of all balances mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; // Create array of freeze account mapping (address => bool) frozenAccount; // Indefinite frozen account mapping (address => uint256) frozenTimestamp; // Timelimit frozen account // Freeze account using rule FrozenValidator.Validator validator; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); constructor(string tokenName, string tokenSymbol, uint256 totalTokenSupply ) public { } // Change admin function changeAdmin(address newAdmin) public onlyOwner returns (bool) { } // Get account frozen timestamp function getFrozenTimestamp(address _target) public view returns (uint256) { } // Check if the account is freezed indefinitely function getFrozenAccount(address _target) public view returns (bool) { } // Indefinite freeze account or unfreeze account(set _freeze to true) function freeze(address _target, bool _freeze) public returns (bool) { } // Timelimit freeze account or unfreeze account(set _timestamp to 0x0) function freezeWithTimestamp(address _target, uint256 _timestamp) public returns (bool) { } // Batch indefinite freeze account or unfreeze account function multiFreeze(address[] _targets, bool[] _freezes) public returns (bool) { } // Batch timelimit freeze account or unfreeze account function multiFreezeWithTimestamp(address[] _targets, uint256[] _timestamps) public returns (bool) { } /* Freeze or unfreeze account using rules */ function addRule(address addr, uint8 initPercent, uint256[] periods, uint8[] percents) public returns (bool) { } function addTimeT(address addr, uint256 timeT) public returns (bool) { } function removeRule(address addr) public returns (bool) { } function validate(address addr) public view returns (uint256) { } function queryRule(address addr) public view returns (uint256,uint8,uint256[],uint8[]) { } /* ERC20 interface */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function _transfer(address _to, uint256 _value) internal whenNotPaused { require(_to != 0x0); require(!frozenAccount[msg.sender]); require(now > frozenTimestamp[msg.sender]); require(<FILL_ME>) if (validator.containRule(msg.sender) && msg.sender != _to) { validator.addFrozenBalance(msg.sender, _to, _value); } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function multiTransfer(address[] _tos, uint256[] _values) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function approveAndCall(address _spender, uint256 _value, bytes _extraData) public whenNotPaused returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function kill() public { } }
balances[msg.sender].sub(_value)>=validator.validate(msg.sender)
2,594
balances[msg.sender].sub(_value)>=validator.validate(msg.sender)
"already known"
// SPDX-License-Identifier: MPL-2.0 pragma solidity 0.6.6; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/lib/contracts/libraries/FixedPoint.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol"; import "@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol"; import "./IBtcPriceOracle.sol"; // fixed window oracle that recomputes the average price for the entire period once every period // note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period contract BtcPriceOracle is OwnableUpgradeSafe, IBtcPriceOracle { using FixedPoint for *; uint256 public constant PERIOD = 20 minutes; event Price(uint256 price); address public immutable weth; address public immutable factory; // governance params address[] public referenceTokens; // working memory mapping(address => uint256) public priceCumulativeLast; uint32 public blockTimestampLast; FixedPoint.uq112x112 public priceAverage; constructor( address _factory, address _weth, address[] memory tokenizedBtcs ) public { } function _addPair( address tokenizedBtc, address _factory, address _weth ) internal { // check inputs require(tokenizedBtc != address(0), "zero token"); require(<FILL_ME>) // check pair IUniswapV2Pair pair = IUniswapV2Pair(UniswapV2Library.pairFor(_factory, _weth, tokenizedBtc)); require(address(pair) != address(0), "no pair"); uint112 reserve0; uint112 reserve1; (reserve0, reserve1, ) = pair.getReserves(); require(reserve0 != 0 && reserve1 != 0, "BtcOracle: NO_RESERVES"); // ensure that there's liquidity in the pair // fetch the current accumulated price value (0 / 1) priceCumulativeLast[tokenizedBtc] = (pair.token0() == _weth) ? pair.price1CumulativeLast() : pair.price0CumulativeLast(); // add to storage referenceTokens.push(tokenizedBtc); } function update() external { } // note this will always return 0 before update has been called successfully for the first time. function consult(uint256 amountIn) external override view returns (uint256 amountOut) { } // governance functions function addPair(address tokenizedBtc) external onlyOwner { } function removePair(address tokenizedBtc) external onlyOwner { } }
priceCumulativeLast[tokenizedBtc]==0,"already known"
2,736
priceCumulativeLast[tokenizedBtc]==0
"no pair"
// SPDX-License-Identifier: MPL-2.0 pragma solidity 0.6.6; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/lib/contracts/libraries/FixedPoint.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol"; import "@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol"; import "./IBtcPriceOracle.sol"; // fixed window oracle that recomputes the average price for the entire period once every period // note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period contract BtcPriceOracle is OwnableUpgradeSafe, IBtcPriceOracle { using FixedPoint for *; uint256 public constant PERIOD = 20 minutes; event Price(uint256 price); address public immutable weth; address public immutable factory; // governance params address[] public referenceTokens; // working memory mapping(address => uint256) public priceCumulativeLast; uint32 public blockTimestampLast; FixedPoint.uq112x112 public priceAverage; constructor( address _factory, address _weth, address[] memory tokenizedBtcs ) public { } function _addPair( address tokenizedBtc, address _factory, address _weth ) internal { // check inputs require(tokenizedBtc != address(0), "zero token"); require(priceCumulativeLast[tokenizedBtc] == 0, "already known"); // check pair IUniswapV2Pair pair = IUniswapV2Pair(UniswapV2Library.pairFor(_factory, _weth, tokenizedBtc)); require(<FILL_ME>) uint112 reserve0; uint112 reserve1; (reserve0, reserve1, ) = pair.getReserves(); require(reserve0 != 0 && reserve1 != 0, "BtcOracle: NO_RESERVES"); // ensure that there's liquidity in the pair // fetch the current accumulated price value (0 / 1) priceCumulativeLast[tokenizedBtc] = (pair.token0() == _weth) ? pair.price1CumulativeLast() : pair.price0CumulativeLast(); // add to storage referenceTokens.push(tokenizedBtc); } function update() external { } // note this will always return 0 before update has been called successfully for the first time. function consult(uint256 amountIn) external override view returns (uint256 amountOut) { } // governance functions function addPair(address tokenizedBtc) external onlyOwner { } function removePair(address tokenizedBtc) external onlyOwner { } }
address(pair)!=address(0),"no pair"
2,736
address(pair)!=address(0)
"ECOSYSTEM_PAUSED"
pragma solidity ^0.5.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, ReentrancyGuard, Ownable { using SafeMath for uint256; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 internal _totalSupply; constructor() public {} /******************** * Modifiers */ modifier whenNotPaused() { require(<FILL_ME>) _; } /** * @dev Throws if `account` is blacklisted * * @param account The address to check */ modifier notBlacklisted(address account) { } /******************** * Public Functions */ function pausable() public view returns (address); function blacklistable() public view returns (Blacklistable); /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer( address recipient, uint256 amount ) nonReentrant public returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve( address spender, uint256 amount ) public returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) nonReentrant public returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance( address spender, uint256 addedValue ) notBlacklisted(_msgSender()) notBlacklisted(spender) public returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance( address spender, uint256 subtractedValue ) notBlacklisted(_msgSender()) notBlacklisted(spender) public returns (bool) { } /************************** * Internal Functions */ /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. */ function mintToThisContract(uint256 amount) internal { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `address(this)` must have at least `amount` tokens. */ function burnFromThisContract(uint256 amount) internal { } }
!IPausable(pausable()).paused(),"ECOSYSTEM_PAUSED"
2,790
!IPausable(pausable()).paused()
"BLACKLISTED"
pragma solidity ^0.5.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, ReentrancyGuard, Ownable { using SafeMath for uint256; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 internal _totalSupply; constructor() public {} /******************** * Modifiers */ modifier whenNotPaused() { } /** * @dev Throws if `account` is blacklisted * * @param account The address to check */ modifier notBlacklisted(address account) { require(<FILL_ME>) _; } /******************** * Public Functions */ function pausable() public view returns (address); function blacklistable() public view returns (Blacklistable); /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer( address recipient, uint256 amount ) nonReentrant public returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve( address spender, uint256 amount ) public returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) nonReentrant public returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance( address spender, uint256 addedValue ) notBlacklisted(_msgSender()) notBlacklisted(spender) public returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance( address spender, uint256 subtractedValue ) notBlacklisted(_msgSender()) notBlacklisted(spender) public returns (bool) { } /************************** * Internal Functions */ /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. */ function mintToThisContract(uint256 amount) internal { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `address(this)` must have at least `amount` tokens. */ function burnFromThisContract(uint256 amount) internal { } }
Blacklistable(blacklistable()).isBlacklisted(account)==false,"BLACKLISTED"
2,790
Blacklistable(blacklistable()).isBlacklisted(account)==false
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { require(<FILL_ME>) return super.mint(_to, _amount); } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
totalSupply_.add(_amount)<=cap
2,946
totalSupply_.add(_amount)<=cap
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { require(_to != address(0)); require(<FILL_ME>) _to.transfer(_value); emit WithdrawEther(_to, _value); } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
address(this).balance>=_value
2,946
address(this).balance>=_value
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { require(<FILL_ME>) } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
_token.transfer(_to,_value)
2,946
_token.transfer(_to,_value)
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { require(<FILL_ME>) } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
_token.transferFrom(_from,_to,_value)
2,946
_token.transferFrom(_from,_to,_value)
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { require(<FILL_ME>) } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
_token.approve(_spender,_value)
2,946
_token.approve(_spender,_value)
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { require(<FILL_ME>) _; } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
isManager(msg.sender)
2,946
isManager(msg.sender)
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { require(_manager != address(0)); require(<FILL_ME>) managers.push(_manager); emit ManagerAdded(_manager); } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
!isManager(_manager)
2,946
!isManager(_manager)
null
/*! lk2.sol | (c) 2018 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */ pragma solidity 0.4.25; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } function mod(uint256 a, uint256 b) internal pure returns(uint256) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } constructor() public { } function _transferOwnership(address _newOwner) internal { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } } contract ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() public view returns(uint256); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); } contract StandardToken is ERC20 { using SafeMath for uint256; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals) public { } function totalSupply() public view returns(uint256) { } function balanceOf(address _owner) public view returns(uint256) { } function transfer(address _to, uint256 _value) public returns(bool) { } function multiTransfer(address[] _to, uint256[] _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256) { } function approve(address _spender, uint256 _value) public returns(bool) { } function increaseApproval(address _spender, uint _addedValue) public returns(bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns(bool) { } } contract MintableToken is StandardToken, Ownable { bool public mintingFinished = false; event Mint(address indexed to, uint256 amount); event MintFinished(); modifier canMint() { } modifier hasMintPermission() { } function mint(address _to, uint256 _amount) hasMintPermission canMint public returns(bool) { } function finishMinting() onlyOwner canMint public returns(bool) { } } contract CappedToken is MintableToken { uint256 public cap; constructor(uint256 _cap) public { } function mint(address _to, uint256 _amount) public returns(bool) { } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); function _burn(address _who, uint256 _value) internal { } function burn(uint256 _value) public { } function burnFrom(address _from, uint256 _value) public { } } contract Withdrawable is Ownable { event WithdrawEther(address indexed to, uint value); function withdrawEther(address _to, uint _value) onlyOwner public { } function withdrawTokensTransfer(ERC20 _token, address _to, uint256 _value) onlyOwner public { } function withdrawTokensTransferFrom(ERC20 _token, address _from, address _to, uint256 _value) onlyOwner public { } function withdrawTokensApprove(ERC20 _token, address _spender, uint256 _value) onlyOwner public { } } contract Pausable is Ownable { bool public paused = false; event Pause(); event Unpause(); modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Manageable is Ownable { address[] public managers; event ManagerAdded(address indexed manager); event ManagerRemoved(address indexed manager); modifier onlyManager() { } function countManagers() view public returns(uint) { } function getManagers() view public returns(address[]) { } function isManager(address _manager) view public returns(bool) { } function addManager(address _manager) onlyOwner public { } function removeManager(address _manager) onlyOwner public { } } contract RewardToken is StandardToken, Ownable { struct Payment { uint time; uint amount; } Payment[] public repayments; mapping(address => Payment[]) public rewards; event Repayment(address indexed from, uint256 amount); event Reward(address indexed to, uint256 amount); function repayment() onlyOwner payable public { } function _reward(address _to) private returns(bool) { } function reward() public returns(bool) { } function transfer(address _to, uint256 _value) public returns(bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } /* STO TOKEN FINEXPO */ contract Token is RewardToken, CappedToken, BurnableToken, Withdrawable { constructor() CappedToken(30000000 * 1e8) StandardToken("FINEXPO", "FNEX", 8) public { } } contract Crowdsale is Manageable, Withdrawable, Pausable { using SafeMath for uint; Token public token; bool public crowdsaleClosed = false; event ExternalPurchase(address indexed holder, string tx, string currency, uint256 currencyAmount, uint256 rateToEther, uint256 tokenAmount); event CrowdsaleClose(); constructor() public { } function externalPurchase(address _to, string _tx, string _currency, uint _value, uint256 _rate, uint256 _tokens) whenNotPaused onlyManager external { require(<FILL_ME>) require(_to != address(0)); token.mint(_to, _tokens); emit ExternalPurchase(_to, _tx, _currency, _value, _rate, _tokens); } function closeCrowdsale(address _newTokenOwner) onlyOwner external { } }
!crowdsaleClosed
2,946
!crowdsaleClosed
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract ClickableTVToken { function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool); } contract ClickableTV is Ownable { using SafeMath for uint256; // The token being sold ClickableTVToken public token; // start and end timestamps where investments are allowed (both inclusive) // uint256 public startTime = block.timestamp; // for test. Time of deploy smart-contract // uint256 public startTime = 1522540800; // for production. Timestamp 01 Apr 2018 00:00:00 UTC uint256 public presaleStart = 1516492800; // Sunday, 21-Jan-18 00:00:00 UTC uint256 public presaleEnd = 1519862399; // Wednesday, 28-Feb-18 23:59:59 UTC uint256 public saleStart = 1519862400; // Thursday, 01-Mar-18 00:00:00 UTC uint256 public saleEnd = 1527811199; // Thursday, 31-May-18 23:59:59 UTC // address where funds are collected address public wallet; // ICO Token Price – 1 CKTV = .001 ETH uint256 public rate = 1000; // amount of raised money in wei uint256 public weiRaised; function ClickableTV() public { } function setToken(ClickableTVToken _token) public onlyOwner { } // By default wallet == owner function setWallet(address _wallet) public onlyOwner { } function tokenWeiToSale() public view returns (uint256) { } function transfer(address _to, uint256 _value) public onlyOwner returns (bool){ } // fallback function can be used to buy tokens function() external payable { } /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); // low level token purchase function function buyTokens(address beneficiary) public payable { require(beneficiary != address(0)); require(<FILL_ME>) uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = weiAmount.mul(rate); // 25% discount of token price for the first six weeks during pre-sale if (block.timestamp < presaleEnd) tokens = tokens.mul(100).div(75); // update state weiRaised = weiRaised.add(weiAmount); token.transfer(beneficiary, tokens); TokenPurchase(msg.sender, beneficiary, weiAmount, tokens); forwardFunds(); } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { } // @return true if the transaction can buy tokens function validPurchase() internal view returns (bool) { } }
validPurchase()
3,003
validPurchase()
"target not a contract"
/** * Copyright 2017-2019, bZeroX, LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0. */ pragma solidity 0.5.8; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address _who) public view returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address _owner, address _spender) public view returns (uint256); function transferFrom(address _from, address _to, uint256 _value) public returns (bool); function approve(address _spender, uint256 _value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title EIP20/ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract EIP20 is ERC20 { string public name; uint8 public decimals; string public symbol; } contract WETHInterface is EIP20 { function deposit() external payable; function withdraw(uint256 wad) external; } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, rounding up and truncating the quotient */ function divCeil(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } } /** * @title 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) 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 Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <alexey@mixbytes.io> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev Constant for unlocked guard state - non-zero to prevent extra gas costs. /// See: https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1056 uint256 internal constant REENTRANCY_GUARD_FREE = 1; /// @dev Constant for locked guard state uint256 internal constant REENTRANCY_GUARD_LOCKED = 2; /** * @dev We use a single lock for the whole contract. */ uint256 internal reentrancyLock = REENTRANCY_GUARD_FREE; /** * @dev Prevents a contract from calling itself, directly or indirectly. * If you mark a function `nonReentrant`, you should also * mark it `external`. Calling one `nonReentrant` function from * another is not supported. Instead, you can implement a * `private` function doing the actual work, and an `external` * wrapper marked as `nonReentrant`. */ modifier nonReentrant() { } } contract LoanTokenizationV2 is ReentrancyGuard, Ownable { uint256 internal constant MAX_UINT = 2**256 - 1; string public name; string public symbol; uint8 public decimals; address public bZxContract; address public bZxVault; address public bZxOracle; address public wethContract; address public loanTokenAddress; bool public mintingPaused; bool public burningPaused; // price of token at last user checkpoint mapping (address => uint256) internal checkpointPrices_; function pauseMinting( bool _isPaused) public onlyOwner { } function pauseBurning( bool _isPaused) public onlyOwner { } } contract PositionTokenStorageV2 is LoanTokenizationV2 { bool internal isInitialized_ = false; address public loanTokenLender; address public tradeTokenAddress; uint256 public leverageAmount; bytes32 public loanOrderHash; uint256 public loanTokenDecimals; uint256 public loanTokenAdjustment; uint256 public tradeTokenDecimals; uint256 public tradeTokenAdjustment; uint256 public initialPrice; bool public shortPosition; mapping (address => uint256) public userSurplus; mapping (address => uint256) public userDeficit; uint256 public totalSurplus; uint256 public totalDeficit; } contract SplittableTokenStorageV2 is PositionTokenStorageV2 { using SafeMath for uint256; event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); event Mint( address indexed minter, address indexed depositAddress, uint256 depositAmount, uint256 tokenAmount, uint256 price ); event Burn( address indexed burner, address indexed withdrawalAddress, uint256 withdrawalAmount, uint256 tokenAmount, uint256 price ); mapping(address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 internal totalSupply_; uint256 public splitFactor = 10**18; 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 normalize( uint256 _value) internal view returns (uint256) { } function denormalize( uint256 _value) internal view returns (uint256) { } } contract PositionTokenV2 is SplittableTokenStorageV2 { address internal target_; constructor( address _newTarget) public { } function() external payable { } function setTarget( address _newTarget) public onlyOwner { } function _setTarget( address _newTarget) internal { require(<FILL_ME>) target_ = _newTarget; } function _isContract( address addr) internal view returns (bool) { } }
_isContract(_newTarget),"target not a contract"
3,031
_isContract(_newTarget)