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.4.20;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library safeMath
{
function mul(uint256 a, uint256 b) internal pure returns (uint256)
{
}
function add(uint256 a, uint256 b) internal pure returns (uint256)
{
}
}
contract Event
{
event Transfer(address indexed from, address indexed to, uint256 value);
event Deposit(address indexed sender, uint256 amount , string status);
event TokenBurn(address indexed from, uint256 value);
event TokenAdd(address indexed from, uint256 value);
event Set_Status(string changedStatus);
event Set_TokenReward(uint256 changedTokenReward);
event Set_TimeStamp(uint256 ICO_startingTime, uint256 ICO_closingTime);
event WithdrawETH(uint256 amount);
event BlockedAddress(address blockedAddress);
event TempLockedAddress(address tempLockAddress, uint256 unlockTime);
}
contract Variable
{
string public name;
string public symbol;
uint256 public decimals;
uint256 public totalSupply;
address public owner;
string public status;
uint256 internal _decimals;
uint256 internal tokenReward;
uint256 internal ICO_startingTime;
uint256 internal ICO_closingTime;
bool internal transferLock;
bool internal depositLock;
mapping (address => bool) public allowedAddress;
mapping (address => bool) public blockedAddress;
mapping (address => uint256) public tempLockedAddress;
address withdraw_wallet;
mapping (address => uint256) public balanceOf;
constructor() public
{
}
}
contract Modifiers is Variable
{
modifier isOwner
{
}
modifier isValidAddress
{
}
}
contract Set is Variable, Modifiers, Event
{
function setStatus(string _status) public isOwner returns(bool success)
{
}
function setTokenReward(uint256 _tokenReward) public isOwner returns(bool success)
{
}
function setTimeStamp(uint256 _ICO_startingTime,uint256 _ICO_closingTime) public isOwner returns(bool success)
{
}
function setTransferLock(bool _transferLock) public isOwner returns(bool success)
{
}
function setDepositLock(bool _depositLock) public isOwner returns(bool success)
{
}
function setTimeStampStatus(uint256 _ICO_startingTime, uint256 _ICO_closingTime, string _status) public isOwner returns(bool success)
{
}
}
contract manageAddress is Variable, Modifiers, Event
{
function add_allowedAddress(address _address) public isOwner
{
}
function add_blockedAddress(address _address) public isOwner
{
}
function delete_allowedAddress(address _address) public isOwner
{
}
function delete_blockedAddress(address _address) public isOwner
{
}
}
contract Get is Variable, Modifiers
{
function get_tokenTime() public view returns(uint256 start, uint256 stop)
{
}
function get_transferLock() public view returns(bool)
{
}
function get_depositLock() public view returns(bool)
{
}
function get_tokenReward() public view returns(uint256)
{
}
}
contract Admin is Variable, Modifiers, Event
{
function admin_transfer_tempLockAddress(address _to, uint256 _value, uint256 _unlockTime) public isOwner returns(bool success)
{
}
function admin_transferFrom(address _from, address _to, uint256 _value) public isOwner returns(bool success)
{
}
function admin_tokenBurn(uint256 _value) public isOwner returns(bool success)
{
}
function admin_tokenAdd(uint256 _value) public isOwner returns(bool success)
{
}
function admin_renewLockedAddress(address _address, uint256 _unlockTime) public isOwner returns(bool success)
{
}
}
contract GMB is Variable, Event, Get, Set, Admin, manageAddress
{
using safeMath for uint256;
function() payable public
{
}
function transfer(address _to, uint256 _value) public isValidAddress
{
require(allowedAddress[msg.sender] || transferLock == false);
require(tempLockedAddress[msg.sender] < block.timestamp);
require(!blockedAddress[msg.sender] && !blockedAddress[_to]);
require(balanceOf[msg.sender] >= _value);
require(<FILL_ME>)
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
emit Transfer(msg.sender, _to, _value);
}
function ETH_withdraw(uint256 amount) public isOwner returns(bool)
{
}
}
| (balanceOf[_to].add(_value))>=balanceOf[_to] | 280,961 | (balanceOf[_to].add(_value))>=balanceOf[_to] |
"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract" | /*
Please note, there are 3 native components to this token design. Token, Router, and Core.
Each component is deployed separately as an external contract.
This is the main code of a mutable token contract.
The Router component is the mutable part and it can be re-routed should there be any code updates.
Any other contract is also external and it must be additionally registered and routed within the native components.
The main idea of this design was to follow the adjusted Proxy and the MVC design patterns.
*/
// SPDX-License-Identifier: MIT
pragma solidity = 0.7 .0;
abstract contract Context {
function _msgSender() internal view virtual returns(address payable) {
}
function _msgData() internal view virtual returns(bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IERC20 {
function currentCoreContract() external view returns(address routerAddress);
function currentTokenContract() external view returns(address routerAddress);
function getExternalContractAddress(string memory contractName) external view returns(address routerAddress);
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) external returns(bool success);
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
}
abstract contract Core {
// native core functions
function transfer(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function approve(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function increaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function decreaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function transferFrom(address[3] memory addressArr, uint[3] memory uintArr) external virtual returns(bool success);
//non-native core functions
function mint(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function burn(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function updateTotalSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateCurrentSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateJointSupply(uint[2] memory uintArr) external virtual returns(bool success);
}
//============================================================================================
// MAIN CONTRACT
//============================================================================================
contract Router is Ownable, IERC20 {
address public tokenContract;
address public coreContract;
Core private core;
mapping(string => address) public externalContracts; //for non-native functions
//============== NATIVE FUNCTIONS START HERE ==================================================
//These functions should never change when introducing a new version of a router.
//Router is expected to constantly change, and the code should be written under
//the "NON-CORE FUNCTIONS TO BE CODED BELOW".
function equals(string memory a, string memory b) internal view virtual returns(bool isEqual) {
}
function currentTokenContract() override external view virtual returns(address routerAddress) {
}
function currentCoreContract() override external view virtual returns(address routerAddress) {
}
function getExternalContractAddress(string memory contractName) override external view virtual returns(address routerAddress) {
}
//function is not needed if token address is hard-coded in a constructor
function setNewTokenContract(address newTokenAddress) onlyOwner public virtual returns(bool success) {
}
function setNewCoreContract(address newCoreAddress) onlyOwner public virtual returns(bool success) {
}
function setNewExternalContract(string memory contractName, address newContractAddress) onlyOwner public virtual returns(bool success) {
}
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
}
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) override external virtual returns(bool success) {
}
//============== NATIVE FUNCTIONS END HERE ==================================================
//=============== NON-NATIVE ROUTES TO BE CODED BELOW =======================================
// This code is a subject to a change, should we decide to alter anything.
// We can also design another external router, possibilities are infinite.
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
if (equals(route, "mint")) {
require(<FILL_ME>)
core.mint(addressArr, uintArr);
} else if (equals(route, "burn")) {
require(externalContracts["burn"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract");
core.burn(addressArr, uintArr);
} else if (equals(route, "updateTotalSupply")){
require(externalContracts["updateTotalSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract");
core.updateTotalSupply(uintArr);
} else if (equals (route, "updateCurrentSupply")){
require(externalContracts["updateCurrentSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract");
core.updateCurrentSupply(uintArr);
} else if (equals (route, "updateJointSupply")){
require(externalContracts["updateJointSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract");
core.updateJointSupply(uintArr);
}
return true;
}
}
| externalContracts["mint"]==msg.sender,"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract" | 281,028 | externalContracts["mint"]==msg.sender |
"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract" | /*
Please note, there are 3 native components to this token design. Token, Router, and Core.
Each component is deployed separately as an external contract.
This is the main code of a mutable token contract.
The Router component is the mutable part and it can be re-routed should there be any code updates.
Any other contract is also external and it must be additionally registered and routed within the native components.
The main idea of this design was to follow the adjusted Proxy and the MVC design patterns.
*/
// SPDX-License-Identifier: MIT
pragma solidity = 0.7 .0;
abstract contract Context {
function _msgSender() internal view virtual returns(address payable) {
}
function _msgData() internal view virtual returns(bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IERC20 {
function currentCoreContract() external view returns(address routerAddress);
function currentTokenContract() external view returns(address routerAddress);
function getExternalContractAddress(string memory contractName) external view returns(address routerAddress);
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) external returns(bool success);
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
}
abstract contract Core {
// native core functions
function transfer(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function approve(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function increaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function decreaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function transferFrom(address[3] memory addressArr, uint[3] memory uintArr) external virtual returns(bool success);
//non-native core functions
function mint(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function burn(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function updateTotalSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateCurrentSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateJointSupply(uint[2] memory uintArr) external virtual returns(bool success);
}
//============================================================================================
// MAIN CONTRACT
//============================================================================================
contract Router is Ownable, IERC20 {
address public tokenContract;
address public coreContract;
Core private core;
mapping(string => address) public externalContracts; //for non-native functions
//============== NATIVE FUNCTIONS START HERE ==================================================
//These functions should never change when introducing a new version of a router.
//Router is expected to constantly change, and the code should be written under
//the "NON-CORE FUNCTIONS TO BE CODED BELOW".
function equals(string memory a, string memory b) internal view virtual returns(bool isEqual) {
}
function currentTokenContract() override external view virtual returns(address routerAddress) {
}
function currentCoreContract() override external view virtual returns(address routerAddress) {
}
function getExternalContractAddress(string memory contractName) override external view virtual returns(address routerAddress) {
}
//function is not needed if token address is hard-coded in a constructor
function setNewTokenContract(address newTokenAddress) onlyOwner public virtual returns(bool success) {
}
function setNewCoreContract(address newCoreAddress) onlyOwner public virtual returns(bool success) {
}
function setNewExternalContract(string memory contractName, address newContractAddress) onlyOwner public virtual returns(bool success) {
}
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
}
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) override external virtual returns(bool success) {
}
//============== NATIVE FUNCTIONS END HERE ==================================================
//=============== NON-NATIVE ROUTES TO BE CODED BELOW =======================================
// This code is a subject to a change, should we decide to alter anything.
// We can also design another external router, possibilities are infinite.
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
if (equals(route, "mint")) {
require(externalContracts["mint"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract");
core.mint(addressArr, uintArr);
} else if (equals(route, "burn")) {
require(<FILL_ME>)
core.burn(addressArr, uintArr);
} else if (equals(route, "updateTotalSupply")){
require(externalContracts["updateTotalSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract");
core.updateTotalSupply(uintArr);
} else if (equals (route, "updateCurrentSupply")){
require(externalContracts["updateCurrentSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract");
core.updateCurrentSupply(uintArr);
} else if (equals (route, "updateJointSupply")){
require(externalContracts["updateJointSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract");
core.updateJointSupply(uintArr);
}
return true;
}
}
| externalContracts["burn"]==msg.sender,"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract" | 281,028 | externalContracts["burn"]==msg.sender |
"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract" | /*
Please note, there are 3 native components to this token design. Token, Router, and Core.
Each component is deployed separately as an external contract.
This is the main code of a mutable token contract.
The Router component is the mutable part and it can be re-routed should there be any code updates.
Any other contract is also external and it must be additionally registered and routed within the native components.
The main idea of this design was to follow the adjusted Proxy and the MVC design patterns.
*/
// SPDX-License-Identifier: MIT
pragma solidity = 0.7 .0;
abstract contract Context {
function _msgSender() internal view virtual returns(address payable) {
}
function _msgData() internal view virtual returns(bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IERC20 {
function currentCoreContract() external view returns(address routerAddress);
function currentTokenContract() external view returns(address routerAddress);
function getExternalContractAddress(string memory contractName) external view returns(address routerAddress);
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) external returns(bool success);
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
}
abstract contract Core {
// native core functions
function transfer(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function approve(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function increaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function decreaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function transferFrom(address[3] memory addressArr, uint[3] memory uintArr) external virtual returns(bool success);
//non-native core functions
function mint(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function burn(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function updateTotalSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateCurrentSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateJointSupply(uint[2] memory uintArr) external virtual returns(bool success);
}
//============================================================================================
// MAIN CONTRACT
//============================================================================================
contract Router is Ownable, IERC20 {
address public tokenContract;
address public coreContract;
Core private core;
mapping(string => address) public externalContracts; //for non-native functions
//============== NATIVE FUNCTIONS START HERE ==================================================
//These functions should never change when introducing a new version of a router.
//Router is expected to constantly change, and the code should be written under
//the "NON-CORE FUNCTIONS TO BE CODED BELOW".
function equals(string memory a, string memory b) internal view virtual returns(bool isEqual) {
}
function currentTokenContract() override external view virtual returns(address routerAddress) {
}
function currentCoreContract() override external view virtual returns(address routerAddress) {
}
function getExternalContractAddress(string memory contractName) override external view virtual returns(address routerAddress) {
}
//function is not needed if token address is hard-coded in a constructor
function setNewTokenContract(address newTokenAddress) onlyOwner public virtual returns(bool success) {
}
function setNewCoreContract(address newCoreAddress) onlyOwner public virtual returns(bool success) {
}
function setNewExternalContract(string memory contractName, address newContractAddress) onlyOwner public virtual returns(bool success) {
}
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
}
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) override external virtual returns(bool success) {
}
//============== NATIVE FUNCTIONS END HERE ==================================================
//=============== NON-NATIVE ROUTES TO BE CODED BELOW =======================================
// This code is a subject to a change, should we decide to alter anything.
// We can also design another external router, possibilities are infinite.
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
if (equals(route, "mint")) {
require(externalContracts["mint"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract");
core.mint(addressArr, uintArr);
} else if (equals(route, "burn")) {
require(externalContracts["burn"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract");
core.burn(addressArr, uintArr);
} else if (equals(route, "updateTotalSupply")){
require(<FILL_ME>)
core.updateTotalSupply(uintArr);
} else if (equals (route, "updateCurrentSupply")){
require(externalContracts["updateCurrentSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract");
core.updateCurrentSupply(uintArr);
} else if (equals (route, "updateJointSupply")){
require(externalContracts["updateJointSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract");
core.updateJointSupply(uintArr);
}
return true;
}
}
| externalContracts["updateTotalSupply"]==msg.sender,"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract" | 281,028 | externalContracts["updateTotalSupply"]==msg.sender |
"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract" | /*
Please note, there are 3 native components to this token design. Token, Router, and Core.
Each component is deployed separately as an external contract.
This is the main code of a mutable token contract.
The Router component is the mutable part and it can be re-routed should there be any code updates.
Any other contract is also external and it must be additionally registered and routed within the native components.
The main idea of this design was to follow the adjusted Proxy and the MVC design patterns.
*/
// SPDX-License-Identifier: MIT
pragma solidity = 0.7 .0;
abstract contract Context {
function _msgSender() internal view virtual returns(address payable) {
}
function _msgData() internal view virtual returns(bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IERC20 {
function currentCoreContract() external view returns(address routerAddress);
function currentTokenContract() external view returns(address routerAddress);
function getExternalContractAddress(string memory contractName) external view returns(address routerAddress);
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) external returns(bool success);
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
}
abstract contract Core {
// native core functions
function transfer(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function approve(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function increaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function decreaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function transferFrom(address[3] memory addressArr, uint[3] memory uintArr) external virtual returns(bool success);
//non-native core functions
function mint(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function burn(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function updateTotalSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateCurrentSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateJointSupply(uint[2] memory uintArr) external virtual returns(bool success);
}
//============================================================================================
// MAIN CONTRACT
//============================================================================================
contract Router is Ownable, IERC20 {
address public tokenContract;
address public coreContract;
Core private core;
mapping(string => address) public externalContracts; //for non-native functions
//============== NATIVE FUNCTIONS START HERE ==================================================
//These functions should never change when introducing a new version of a router.
//Router is expected to constantly change, and the code should be written under
//the "NON-CORE FUNCTIONS TO BE CODED BELOW".
function equals(string memory a, string memory b) internal view virtual returns(bool isEqual) {
}
function currentTokenContract() override external view virtual returns(address routerAddress) {
}
function currentCoreContract() override external view virtual returns(address routerAddress) {
}
function getExternalContractAddress(string memory contractName) override external view virtual returns(address routerAddress) {
}
//function is not needed if token address is hard-coded in a constructor
function setNewTokenContract(address newTokenAddress) onlyOwner public virtual returns(bool success) {
}
function setNewCoreContract(address newCoreAddress) onlyOwner public virtual returns(bool success) {
}
function setNewExternalContract(string memory contractName, address newContractAddress) onlyOwner public virtual returns(bool success) {
}
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
}
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) override external virtual returns(bool success) {
}
//============== NATIVE FUNCTIONS END HERE ==================================================
//=============== NON-NATIVE ROUTES TO BE CODED BELOW =======================================
// This code is a subject to a change, should we decide to alter anything.
// We can also design another external router, possibilities are infinite.
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
if (equals(route, "mint")) {
require(externalContracts["mint"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract");
core.mint(addressArr, uintArr);
} else if (equals(route, "burn")) {
require(externalContracts["burn"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract");
core.burn(addressArr, uintArr);
} else if (equals(route, "updateTotalSupply")){
require(externalContracts["updateTotalSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract");
core.updateTotalSupply(uintArr);
} else if (equals (route, "updateCurrentSupply")){
require(<FILL_ME>)
core.updateCurrentSupply(uintArr);
} else if (equals (route, "updateJointSupply")){
require(externalContracts["updateJointSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract");
core.updateJointSupply(uintArr);
}
return true;
}
}
| externalContracts["updateCurrentSupply"]==msg.sender,"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract" | 281,028 | externalContracts["updateCurrentSupply"]==msg.sender |
"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract" | /*
Please note, there are 3 native components to this token design. Token, Router, and Core.
Each component is deployed separately as an external contract.
This is the main code of a mutable token contract.
The Router component is the mutable part and it can be re-routed should there be any code updates.
Any other contract is also external and it must be additionally registered and routed within the native components.
The main idea of this design was to follow the adjusted Proxy and the MVC design patterns.
*/
// SPDX-License-Identifier: MIT
pragma solidity = 0.7 .0;
abstract contract Context {
function _msgSender() internal view virtual returns(address payable) {
}
function _msgData() internal view virtual returns(bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
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 {
}
}
interface IERC20 {
function currentCoreContract() external view returns(address routerAddress);
function currentTokenContract() external view returns(address routerAddress);
function getExternalContractAddress(string memory contractName) external view returns(address routerAddress);
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) external returns(bool success);
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) external returns(bool success);
}
abstract contract Core {
// native core functions
function transfer(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function approve(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function increaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function decreaseAllowance(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function transferFrom(address[3] memory addressArr, uint[3] memory uintArr) external virtual returns(bool success);
//non-native core functions
function mint(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function burn(address[2] memory addressArr, uint[2] memory uintArr) external virtual returns(bool success);
function updateTotalSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateCurrentSupply(uint[2] memory uintArr) external virtual returns(bool success);
function updateJointSupply(uint[2] memory uintArr) external virtual returns(bool success);
}
//============================================================================================
// MAIN CONTRACT
//============================================================================================
contract Router is Ownable, IERC20 {
address public tokenContract;
address public coreContract;
Core private core;
mapping(string => address) public externalContracts; //for non-native functions
//============== NATIVE FUNCTIONS START HERE ==================================================
//These functions should never change when introducing a new version of a router.
//Router is expected to constantly change, and the code should be written under
//the "NON-CORE FUNCTIONS TO BE CODED BELOW".
function equals(string memory a, string memory b) internal view virtual returns(bool isEqual) {
}
function currentTokenContract() override external view virtual returns(address routerAddress) {
}
function currentCoreContract() override external view virtual returns(address routerAddress) {
}
function getExternalContractAddress(string memory contractName) override external view virtual returns(address routerAddress) {
}
//function is not needed if token address is hard-coded in a constructor
function setNewTokenContract(address newTokenAddress) onlyOwner public virtual returns(bool success) {
}
function setNewCoreContract(address newCoreAddress) onlyOwner public virtual returns(bool success) {
}
function setNewExternalContract(string memory contractName, address newContractAddress) onlyOwner public virtual returns(bool success) {
}
function callRouter(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
}
function _callRouter(string memory route, address[3] memory addressArr, uint[3] memory uintArr) override external virtual returns(bool success) {
}
//============== NATIVE FUNCTIONS END HERE ==================================================
//=============== NON-NATIVE ROUTES TO BE CODED BELOW =======================================
// This code is a subject to a change, should we decide to alter anything.
// We can also design another external router, possibilities are infinite.
function extrenalRouterCall(string memory route, address[2] memory addressArr, uint[2] memory uintArr) override external virtual returns(bool success) {
if (equals(route, "mint")) {
require(externalContracts["mint"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'mint' contract");
core.mint(addressArr, uintArr);
} else if (equals(route, "burn")) {
require(externalContracts["burn"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'burn' contract");
core.burn(addressArr, uintArr);
} else if (equals(route, "updateTotalSupply")){
require(externalContracts["updateTotalSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateTotalSupply' contract");
core.updateTotalSupply(uintArr);
} else if (equals (route, "updateCurrentSupply")){
require(externalContracts["updateCurrentSupply"] == msg.sender, "at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateCurrentSupply' contract");
core.updateCurrentSupply(uintArr);
} else if (equals (route, "updateJointSupply")){
require(<FILL_ME>)
core.updateJointSupply(uintArr);
}
return true;
}
}
| externalContracts["updateJointSupply"]==msg.sender,"at: router.sol | contract: Router | function: extrenalRouterCall | message: Must be called by the registered external 'updateJointSupply' contract" | 281,028 | externalContracts["updateJointSupply"]==msg.sender |
"The contract did not receive enough Ethereum" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// import statements
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
// contract class
contract Heartz is ERC721Enumerable, Ownable {
// utilities
using Strings for uint256;
using SafeMath for uint256;
// uint256
uint256 public constant nftPrice = 50000000000000000;
uint256 public constant maxNftPurchase = 20;
uint256 public maxSupply = 7499;
uint256 public nftPerAddressLimit = 5;
// booleans
bool public saleIsActive = false; // false
bool public publicMintingStatus = false; // false
bool public onlyWhitelisted = true; // true
bool public revealed = false;
// addresses
address[] public whitelistAddresses;
// strings
string public baseURI;
// mappings
mapping(uint256 => string) _tokenURIs;
// contract constructor
constructor() ERC721("Heartz", "HRTZ") {}
// get functions
function getBalance() public view returns (uint256) {
}
function getWhitelistedAddresses() public view returns (address[] memory) {
}
function getBaseURI() internal view virtual returns (string memory) {
}
// set functions
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function reveal() public onlyOwner {
}
function flipPublicMintingStatus() public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipOnlyWhitelisted() public onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI)
internal
virtual
{
}
// unnecessarily long mint function
function mint(uint256 numberOfTokens) public payable {
require(
numberOfTokens > 0,
"The number of tokens can not be less than or equal to 0"
);
require(
totalSupply().add(numberOfTokens) <= maxSupply,
"The purchase would exceed the max supply of Heartz"
);
if (msg.sender != owner()) {
require(
numberOfTokens <= maxNftPurchase,
"The contract can only mint up to 20 tokens at a time"
);
require(<FILL_ME>)
require(saleIsActive, "The contract sale is not active");
if (publicMintingStatus) {
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
} else if (onlyWhitelisted) {
require(
isWhitelisted(msg.sender),
"The user is not currently whitelisted"
);
require(
(balanceOf(msg.sender) < nftPerAddressLimit) &&
(numberOfTokens <=
(nftPerAddressLimit.sub(balanceOf(msg.sender)))),
"The contract can only mint up to 5 tokens at a time"
);
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
}
} else {
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
}
}
// token URI retriever
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// classic withdraw function
function withdraw() public payable onlyOwner {
}
// check if specified user is whitelisted
function isWhitelisted(address user) public view returns (bool) {
}
// generate list of whitelist users
function whitelistUsers(address[] calldata users) public onlyOwner {
}
}
| nftPrice.mul(numberOfTokens)<=msg.value,"The contract did not receive enough Ethereum" | 281,089 | nftPrice.mul(numberOfTokens)<=msg.value |
"The contract can only mint up to 5 tokens at a time" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// import statements
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
// contract class
contract Heartz is ERC721Enumerable, Ownable {
// utilities
using Strings for uint256;
using SafeMath for uint256;
// uint256
uint256 public constant nftPrice = 50000000000000000;
uint256 public constant maxNftPurchase = 20;
uint256 public maxSupply = 7499;
uint256 public nftPerAddressLimit = 5;
// booleans
bool public saleIsActive = false; // false
bool public publicMintingStatus = false; // false
bool public onlyWhitelisted = true; // true
bool public revealed = false;
// addresses
address[] public whitelistAddresses;
// strings
string public baseURI;
// mappings
mapping(uint256 => string) _tokenURIs;
// contract constructor
constructor() ERC721("Heartz", "HRTZ") {}
// get functions
function getBalance() public view returns (uint256) {
}
function getWhitelistedAddresses() public view returns (address[] memory) {
}
function getBaseURI() internal view virtual returns (string memory) {
}
// set functions
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function reveal() public onlyOwner {
}
function flipPublicMintingStatus() public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipOnlyWhitelisted() public onlyOwner {
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI)
internal
virtual
{
}
// unnecessarily long mint function
function mint(uint256 numberOfTokens) public payable {
require(
numberOfTokens > 0,
"The number of tokens can not be less than or equal to 0"
);
require(
totalSupply().add(numberOfTokens) <= maxSupply,
"The purchase would exceed the max supply of Heartz"
);
if (msg.sender != owner()) {
require(
numberOfTokens <= maxNftPurchase,
"The contract can only mint up to 20 tokens at a time"
);
require(
nftPrice.mul(numberOfTokens) <= msg.value,
"The contract did not receive enough Ethereum"
);
require(saleIsActive, "The contract sale is not active");
if (publicMintingStatus) {
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
} else if (onlyWhitelisted) {
require(
isWhitelisted(msg.sender),
"The user is not currently whitelisted"
);
require(<FILL_ME>)
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
}
} else {
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 newId = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, newId);
_setTokenURI(newId, tokenURI(newId));
}
}
}
}
// token URI retriever
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
// classic withdraw function
function withdraw() public payable onlyOwner {
}
// check if specified user is whitelisted
function isWhitelisted(address user) public view returns (bool) {
}
// generate list of whitelist users
function whitelistUsers(address[] calldata users) public onlyOwner {
}
}
| (balanceOf(msg.sender)<nftPerAddressLimit)&&(numberOfTokens<=(nftPerAddressLimit.sub(balanceOf(msg.sender)))),"The contract can only mint up to 5 tokens at a time" | 281,089 | (balanceOf(msg.sender)<nftPerAddressLimit)&&(numberOfTokens<=(nftPerAddressLimit.sub(balanceOf(msg.sender)))) |
Errors.INSUFFICIENT_FLASH_LOAN_BALANCE | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// This flash loan provider was based on the Aave protocol's open source
// implementation and terminology and interfaces are intentionally kept
// similar
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@balancer-labs/v2-solidity-utils/contracts/helpers/BalancerErrors.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/IERC20.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/ReentrancyGuard.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/SafeERC20.sol";
import "./Fees.sol";
import "./interfaces/IFlashLoanRecipient.sol";
/**
* @dev Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient
* contract, which implements the `IFlashLoanRecipient` interface.
*/
abstract contract FlashLoans is Fees, ReentrancyGuard, TemporarilyPausable {
using SafeERC20 for IERC20;
function flashLoan(
IFlashLoanRecipient recipient,
IERC20[] memory tokens,
uint256[] memory amounts,
bytes memory userData
) external override nonReentrant whenNotPaused {
InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);
uint256[] memory feeAmounts = new uint256[](tokens.length);
uint256[] memory preLoanBalances = new uint256[](tokens.length);
// Used to ensure `tokens` is sorted in ascending order, which ensures token uniqueness.
IERC20 previousToken = IERC20(0);
for (uint256 i = 0; i < tokens.length; ++i) {
IERC20 token = tokens[i];
uint256 amount = amounts[i];
_require(token > previousToken, token == IERC20(0) ? Errors.ZERO_TOKEN : Errors.UNSORTED_TOKENS);
previousToken = token;
preLoanBalances[i] = token.balanceOf(address(this));
feeAmounts[i] = _calculateFlashLoanFeeAmount(amount);
require(<FILL_ME>)
token.safeTransfer(address(recipient), amount);
}
recipient.receiveFlashLoan(tokens, amounts, feeAmounts, userData);
for (uint256 i = 0; i < tokens.length; ++i) {
IERC20 token = tokens[i];
uint256 preLoanBalance = preLoanBalances[i];
// Checking for loan repayment first (without accounting for fees) makes for simpler debugging, and results
// in more accurate revert reasons if the flash loan protocol fee percentage is zero.
uint256 postLoanBalance = token.balanceOf(address(this));
_require(postLoanBalance >= preLoanBalance, Errors.INVALID_POST_LOAN_BALANCE);
// No need for checked arithmetic since we know the loan was fully repaid.
uint256 receivedFeeAmount = postLoanBalance - preLoanBalance;
_require(receivedFeeAmount >= feeAmounts[i], Errors.INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT);
_payFeeAmount(token, receivedFeeAmount);
emit FlashLoan(recipient, token, amounts[i], receivedFeeAmount);
}
}
}
| (preLoanBalances[i]>=amount,Errors.INSUFFICIENT_FLASH_LOAN_BALANCE | 281,109 | preLoanBalances[i]>=amount |
Errors.TOKENS_MISMATCH | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@balancer-labs/v2-solidity-utils/contracts/math/Math.sol";
import "@balancer-labs/v2-solidity-utils/contracts/helpers/BalancerErrors.sol";
import "@balancer-labs/v2-solidity-utils/contracts/helpers/InputHelpers.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/IERC20.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/ReentrancyGuard.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/SafeERC20.sol";
import "./Fees.sol";
import "./PoolTokens.sol";
import "./UserBalance.sol";
import "./interfaces/IBasePool.sol";
/**
* @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,
* such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`
* and `getPoolTokens`, delegating to specialization-specific functions as needed.
*
* `managePoolBalance` handles all Asset Manager interactions.
*/
abstract contract PoolBalances is Fees, ReentrancyGuard, PoolTokens, UserBalance {
using Math for uint256;
using SafeERC20 for IERC20;
using BalanceAllocation for bytes32;
using BalanceAllocation for bytes32[];
function joinPool(
bytes32 poolId,
address sender,
address recipient,
JoinPoolRequest memory request
) external payable override whenNotPaused {
}
function exitPool(
bytes32 poolId,
address sender,
address payable recipient,
ExitPoolRequest memory request
) external override {
}
// This has the exact same layout as JoinPoolRequest and ExitPoolRequest, except the `maxAmountsIn` and
// `minAmountsOut` are called `limits`. Internally we use this struct for both since these two functions are quite
// similar, but expose the others to callers for clarity.
struct PoolBalanceChange {
IAsset[] assets;
uint256[] limits;
bytes userData;
bool useInternalBalance;
}
/**
* @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost.
*/
function _toPoolBalanceChange(JoinPoolRequest memory request)
private
pure
returns (PoolBalanceChange memory change)
{
}
/**
* @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost.
*/
function _toPoolBalanceChange(ExitPoolRequest memory request)
private
pure
returns (PoolBalanceChange memory change)
{
}
/**
* @dev Implements both `joinPool` and `exitPool`, based on `kind`.
*/
function _joinOrExit(
PoolBalanceChangeKind kind,
bytes32 poolId,
address sender,
address payable recipient,
PoolBalanceChange memory change
) private nonReentrant withRegisteredPool(poolId) authenticateFor(sender) {
}
/**
* @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the
* associated token transfers and fee payments, returning the Pool's final balances.
*/
function _callPoolBalanceChange(
PoolBalanceChangeKind kind,
bytes32 poolId,
address sender,
address payable recipient,
PoolBalanceChange memory change,
bytes32[] memory balances
)
private
returns (
bytes32[] memory finalBalances,
uint256[] memory amountsInOrOut,
uint256[] memory dueProtocolFeeAmounts
)
{
}
/**
* @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays
* accumulated protocol swap fees.
*
* Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol
* swap fees.
*/
function _processJoinPoolTransfers(
address sender,
PoolBalanceChange memory change,
bytes32[] memory balances,
uint256[] memory amountsIn,
uint256[] memory dueProtocolFeeAmounts
) private returns (bytes32[] memory finalBalances) {
}
/**
* @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays
* accumulated protocol swap fees from the Pool.
*
* Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid
* (`dueProtocolFeeAmounts`).
*/
function _processExitPoolTransfers(
address payable recipient,
PoolBalanceChange memory change,
bytes32[] memory balances,
uint256[] memory amountsOut,
uint256[] memory dueProtocolFeeAmounts
) private returns (bytes32[] memory finalBalances) {
}
/**
* @dev Returns the total balance for `poolId`'s `expectedTokens`.
*
* `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same
* length, elements and order. Additionally, the Pool must have at least one registered token.
*/
function _validateTokensAndGetBalances(bytes32 poolId, IERC20[] memory expectedTokens)
private
view
returns (bytes32[] memory)
{
(IERC20[] memory actualTokens, bytes32[] memory balances) = _getPoolTokens(poolId);
InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);
_require(actualTokens.length > 0, Errors.POOL_NO_TOKENS);
for (uint256 i = 0; i < actualTokens.length; ++i) {
require(<FILL_ME>)
}
return balances;
}
/**
* @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,
* without checking whether the values fit in the signed 256 bit range.
*/
function _unsafeCastToInt256(uint256[] memory values, bool positive)
private
pure
returns (int256[] memory signedValues)
{
}
}
| (actualTokens[i]==expectedTokens[i],Errors.TOKENS_MISMATCH | 281,116 | actualTokens[i]==expectedTokens[i] |
"Deposited value is not an allowed denomination." | pragma solidity ^0.6.12;
/**
* @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 ERC20;` 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 {
}
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 {
}
}
contract QRXLottery is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256[] denominations = [
0.1 ether,
0.2 ether,
0.3 ether,
0.4 ether,
0.5 ether,
0.6 ether,
0.7 ether,
0.8 ether,
0.9 ether,
1 ether
];
address[] public weeklyDrawAddress;
uint256 public periodStart = 0;
uint256 public periodDelay = 7 days; //
uint256 public currentPeriod = 1;
uint256 public qrxFee = 1000 ether;
address private operator;
address private immutable collector = 0x4B8d43576aB86Bf008ECFADfeEAF9793B603EC15; // 0x4B8d43576aB86Bf008ECFADfeEAF9793B603EC15 test
IERC20 qrx;
struct User {
address userAddress;
uint256 depositedAmount;
}
mapping(address => User) public _weeklyDraw1;
mapping(address => User) public _weeklyDraw2;
mapping(address => User) public _weeklyDraw3;
mapping(address => User) public _weeklyDraw4;
mapping(address => User) public _weeklyDraw5;
event Deposited(
address indexed user,
uint256 amount,
address indexed referral,
uint256 period
);
event Drawn(uint256 period, address indexed winner, address[] addresses);
event TransferedReferralReward(address indexed user, uint256 amount);
event calculatedPoints(User user);
constructor(address _qrxAddress, uint256 _start, address _operator) public {
}
/* constructor() public {
periodStart = block.timestamp; //testing
}*/
modifier onlyOwnerOperator(){
}
function setOperatorAddress(address _address) public onlyOwnerOperator{
}
function getWeeklyDrawAddressLength() public view returns (uint256){
}
function getWeeklyDrawAddress() public view returns ( address[] memory){
}
function setQRXfee(uint256 _fee) public onlyOwner {
}
function withdrawEther() public onlyOwnerOperator{
}
function relayEther() internal {
}
function drainTokens(address _addy) public onlyOwnerOperator {
}
function deposit(address _referral) public payable { //main deposit function
require(<FILL_ME>)
//check msg.value if its an allowed denomination
if (currentPeriod == 1) { //first period
User storage user = _weeklyDraw1[msg.sender];
if (
user.depositedAmount > 1 ether ||
user.depositedAmount.add(msg.value) > 1 ether
) {
//check if users deposit amount is higher than 1 ether
revert("Can't deposited more than 1 ether");
}
bool exists = false;
if (user.depositedAmount != 0) { //checks if user already deposited
exists = true;
}
updateAccount(msg.value, _referral, exists); //updates accounting and send QRX if he referred someone.
relayEther(); //relays ether to collector address
emit Deposited(msg.sender,msg.value,_referral,currentPeriod);
} else if (currentPeriod == 2) {
User storage user = _weeklyDraw2[msg.sender];
if (
user.depositedAmount > 1 ether ||
user.depositedAmount.add(msg.value) > 1 ether
) {
//check if users deposit amount is higher than 1 ether
revert("Can't deposited more than 1 ether");
}
bool exists = false;
if (user.depositedAmount != 0) {
exists = true;
}
updateAccount(msg.value, _referral, exists);
relayEther();
emit Deposited(msg.sender,msg.value,_referral,currentPeriod);
} else if (currentPeriod == 3) {
User storage user = _weeklyDraw3[msg.sender];
if (
user.depositedAmount > 1 ether ||
user.depositedAmount.add(msg.value) > 1 ether
) {
//check if users deposit amount is higher than 1 ether
revert("Can't deposited more than 1 ether");
}
bool exists = false;
if (user.depositedAmount != 0) {
exists = true;
}
updateAccount(msg.value, _referral, exists);
relayEther();
emit Deposited(msg.sender,msg.value,_referral,currentPeriod);
} else if (currentPeriod == 4) {
User storage user = _weeklyDraw4[msg.sender];
if (
user.depositedAmount > 1 ether ||
user.depositedAmount.add(msg.value) > 1 ether
) {
//check if users deposit amount is higher than 1 ether
revert("Can't deposited more than 1 ether");
}
bool exists = false;
if (user.depositedAmount != 0) {
exists = true;
}
updateAccount(msg.value, _referral, exists);
relayEther();
emit Deposited(msg.sender,msg.value,_referral,currentPeriod);
} else if (currentPeriod == 5) {
User storage user = _weeklyDraw5[msg.sender];
if (
user.depositedAmount > 1 ether ||
user.depositedAmount.add(msg.value) > 1 ether
) {
//check if users deposit amount is higher than 1 ether
revert("Can't deposited more than 1 ether");
}
bool exists = false;
if (user.depositedAmount != 0) {
exists = true;
}
updateAccount(msg.value, _referral, exists);
relayEther();
emit Deposited(msg.sender,msg.value,_referral,currentPeriod);
} else {
revert("All periods are over.");
}
}
function kindaRandom() public view returns (uint256) {
}
function returnIndex() public view returns(uint256){
}
function drawWinner() public onlyOwnerOperator returns (address) {
}
function checkDepositValue(uint256 _value) internal view returns (bool) {
}
function updateAccount(
uint256 _amount,
address _referral,
bool _exists
) private {
}
}
| checkDepositValue(msg.value),"Deposited value is not an allowed denomination." | 281,195 | checkDepositValue(msg.value) |
"REG: Address invalid NFT" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
require(<FILL_ME>)
nftInstance_ = INft(_nft);
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
}
}
| INft(_nft).isActive(),"REG: Address invalid NFT" | 281,261 | INft(_nft).isActive() |
"REG: Cannot set HUB to existing" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
IHub newHub = IHub(_newHub);
require(_newHub != address(0), "REG: cannot set HUB to 0x");
require(<FILL_ME>)
require(
newHub.isAuctionHubImplementation(),
"REG: HUB implementation error"
);
require(IHub(_newHub).init(), "REG: HUB could not be init");
hubInstance_ = IHub(_newHub);
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
}
}
| address(hubInstance_)!=_newHub,"REG: Cannot set HUB to existing" | 281,261 | address(hubInstance_)!=_newHub |
"REG: HUB implementation error" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
IHub newHub = IHub(_newHub);
require(_newHub != address(0), "REG: cannot set HUB to 0x");
require(
address(hubInstance_) != _newHub,
"REG: Cannot set HUB to existing"
);
require(<FILL_ME>)
require(IHub(_newHub).init(), "REG: HUB could not be init");
hubInstance_ = IHub(_newHub);
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
}
}
| newHub.isAuctionHubImplementation(),"REG: HUB implementation error" | 281,261 | newHub.isAuctionHubImplementation() |
"REG: HUB could not be init" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
IHub newHub = IHub(_newHub);
require(_newHub != address(0), "REG: cannot set HUB to 0x");
require(
address(hubInstance_) != _newHub,
"REG: Cannot set HUB to existing"
);
require(
newHub.isAuctionHubImplementation(),
"REG: HUB implementation error"
);
require(<FILL_ME>)
hubInstance_ = IHub(_newHub);
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
}
}
| IHub(_newHub).init(),"REG: HUB could not be init" | 281,261 | IHub(_newHub).init() |
"REG: Cannot set ROY to existing" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
require(_newRoyalties != address(0), "REG: cannot set ROY to 0x");
require(<FILL_ME>)
require(IRoyalties(_newRoyalties).init(), "REG: ROY could not be init");
royaltiesInstance_ = IRoyalties(_newRoyalties);
}
}
| address(royaltiesInstance_)!=_newRoyalties,"REG: Cannot set ROY to existing" | 281,261 | address(royaltiesInstance_)!=_newRoyalties |
"REG: ROY could not be init" | //SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// Registry managed contracts
import "../auctions/IHub.sol";
import "../royalties/IRoyalties.sol";
import "../nft/INft.sol";
contract Registry is Ownable, ReentrancyGuard {
// -----------------------------------------------------------------------
// STATE
// -----------------------------------------------------------------------
// Storage of current hub instance
IHub internal hubInstance_;
// Storage of current royalties instance
IRoyalties internal royaltiesInstance_;
// Storage of NFT contract (cannot be changed)
INft internal nftInstance_;
// -----------------------------------------------------------------------
// CONSTRUCTOR
// -----------------------------------------------------------------------
constructor(address _nft) Ownable() {
}
// -----------------------------------------------------------------------
// NON-MODIFYING FUNCTIONS (VIEW)
// -----------------------------------------------------------------------
function getHub() external view returns (address) {
}
function getRoyalties() external view returns (address) {
}
function getNft() external view returns (address) {
}
function isActive() external view returns (bool) {
}
// -----------------------------------------------------------------------
// ONLY OWNER STATE MODIFYING FUNCTIONS
// -----------------------------------------------------------------------
function updateHub(address _newHub) external onlyOwner nonReentrant {
}
function updateRoyalties(address _newRoyalties)
external
onlyOwner
nonReentrant
{
require(_newRoyalties != address(0), "REG: cannot set ROY to 0x");
require(
address(royaltiesInstance_) != _newRoyalties,
"REG: Cannot set ROY to existing"
);
require(<FILL_ME>)
royaltiesInstance_ = IRoyalties(_newRoyalties);
}
}
| IRoyalties(_newRoyalties).init(),"REG: ROY could not be init" | 281,261 | IRoyalties(_newRoyalties).init() |
"checkHowManyOwners: owner already voted for the operation" | pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
/**
* @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) {
}
}
/**
* @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 ERC20;` 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 {
}
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 {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function mint(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Multiownable smart contract
* which allows to many ETH wallets to manage main smart contract.
*/
contract Multiownable {
// VARIABLES
uint256 internal _ownersGeneration;
uint256 internal _howManyOwnersDecide;
address[] internal _owners;
bytes32[] internal _allOperations;
address internal _insideCallSender;
uint256 internal _insideCallCount;
// Reverse lookup tables for owners and allOperations
mapping(address => uint256) public ownersIndices; // Starts from 1
mapping(bytes32 => uint256) public allOperationsIndicies;
// Owners voting mask per operations
mapping(bytes32 => uint256) public votesMaskByOperation;
mapping(bytes32 => uint256) public votesCountByOperation;
// EVENTS
event OwnershipTransferred(address[] previousOwners, uint256 howManyOwnersDecide, address[] newOwners, uint256 newHowManyOwnersDecide);
event OperationCreated(bytes32 operation, uint256 howMany, uint256 ownersCount, address proposer);
event OperationUpvoted(bytes32 operation, uint256 votes, uint256 howMany, uint256 ownersCount, address upvoter);
event OperationPerformed(bytes32 operation, uint256 howMany, uint256 ownersCount, address performer);
event OperationDownvoted(bytes32 operation, uint256 votes, uint256 ownersCount, address downvoter);
event OperationCancelled(bytes32 operation, address lastCanceller);
// ACCESSORS
function isOwner(address wallet) external view returns (bool) {
}
function ownersCount() external view returns (uint256) {
}
function allOperationsCount() external view returns (uint256) {
}
// MODIFIERS
/**
* @dev Allows to perform method by any of the owners
*/
modifier onlyAnyOwner {
}
/**
* @dev Allows to perform method only after many owners call it with the same arguments
*/
modifier onlyManyOwners {
}
/**
* @dev Allows to perform method only after all owners call it with the same arguments
*/
modifier onlyAllOwners {
}
/**
* @dev Allows to perform method only after some owners call it with the same arguments
*/
modifier onlySomeOwners(uint256 howMany) {
}
// CONSTRUCTOR
constructor() public {
}
// INTERNAL METHODS
/**
* @dev onlyManyOwners modifier helper
*/
function checkHowManyOwners(uint256 howMany) internal returns (bool) {
if (_insideCallSender == msg.sender) {
require(howMany <= _insideCallCount, "checkHowManyOwners: nested owners modifier check require more owners");
return true;
}
uint256 ownerIndex = ownersIndices[msg.sender] - 1;
require(ownerIndex < _owners.length, "checkHowManyOwners: msg.sender is not an owner");
bytes32 operation = keccak256(abi.encodePacked(msg.data, _ownersGeneration));
require(<FILL_ME>)
votesMaskByOperation[operation] |= (2 ** ownerIndex);
uint256 operationVotesCount = votesCountByOperation[operation] + 1;
votesCountByOperation[operation] = operationVotesCount;
if (operationVotesCount == 1) {
allOperationsIndicies[operation] = _allOperations.length;
_allOperations.push(operation);
emit OperationCreated(operation, howMany, _owners.length, msg.sender);
}
emit OperationUpvoted(operation, operationVotesCount, howMany, _owners.length, msg.sender);
// If enough owners confirmed the same operation
if (votesCountByOperation[operation] == howMany) {
deleteOperation(operation);
emit OperationPerformed(operation, howMany, _owners.length, msg.sender);
return true;
}
return false;
}
/**
* @dev Used to delete cancelled or performed operation
* @param operation defines which operation to delete
*/
function deleteOperation(bytes32 operation) internal {
}
// PUBLIC METHODS
/**
* @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
* @param operation defines which operation to delete
*/
function cancelPending(bytes32 operation) external onlyAnyOwner {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
*/
function transferOwnership(address[] calldata newOwners) external {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
* @param newHowManyOwnersDecide defines how many owners can decide
*/
function transferOwnershipWithHowMany(address[] memory newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
}
// GETTERS
function getOwnersGeneration() external view returns (uint256) {
}
function getHowManyOwnersDecide() external view returns (uint256) {
}
function getInsideCallSender() external view returns (address) {
}
function getInsideCallCount() external view returns (uint256) {
}
function getOwners() external view returns(address [] memory) {
}
function getAllOperations() external view returns (bytes32 [] memory) {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
/**
* @title WhitelistedRole
* @dev Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in a
* crowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also remove
* it), and not Whitelisteds themselves.
*/
contract WhitelistedRole is Multiownable {
using Roles for Roles.Role;
event WhitelistedAdded(address indexed account);
event WhitelistedRemoved(address indexed account);
Roles.Role private _whitelisteds;
modifier onlyWhitelisted() {
}
function isWhitelisted(address account) public view returns (bool) {
}
function addWhitelisted(address account) public onlyManyOwners {
}
function removeWhitelisted(address account) public onlyManyOwners {
}
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
}
/**
* @title Staking smart contract
*/
contract Staking is WhitelistedRole {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// whitelisted users amount
uint256 private _usersAmount;
// timestamp when last time deposit was deposited tokens
uint256 private _lastDepositDone;
// only once per 30 days depositor can deposit tokens
uint256 private constant _depositDelay = 30 days;
// the address of depositor
address private _depositor;
// how much deposits depositor done
uint256 private _depositsAmount;
struct DepositData {
uint256 tokens;
uint256 usersLength;
}
// here we store the history of deposits amount per each delay
mapping(uint256 => DepositData) private _depositedPerDelay;
// here we store user address => last deposit amount for withdraw calculation
// if user missed withdrawal of few months he can withdraw all tokens once
mapping(address => uint256) private _userWithdraws;
// interface of ERC20 Yazom
IERC20 private _yazom;
// events for watching
event Deposited(uint256 amount);
event Withdrawen(address indexed user, uint256 amount);
// -----------------------------------------
// CONSTRUCTOR
// -----------------------------------------
constructor (address depositor, IERC20 yazom) public {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
function () external payable {
}
function deposit() external {
}
function withdrawn() external onlyWhitelisted {
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
function getCurrentUsersAmount() external view returns (uint256) {
}
function getLastDepositDoneDate() external view returns (uint256) {
}
function getDepositDelay() external pure returns (uint256) {
}
function getDepositorAddress() external view returns (address) {
}
function getDepositsAmount() external view returns (uint256) {
}
function getDepositData(uint256 depositId) external view returns (uint256 tokens, uint256 usersLength) {
}
function getUserLastWithdraw(address user) external view returns (uint256) {
}
}
| (votesMaskByOperation[operation]&(2**ownerIndex))==0,"checkHowManyOwners: owner already voted for the operation" | 281,314 | (votesMaskByOperation[operation]&(2**ownerIndex))==0 |
"cancelPending: operation not found for this user" | pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
/**
* @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) {
}
}
/**
* @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 ERC20;` 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 {
}
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 {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function mint(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Multiownable smart contract
* which allows to many ETH wallets to manage main smart contract.
*/
contract Multiownable {
// VARIABLES
uint256 internal _ownersGeneration;
uint256 internal _howManyOwnersDecide;
address[] internal _owners;
bytes32[] internal _allOperations;
address internal _insideCallSender;
uint256 internal _insideCallCount;
// Reverse lookup tables for owners and allOperations
mapping(address => uint256) public ownersIndices; // Starts from 1
mapping(bytes32 => uint256) public allOperationsIndicies;
// Owners voting mask per operations
mapping(bytes32 => uint256) public votesMaskByOperation;
mapping(bytes32 => uint256) public votesCountByOperation;
// EVENTS
event OwnershipTransferred(address[] previousOwners, uint256 howManyOwnersDecide, address[] newOwners, uint256 newHowManyOwnersDecide);
event OperationCreated(bytes32 operation, uint256 howMany, uint256 ownersCount, address proposer);
event OperationUpvoted(bytes32 operation, uint256 votes, uint256 howMany, uint256 ownersCount, address upvoter);
event OperationPerformed(bytes32 operation, uint256 howMany, uint256 ownersCount, address performer);
event OperationDownvoted(bytes32 operation, uint256 votes, uint256 ownersCount, address downvoter);
event OperationCancelled(bytes32 operation, address lastCanceller);
// ACCESSORS
function isOwner(address wallet) external view returns (bool) {
}
function ownersCount() external view returns (uint256) {
}
function allOperationsCount() external view returns (uint256) {
}
// MODIFIERS
/**
* @dev Allows to perform method by any of the owners
*/
modifier onlyAnyOwner {
}
/**
* @dev Allows to perform method only after many owners call it with the same arguments
*/
modifier onlyManyOwners {
}
/**
* @dev Allows to perform method only after all owners call it with the same arguments
*/
modifier onlyAllOwners {
}
/**
* @dev Allows to perform method only after some owners call it with the same arguments
*/
modifier onlySomeOwners(uint256 howMany) {
}
// CONSTRUCTOR
constructor() public {
}
// INTERNAL METHODS
/**
* @dev onlyManyOwners modifier helper
*/
function checkHowManyOwners(uint256 howMany) internal returns (bool) {
}
/**
* @dev Used to delete cancelled or performed operation
* @param operation defines which operation to delete
*/
function deleteOperation(bytes32 operation) internal {
}
// PUBLIC METHODS
/**
* @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
* @param operation defines which operation to delete
*/
function cancelPending(bytes32 operation) external onlyAnyOwner {
uint256 ownerIndex = ownersIndices[msg.sender] - 1;
require(<FILL_ME>)
votesMaskByOperation[operation] &= ~(2 ** ownerIndex);
uint256 operationVotesCount = votesCountByOperation[operation] - 1;
votesCountByOperation[operation] = operationVotesCount;
emit OperationDownvoted(operation, operationVotesCount, _owners.length, msg.sender);
if (operationVotesCount == 0) {
deleteOperation(operation);
emit OperationCancelled(operation, msg.sender);
}
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
*/
function transferOwnership(address[] calldata newOwners) external {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
* @param newHowManyOwnersDecide defines how many owners can decide
*/
function transferOwnershipWithHowMany(address[] memory newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
}
// GETTERS
function getOwnersGeneration() external view returns (uint256) {
}
function getHowManyOwnersDecide() external view returns (uint256) {
}
function getInsideCallSender() external view returns (address) {
}
function getInsideCallCount() external view returns (uint256) {
}
function getOwners() external view returns(address [] memory) {
}
function getAllOperations() external view returns (bytes32 [] memory) {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
/**
* @title WhitelistedRole
* @dev Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in a
* crowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also remove
* it), and not Whitelisteds themselves.
*/
contract WhitelistedRole is Multiownable {
using Roles for Roles.Role;
event WhitelistedAdded(address indexed account);
event WhitelistedRemoved(address indexed account);
Roles.Role private _whitelisteds;
modifier onlyWhitelisted() {
}
function isWhitelisted(address account) public view returns (bool) {
}
function addWhitelisted(address account) public onlyManyOwners {
}
function removeWhitelisted(address account) public onlyManyOwners {
}
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
}
/**
* @title Staking smart contract
*/
contract Staking is WhitelistedRole {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// whitelisted users amount
uint256 private _usersAmount;
// timestamp when last time deposit was deposited tokens
uint256 private _lastDepositDone;
// only once per 30 days depositor can deposit tokens
uint256 private constant _depositDelay = 30 days;
// the address of depositor
address private _depositor;
// how much deposits depositor done
uint256 private _depositsAmount;
struct DepositData {
uint256 tokens;
uint256 usersLength;
}
// here we store the history of deposits amount per each delay
mapping(uint256 => DepositData) private _depositedPerDelay;
// here we store user address => last deposit amount for withdraw calculation
// if user missed withdrawal of few months he can withdraw all tokens once
mapping(address => uint256) private _userWithdraws;
// interface of ERC20 Yazom
IERC20 private _yazom;
// events for watching
event Deposited(uint256 amount);
event Withdrawen(address indexed user, uint256 amount);
// -----------------------------------------
// CONSTRUCTOR
// -----------------------------------------
constructor (address depositor, IERC20 yazom) public {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
function () external payable {
}
function deposit() external {
}
function withdrawn() external onlyWhitelisted {
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
function getCurrentUsersAmount() external view returns (uint256) {
}
function getLastDepositDoneDate() external view returns (uint256) {
}
function getDepositDelay() external pure returns (uint256) {
}
function getDepositorAddress() external view returns (address) {
}
function getDepositsAmount() external view returns (uint256) {
}
function getDepositData(uint256 depositId) external view returns (uint256 tokens, uint256 usersLength) {
}
function getUserLastWithdraw(address user) external view returns (uint256) {
}
}
| (votesMaskByOperation[operation]&(2**ownerIndex))!=0,"cancelPending: operation not found for this user" | 281,314 | (votesMaskByOperation[operation]&(2**ownerIndex))!=0 |
"transferOwnershipWithHowMany: owners array contains zero" | pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
/**
* @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) {
}
}
/**
* @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 ERC20;` 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 {
}
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 {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function mint(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Multiownable smart contract
* which allows to many ETH wallets to manage main smart contract.
*/
contract Multiownable {
// VARIABLES
uint256 internal _ownersGeneration;
uint256 internal _howManyOwnersDecide;
address[] internal _owners;
bytes32[] internal _allOperations;
address internal _insideCallSender;
uint256 internal _insideCallCount;
// Reverse lookup tables for owners and allOperations
mapping(address => uint256) public ownersIndices; // Starts from 1
mapping(bytes32 => uint256) public allOperationsIndicies;
// Owners voting mask per operations
mapping(bytes32 => uint256) public votesMaskByOperation;
mapping(bytes32 => uint256) public votesCountByOperation;
// EVENTS
event OwnershipTransferred(address[] previousOwners, uint256 howManyOwnersDecide, address[] newOwners, uint256 newHowManyOwnersDecide);
event OperationCreated(bytes32 operation, uint256 howMany, uint256 ownersCount, address proposer);
event OperationUpvoted(bytes32 operation, uint256 votes, uint256 howMany, uint256 ownersCount, address upvoter);
event OperationPerformed(bytes32 operation, uint256 howMany, uint256 ownersCount, address performer);
event OperationDownvoted(bytes32 operation, uint256 votes, uint256 ownersCount, address downvoter);
event OperationCancelled(bytes32 operation, address lastCanceller);
// ACCESSORS
function isOwner(address wallet) external view returns (bool) {
}
function ownersCount() external view returns (uint256) {
}
function allOperationsCount() external view returns (uint256) {
}
// MODIFIERS
/**
* @dev Allows to perform method by any of the owners
*/
modifier onlyAnyOwner {
}
/**
* @dev Allows to perform method only after many owners call it with the same arguments
*/
modifier onlyManyOwners {
}
/**
* @dev Allows to perform method only after all owners call it with the same arguments
*/
modifier onlyAllOwners {
}
/**
* @dev Allows to perform method only after some owners call it with the same arguments
*/
modifier onlySomeOwners(uint256 howMany) {
}
// CONSTRUCTOR
constructor() public {
}
// INTERNAL METHODS
/**
* @dev onlyManyOwners modifier helper
*/
function checkHowManyOwners(uint256 howMany) internal returns (bool) {
}
/**
* @dev Used to delete cancelled or performed operation
* @param operation defines which operation to delete
*/
function deleteOperation(bytes32 operation) internal {
}
// PUBLIC METHODS
/**
* @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
* @param operation defines which operation to delete
*/
function cancelPending(bytes32 operation) external onlyAnyOwner {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
*/
function transferOwnership(address[] calldata newOwners) external {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
* @param newHowManyOwnersDecide defines how many owners can decide
*/
function transferOwnershipWithHowMany(address[] memory newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
require(newOwners.length > 0, "transferOwnershipWithHowMany: owners array is empty");
require(newOwners.length <= 256, "transferOwnershipWithHowMany: owners count is greater then 256");
require(newHowManyOwnersDecide > 0, "transferOwnershipWithHowMany: newHowManyOwnersDecide equal to 0");
require(newHowManyOwnersDecide <= newOwners.length, "transferOwnershipWithHowMany: newHowManyOwnersDecide exceeds the number of owners");
// Reset owners reverse lookup table
for (uint256 j = 0; j < _owners.length; j++) {
delete ownersIndices[_owners[j]];
}
for (uint256 i = 0; i < newOwners.length; i++) {
require(<FILL_ME>)
require(ownersIndices[newOwners[i]] == 0, "transferOwnershipWithHowMany: owners array contains duplicates");
ownersIndices[newOwners[i]] = i + 1;
}
emit OwnershipTransferred(_owners, _howManyOwnersDecide, newOwners, newHowManyOwnersDecide);
_owners = newOwners;
_howManyOwnersDecide = newHowManyOwnersDecide;
_allOperations.length = 0;
_ownersGeneration++;
}
// GETTERS
function getOwnersGeneration() external view returns (uint256) {
}
function getHowManyOwnersDecide() external view returns (uint256) {
}
function getInsideCallSender() external view returns (address) {
}
function getInsideCallCount() external view returns (uint256) {
}
function getOwners() external view returns(address [] memory) {
}
function getAllOperations() external view returns (bytes32 [] memory) {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
/**
* @title WhitelistedRole
* @dev Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in a
* crowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also remove
* it), and not Whitelisteds themselves.
*/
contract WhitelistedRole is Multiownable {
using Roles for Roles.Role;
event WhitelistedAdded(address indexed account);
event WhitelistedRemoved(address indexed account);
Roles.Role private _whitelisteds;
modifier onlyWhitelisted() {
}
function isWhitelisted(address account) public view returns (bool) {
}
function addWhitelisted(address account) public onlyManyOwners {
}
function removeWhitelisted(address account) public onlyManyOwners {
}
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
}
/**
* @title Staking smart contract
*/
contract Staking is WhitelistedRole {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// whitelisted users amount
uint256 private _usersAmount;
// timestamp when last time deposit was deposited tokens
uint256 private _lastDepositDone;
// only once per 30 days depositor can deposit tokens
uint256 private constant _depositDelay = 30 days;
// the address of depositor
address private _depositor;
// how much deposits depositor done
uint256 private _depositsAmount;
struct DepositData {
uint256 tokens;
uint256 usersLength;
}
// here we store the history of deposits amount per each delay
mapping(uint256 => DepositData) private _depositedPerDelay;
// here we store user address => last deposit amount for withdraw calculation
// if user missed withdrawal of few months he can withdraw all tokens once
mapping(address => uint256) private _userWithdraws;
// interface of ERC20 Yazom
IERC20 private _yazom;
// events for watching
event Deposited(uint256 amount);
event Withdrawen(address indexed user, uint256 amount);
// -----------------------------------------
// CONSTRUCTOR
// -----------------------------------------
constructor (address depositor, IERC20 yazom) public {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
function () external payable {
}
function deposit() external {
}
function withdrawn() external onlyWhitelisted {
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
function getCurrentUsersAmount() external view returns (uint256) {
}
function getLastDepositDoneDate() external view returns (uint256) {
}
function getDepositDelay() external pure returns (uint256) {
}
function getDepositorAddress() external view returns (address) {
}
function getDepositsAmount() external view returns (uint256) {
}
function getDepositData(uint256 depositId) external view returns (uint256 tokens, uint256 usersLength) {
}
function getUserLastWithdraw(address user) external view returns (uint256) {
}
}
| newOwners[i]!=address(0),"transferOwnershipWithHowMany: owners array contains zero" | 281,314 | newOwners[i]!=address(0) |
"transferOwnershipWithHowMany: owners array contains duplicates" | pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
}
/**
* @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) {
}
}
/**
* @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 ERC20;` 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 {
}
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 {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function mint(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Multiownable smart contract
* which allows to many ETH wallets to manage main smart contract.
*/
contract Multiownable {
// VARIABLES
uint256 internal _ownersGeneration;
uint256 internal _howManyOwnersDecide;
address[] internal _owners;
bytes32[] internal _allOperations;
address internal _insideCallSender;
uint256 internal _insideCallCount;
// Reverse lookup tables for owners and allOperations
mapping(address => uint256) public ownersIndices; // Starts from 1
mapping(bytes32 => uint256) public allOperationsIndicies;
// Owners voting mask per operations
mapping(bytes32 => uint256) public votesMaskByOperation;
mapping(bytes32 => uint256) public votesCountByOperation;
// EVENTS
event OwnershipTransferred(address[] previousOwners, uint256 howManyOwnersDecide, address[] newOwners, uint256 newHowManyOwnersDecide);
event OperationCreated(bytes32 operation, uint256 howMany, uint256 ownersCount, address proposer);
event OperationUpvoted(bytes32 operation, uint256 votes, uint256 howMany, uint256 ownersCount, address upvoter);
event OperationPerformed(bytes32 operation, uint256 howMany, uint256 ownersCount, address performer);
event OperationDownvoted(bytes32 operation, uint256 votes, uint256 ownersCount, address downvoter);
event OperationCancelled(bytes32 operation, address lastCanceller);
// ACCESSORS
function isOwner(address wallet) external view returns (bool) {
}
function ownersCount() external view returns (uint256) {
}
function allOperationsCount() external view returns (uint256) {
}
// MODIFIERS
/**
* @dev Allows to perform method by any of the owners
*/
modifier onlyAnyOwner {
}
/**
* @dev Allows to perform method only after many owners call it with the same arguments
*/
modifier onlyManyOwners {
}
/**
* @dev Allows to perform method only after all owners call it with the same arguments
*/
modifier onlyAllOwners {
}
/**
* @dev Allows to perform method only after some owners call it with the same arguments
*/
modifier onlySomeOwners(uint256 howMany) {
}
// CONSTRUCTOR
constructor() public {
}
// INTERNAL METHODS
/**
* @dev onlyManyOwners modifier helper
*/
function checkHowManyOwners(uint256 howMany) internal returns (bool) {
}
/**
* @dev Used to delete cancelled or performed operation
* @param operation defines which operation to delete
*/
function deleteOperation(bytes32 operation) internal {
}
// PUBLIC METHODS
/**
* @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
* @param operation defines which operation to delete
*/
function cancelPending(bytes32 operation) external onlyAnyOwner {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
*/
function transferOwnership(address[] calldata newOwners) external {
}
/**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
* @param newHowManyOwnersDecide defines how many owners can decide
*/
function transferOwnershipWithHowMany(address[] memory newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
require(newOwners.length > 0, "transferOwnershipWithHowMany: owners array is empty");
require(newOwners.length <= 256, "transferOwnershipWithHowMany: owners count is greater then 256");
require(newHowManyOwnersDecide > 0, "transferOwnershipWithHowMany: newHowManyOwnersDecide equal to 0");
require(newHowManyOwnersDecide <= newOwners.length, "transferOwnershipWithHowMany: newHowManyOwnersDecide exceeds the number of owners");
// Reset owners reverse lookup table
for (uint256 j = 0; j < _owners.length; j++) {
delete ownersIndices[_owners[j]];
}
for (uint256 i = 0; i < newOwners.length; i++) {
require(newOwners[i] != address(0), "transferOwnershipWithHowMany: owners array contains zero");
require(<FILL_ME>)
ownersIndices[newOwners[i]] = i + 1;
}
emit OwnershipTransferred(_owners, _howManyOwnersDecide, newOwners, newHowManyOwnersDecide);
_owners = newOwners;
_howManyOwnersDecide = newHowManyOwnersDecide;
_allOperations.length = 0;
_ownersGeneration++;
}
// GETTERS
function getOwnersGeneration() external view returns (uint256) {
}
function getHowManyOwnersDecide() external view returns (uint256) {
}
function getInsideCallSender() external view returns (address) {
}
function getInsideCallCount() external view returns (uint256) {
}
function getOwners() external view returns(address [] memory) {
}
function getAllOperations() external view returns (bytes32 [] memory) {
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
}
/**
* @dev Remove an account's access to this role.
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev Check if an account has this role.
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
/**
* @title WhitelistedRole
* @dev Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in a
* crowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also remove
* it), and not Whitelisteds themselves.
*/
contract WhitelistedRole is Multiownable {
using Roles for Roles.Role;
event WhitelistedAdded(address indexed account);
event WhitelistedRemoved(address indexed account);
Roles.Role private _whitelisteds;
modifier onlyWhitelisted() {
}
function isWhitelisted(address account) public view returns (bool) {
}
function addWhitelisted(address account) public onlyManyOwners {
}
function removeWhitelisted(address account) public onlyManyOwners {
}
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
}
/**
* @title Staking smart contract
*/
contract Staking is WhitelistedRole {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// whitelisted users amount
uint256 private _usersAmount;
// timestamp when last time deposit was deposited tokens
uint256 private _lastDepositDone;
// only once per 30 days depositor can deposit tokens
uint256 private constant _depositDelay = 30 days;
// the address of depositor
address private _depositor;
// how much deposits depositor done
uint256 private _depositsAmount;
struct DepositData {
uint256 tokens;
uint256 usersLength;
}
// here we store the history of deposits amount per each delay
mapping(uint256 => DepositData) private _depositedPerDelay;
// here we store user address => last deposit amount for withdraw calculation
// if user missed withdrawal of few months he can withdraw all tokens once
mapping(address => uint256) private _userWithdraws;
// interface of ERC20 Yazom
IERC20 private _yazom;
// events for watching
event Deposited(uint256 amount);
event Withdrawen(address indexed user, uint256 amount);
// -----------------------------------------
// CONSTRUCTOR
// -----------------------------------------
constructor (address depositor, IERC20 yazom) public {
}
// -----------------------------------------
// EXTERNAL
// -----------------------------------------
function () external payable {
}
function deposit() external {
}
function withdrawn() external onlyWhitelisted {
}
// -----------------------------------------
// INTERNAL
// -----------------------------------------
function _addWhitelisted(address account) internal {
}
function _removeWhitelisted(address account) internal {
}
// -----------------------------------------
// GETTERS
// -----------------------------------------
function getCurrentUsersAmount() external view returns (uint256) {
}
function getLastDepositDoneDate() external view returns (uint256) {
}
function getDepositDelay() external pure returns (uint256) {
}
function getDepositorAddress() external view returns (address) {
}
function getDepositsAmount() external view returns (uint256) {
}
function getDepositData(uint256 depositId) external view returns (uint256 tokens, uint256 usersLength) {
}
function getUserLastWithdraw(address user) external view returns (uint256) {
}
}
| ownersIndices[newOwners[i]]==0,"transferOwnershipWithHowMany: owners array contains duplicates" | 281,314 | ownersIndices[newOwners[i]]==0 |
"Can only be called once a day" | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
contract DistibutionContract5 is Pausable {
using SafeMath for uint256;
uint256 constant public decimals = 1 ether;
address[] public tokenOwners ; /* Tracks distributions mapping (iterable) */
uint256 public TGEDate = 0; /* Date From where the distribution starts (TGE) */
uint256 constant public month = 30 days;
uint256 constant public year = 365 days;
uint256 public lastDateDistribution = 0;
mapping(address => DistributionStep[]) public distributions; /* Distribution object */
ERC20 public erc20;
struct DistributionStep {
uint256 amountAllocated;
uint256 currentAllocated;
uint256 unlockDay;
uint256 amountSent;
}
constructor() public{
}
function setTokenAddress(address _tokenAddress) external onlyOwner whenNotPaused {
}
function safeGuardAllTokens(address _address) external onlyOwner whenPaused {
}
function setTGEDate(uint256 _time) external onlyOwner whenNotPaused {
}
/**
* Should allow any address to trigger it, but since the calls are atomic it should do only once per day
*/
function triggerTokenSend() external whenNotPaused {
/* Require TGE Date already been set */
require(TGEDate != 0, "TGE date not set yet");
/* TGE has not started */
require(block.timestamp > TGEDate, "TGE still hasn´t started");
/* Test that the call be only done once per day */
require(<FILL_ME>)
lastDateDistribution = block.timestamp;
/* Go thru all tokenOwners */
for(uint i = 0; i < tokenOwners.length; i++) {
/* Get Address Distribution */
DistributionStep[] memory d = distributions[tokenOwners[i]];
/* Go thru all distributions array */
for(uint j = 0; j < d.length; j++){
if( (block.timestamp.sub(TGEDate) > d[j].unlockDay) /* Verify if unlockDay has passed */
&& (d[j].currentAllocated > 0) /* Verify if currentAllocated > 0, so that address has tokens to be sent still */
){
uint256 sendingAmount;
sendingAmount = d[j].currentAllocated;
distributions[tokenOwners[i]][j].currentAllocated = distributions[tokenOwners[i]][j].currentAllocated.sub(sendingAmount);
distributions[tokenOwners[i]][j].amountSent = distributions[tokenOwners[i]][j].amountSent.add(sendingAmount);
require(erc20.transfer(tokenOwners[i], sendingAmount));
}
}
}
}
function setInitialDistribution(address _address, uint256 _tokenAmount, uint256 _unlockDays) internal onlyOwner whenNotPaused {
}
}
| block.timestamp.sub(lastDateDistribution)>1days,"Can only be called once a day" | 281,593 | block.timestamp.sub(lastDateDistribution)>1days |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
contract DistibutionContract5 is Pausable {
using SafeMath for uint256;
uint256 constant public decimals = 1 ether;
address[] public tokenOwners ; /* Tracks distributions mapping (iterable) */
uint256 public TGEDate = 0; /* Date From where the distribution starts (TGE) */
uint256 constant public month = 30 days;
uint256 constant public year = 365 days;
uint256 public lastDateDistribution = 0;
mapping(address => DistributionStep[]) public distributions; /* Distribution object */
ERC20 public erc20;
struct DistributionStep {
uint256 amountAllocated;
uint256 currentAllocated;
uint256 unlockDay;
uint256 amountSent;
}
constructor() public{
}
function setTokenAddress(address _tokenAddress) external onlyOwner whenNotPaused {
}
function safeGuardAllTokens(address _address) external onlyOwner whenPaused {
}
function setTGEDate(uint256 _time) external onlyOwner whenNotPaused {
}
/**
* Should allow any address to trigger it, but since the calls are atomic it should do only once per day
*/
function triggerTokenSend() external whenNotPaused {
/* Require TGE Date already been set */
require(TGEDate != 0, "TGE date not set yet");
/* TGE has not started */
require(block.timestamp > TGEDate, "TGE still hasn´t started");
/* Test that the call be only done once per day */
require(block.timestamp.sub(lastDateDistribution) > 1 days, "Can only be called once a day");
lastDateDistribution = block.timestamp;
/* Go thru all tokenOwners */
for(uint i = 0; i < tokenOwners.length; i++) {
/* Get Address Distribution */
DistributionStep[] memory d = distributions[tokenOwners[i]];
/* Go thru all distributions array */
for(uint j = 0; j < d.length; j++){
if( (block.timestamp.sub(TGEDate) > d[j].unlockDay) /* Verify if unlockDay has passed */
&& (d[j].currentAllocated > 0) /* Verify if currentAllocated > 0, so that address has tokens to be sent still */
){
uint256 sendingAmount;
sendingAmount = d[j].currentAllocated;
distributions[tokenOwners[i]][j].currentAllocated = distributions[tokenOwners[i]][j].currentAllocated.sub(sendingAmount);
distributions[tokenOwners[i]][j].amountSent = distributions[tokenOwners[i]][j].amountSent.add(sendingAmount);
require(<FILL_ME>)
}
}
}
}
function setInitialDistribution(address _address, uint256 _tokenAmount, uint256 _unlockDays) internal onlyOwner whenNotPaused {
}
}
| erc20.transfer(tokenOwners[i],sendingAmount) | 281,593 | erc20.transfer(tokenOwners[i],sendingAmount) |
"Account is already excluded" | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
require(<FILL_ME>)
require(_excludedFromReflection.length + 1 <= 50, "Cannot exclude more than 50 accounts. Include a previously excluded address.");
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcludedFromReflection[account] = true;
_excludedFromReflection.push(account);
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| !_isExcludedFromReflection[account],"Account is already excluded" | 281,645 | !_isExcludedFromReflection[account] |
"Cannot exclude more than 50 accounts. Include a previously excluded address." | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
require(!_isExcludedFromReflection[account], "Account is already excluded");
require(<FILL_ME>)
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcludedFromReflection[account] = true;
_excludedFromReflection.push(account);
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _excludedFromReflection.length+1<=50,"Cannot exclude more than 50 accounts. Include a previously excluded address." | 281,645 | _excludedFromReflection.length+1<=50 |
"Account is not excluded from reflection" | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
}
function includeInReflection(address account) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _excludedFromReflection.length; i++) {
if (_excludedFromReflection[i] == account) {
_excludedFromReflection[i] = _excludedFromReflection[_excludedFromReflection.length - 1];
_tOwned[account] = 0;
_isExcludedFromReflection[account] = false;
_excludedFromReflection.pop();
break;
}
}
}
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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _isExcludedFromReflection[account],"Account is not excluded from reflection" | 281,645 | _isExcludedFromReflection[account] |
null | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _msgSender()==_ikcAddress | 281,645 | _msgSender()==_ikcAddress |
null | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 manualSwap() external {
}
function manualSend() external {
require(<FILL_ME>)
uint256 contractETHBalance = address(this).balance;
sendETHToFee(contractETHBalance);
}
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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _msgSender()==_ikcAddress||_msgSender()==_mktgAddress | 281,645 | _msgSender()==_ikcAddress||_msgSender()==_mktgAddress |
"Must keep buy taxes below 25%" | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
_reflectionFeeOnBuy = reflectionFeeOnBuy;
_taxFeeOnBuy = taxFeeOnBuy;
_reflectionFeeOnSell = reflectionFeeOnSell;
_taxFeeOnSell = taxFeeOnSell;
require(<FILL_ME>) //wont allow taxes to go above 10%
require(_reflectionFeeOnSell + _taxFeeOnSell <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10%
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _reflectionFeeOnBuy+_taxFeeOnBuy<=25,"Must keep buy taxes below 25%" | 281,645 | _reflectionFeeOnBuy+_taxFeeOnBuy<=25 |
"Must keep buy taxes below 25%" | /**
Inter-Kongz Capital: $IKC
-Whose Kongz is that? I think I know.
Its owner is quite happy though.
Full of joy like a vivid rainbow,
I watch him laugh. I cry hello.
He gives his Kongz a shake,
And laughs until her belly aches.
The only other sound's the break,
Of distant waves and birds awake.
The Kongz is Cyber, and deep,
But he has promises to keep,
After cake and lots of sleep.
Sweet dreams come to him cheap.
-Custom contract imporvement from CyberKongz community.
-We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders.
-You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders.
Tokenomics:
10% of tax goes to existing holders.
10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens.
Roar.
*/
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
);
}
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 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 InterKongzCapital is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "InterKongzCapital";
string private constant _symbol = "IKC";
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;
mapping (address => bool) public _isExcludedMaxTxAmount;
mapping(address => bool) private _isExcludedFromReflection;
address[] private _excludedFromReflection;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
mapping(address => bool) public bots;
uint256 private _reflectionFeeOnBuy = 10;
uint256 private _taxFeeOnBuy = 15;
uint256 private _reflectionFeeOnSell = 10;
uint256 private _taxFeeOnSell = 15;
//Original Fee
uint256 private _reflectionFee = _reflectionFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousReflectionFee = _reflectionFee;
uint256 private _previousTaxFee = _taxFee;
//change these addresses or you will burn your dev tax
address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet
address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
bool private swapEnabled = true;
bool public tradingActive = false;
uint256 public _maxTxAmount = 5000 * 1e8 * 1e9;
uint256 public _maxWalletSize = 5000 * 1e8 * 1e9;
uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9;
event ExcludeFromReflection(address excludedAddress);
event IncludeInReflection(address includedAddress);
event ExcludeFromFee(address excludedAddress);
event IncludeInFee(address includedAddress);
event UpdatedMktgAddress(address mktg); //team support wallet
event UpdatedikcAddress(address ikc); //investment wallet
event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee);
event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee);
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 excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function excludeFromReflection(address account) public onlyOwner {
}
function includeInReflection(address account) public onlyOwner {
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function 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 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 reflectionFee,
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 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
_reflectionFeeOnBuy = reflectionFeeOnBuy;
_taxFeeOnBuy = taxFeeOnBuy;
_reflectionFeeOnSell = reflectionFeeOnSell;
_taxFeeOnSell = taxFeeOnSell;
require(_reflectionFeeOnBuy + _taxFeeOnBuy <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10%
require(<FILL_ME>) //wont allow taxes to go above 10%
}
// once enabled, can never be turned off
function enableTrading() internal onlyOwner {
}
function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
}
//Set minimum tokens required to swap.
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner {
}
//Set max transaction
function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner {
}
function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner {
}
//set max wallet
function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner {
}
//set wallet address
function _setikcAddress(address ikcAddress) external onlyOwner {
}
//set wallet address
function _setMktgAddress(address mktgAddress) external onlyOwner {
}
}
| _reflectionFeeOnSell+_taxFeeOnSell<=25,"Must keep buy taxes below 25%" | 281,645 | _reflectionFeeOnSell+_taxFeeOnSell<=25 |
'only 1 mint per wallet address' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.5;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
contract tokenGarden is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
string public metadataFolderURI;
mapping(address => uint256) public minted;
uint256 public constant price = 0.01 ether;
uint256 public reverseBirthday;
bool public mintActive;
uint256 public freeMints;
uint256 public mintsPerAddress;
string public openseaContractMetadataURL;
constructor(
string memory _name,
string memory _symbol,
string memory _metadataFolderURI,
uint256 _freeMints,
uint256 _mintsPerAddress,
string memory _openseaContractMetadataURL,
bool _mintActive
) ERC721(_name, _symbol) {
}
function setMetadataFolderURI(string calldata folderUrl) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function mint() public payable {
require(mintActive == true, 'mint is not active rn..');
require(tx.origin == msg.sender, "dont get Seven'd");
require(<FILL_ME>)
// First 144 are free
if (freeMints <= _tokenIds.current()) {
require(msg.value == price, 'minting is no longer free, it costs 0.01 eth');
}
_tokenIds.increment();
minted[msg.sender]++;
uint256 tokenId = _tokenIds.current();
_safeMint(msg.sender, tokenId);
}
function isMintFree() external view returns (bool) {
}
function mintedCount() external view returns (uint256) {
}
function setMintActive(bool _mintActive) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function pay(address payee, uint256 amountInEth) public onlyOwner {
}
function getBalance() external view returns (uint256) {
}
}
| minted[msg.sender]<mintsPerAddress,'only 1 mint per wallet address' | 281,646 | minted[msg.sender]<mintsPerAddress |
"NOT_STAKED" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2021, Offchain Labs, Inc.
*
* 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.
*/
pragma solidity ^0.6.11;
import "./Rollup.sol";
import "./facets/IRollupFacets.sol";
import "../bridge/interfaces/IBridge.sol";
import "../bridge/interfaces/IMessageProvider.sol";
import "./INode.sol";
import "../libraries/Cloneable.sol";
contract RollupEventBridge is IMessageProvider, Cloneable {
uint8 internal constant INITIALIZATION_MSG_TYPE = 4;
uint8 internal constant ROLLUP_PROTOCOL_EVENT_TYPE = 8;
uint8 internal constant CREATE_NODE_EVENT = 0;
uint8 internal constant CONFIRM_NODE_EVENT = 1;
uint8 internal constant REJECT_NODE_EVENT = 2;
uint8 internal constant STAKE_CREATED_EVENT = 3;
uint8 internal constant CLAIM_NODE_EVENT = 4;
IBridge bridge;
address rollup;
modifier onlyRollup {
}
function initialize(address _bridge, address _rollup) external {
}
function rollupInitialized(
uint256 confirmPeriodBlocks,
uint256 arbGasSpeedLimitPerBlock,
uint256 baseStake,
address stakeToken,
address owner,
bytes calldata extraConfig
) external onlyRollup {
}
function nodeCreated(
uint256 nodeNum,
uint256 prev,
uint256 deadline,
address asserter
) external onlyRollup {
}
function nodeConfirmed(uint256 nodeNum) external onlyRollup {
}
function nodeRejected(uint256 nodeNum) external onlyRollup {
}
function stakeCreated(address staker, uint256 nodeNum) external onlyRollup {
}
function claimNode(uint256 nodeNum, address staker) external onlyRollup {
Rollup r = Rollup(payable(rollup));
INode node = r.getNode(nodeNum);
require(<FILL_ME>)
IRollupUser(address(r)).requireUnresolved(nodeNum);
deliverToBridge(
abi.encodePacked(CLAIM_NODE_EVENT, nodeNum, uint256(uint160(bytes20(staker))))
);
}
function deliverToBridge(bytes memory message) private {
}
}
| node.stakers(staker),"NOT_STAKED" | 281,673 | node.stakers(staker) |
"Exceeds Max Mint amount" | pragma solidity ^0.8.7;
contract ToonsOG is ERC721A, Ownable {
using Strings for uint256;
address breedingContract;
string public baseApiURI;
bytes32 private whitelistRoot;
//General Settings
uint16 public maxMintAmountPerTransaction = 1;
uint16 public maxMintAmountPerWallet = 1;
//whitelisting Settings
uint16 public maxMintAmountPerWhitelist = 1;
//Inventory
uint256 public maxSupply = 40;
//Prices
uint256 public cost = 0.11 ether;
uint256 public whitelistCost = 0.11 ether;
//Utility
bool public paused = true;
bool public whiteListingSale = true;
//mapping
mapping(address => uint256) private whitelistedMints;
constructor(string memory _baseUrl) ERC721A("ToonsOg", "TOG") {
}
//This function will be used to extend the project with more capabilities
function setBreedingContractAddress(address _bAddress) public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
//this function can be called only from the extending contract
function mintExternal(address _address, uint256 _mintAmount) external {
}
function setWhitelistingRoot(bytes32 _root) public onlyOwner {
}
// Verify that a given leaf is in the tree.
function _verify(
bytes32 _leafNode,
bytes32[] memory proof
) internal view returns (bool) {
}
// Generate the leaf node (just the hash of tokenID concatenated with the account address)
function _leaf(address account) internal pure returns (bytes32) {
}
//whitelist mint
function mintWhitelist(
bytes32[] calldata proof,
uint256 _mintAmount
) public payable {
//Normal WL Verifications
require(
_verify(_leaf(msg.sender), proof),
"Invalid proof"
);
require(<FILL_ME>)
require(
msg.value >= (whitelistCost * _mintAmount),
"Insuffient funds"
);
//END WL Verifications
//Mint
_mintLoop(msg.sender, _mintAmount);
whitelistedMints[msg.sender] =
whitelistedMints[msg.sender] +
_mintAmount;
}
function numberMinted(address owner) public view returns (uint256) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
function gift(address _to, uint256 _mintAmount) public onlyOwner {
}
function airdrop(address[] memory _airdropAddresses) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setWhitelistingCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPerTransaction(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWhitelist(uint16 _amount) public onlyOwner {
}
function setMaxSupply(uint256 _supply) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function toggleWhiteSale() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function withdraw() public payable onlyOwner {
}
}
| (whitelistedMints[msg.sender]+_mintAmount)<=maxMintAmountPerWhitelist,"Exceeds Max Mint amount" | 281,824 | (whitelistedMints[msg.sender]+_mintAmount)<=maxMintAmountPerWhitelist |
"Insuffient funds" | pragma solidity ^0.8.7;
contract ToonsOG is ERC721A, Ownable {
using Strings for uint256;
address breedingContract;
string public baseApiURI;
bytes32 private whitelistRoot;
//General Settings
uint16 public maxMintAmountPerTransaction = 1;
uint16 public maxMintAmountPerWallet = 1;
//whitelisting Settings
uint16 public maxMintAmountPerWhitelist = 1;
//Inventory
uint256 public maxSupply = 40;
//Prices
uint256 public cost = 0.11 ether;
uint256 public whitelistCost = 0.11 ether;
//Utility
bool public paused = true;
bool public whiteListingSale = true;
//mapping
mapping(address => uint256) private whitelistedMints;
constructor(string memory _baseUrl) ERC721A("ToonsOg", "TOG") {
}
//This function will be used to extend the project with more capabilities
function setBreedingContractAddress(address _bAddress) public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
//this function can be called only from the extending contract
function mintExternal(address _address, uint256 _mintAmount) external {
}
function setWhitelistingRoot(bytes32 _root) public onlyOwner {
}
// Verify that a given leaf is in the tree.
function _verify(
bytes32 _leafNode,
bytes32[] memory proof
) internal view returns (bool) {
}
// Generate the leaf node (just the hash of tokenID concatenated with the account address)
function _leaf(address account) internal pure returns (bytes32) {
}
//whitelist mint
function mintWhitelist(
bytes32[] calldata proof,
uint256 _mintAmount
) public payable {
//Normal WL Verifications
require(
_verify(_leaf(msg.sender), proof),
"Invalid proof"
);
require(
(whitelistedMints[msg.sender] + _mintAmount) <=
maxMintAmountPerWhitelist,
"Exceeds Max Mint amount"
);
require(<FILL_ME>)
//END WL Verifications
//Mint
_mintLoop(msg.sender, _mintAmount);
whitelistedMints[msg.sender] =
whitelistedMints[msg.sender] +
_mintAmount;
}
function numberMinted(address owner) public view returns (uint256) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
function gift(address _to, uint256 _mintAmount) public onlyOwner {
}
function airdrop(address[] memory _airdropAddresses) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setWhitelistingCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPerTransaction(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWhitelist(uint16 _amount) public onlyOwner {
}
function setMaxSupply(uint256 _supply) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function toggleWhiteSale() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function withdraw() public payable onlyOwner {
}
}
| msg.value>=(whitelistCost*_mintAmount),"Insuffient funds" | 281,824 | msg.value>=(whitelistCost*_mintAmount) |
"You cant mint on Presale" | pragma solidity ^0.8.7;
contract ToonsOG is ERC721A, Ownable {
using Strings for uint256;
address breedingContract;
string public baseApiURI;
bytes32 private whitelistRoot;
//General Settings
uint16 public maxMintAmountPerTransaction = 1;
uint16 public maxMintAmountPerWallet = 1;
//whitelisting Settings
uint16 public maxMintAmountPerWhitelist = 1;
//Inventory
uint256 public maxSupply = 40;
//Prices
uint256 public cost = 0.11 ether;
uint256 public whitelistCost = 0.11 ether;
//Utility
bool public paused = true;
bool public whiteListingSale = true;
//mapping
mapping(address => uint256) private whitelistedMints;
constructor(string memory _baseUrl) ERC721A("ToonsOg", "TOG") {
}
//This function will be used to extend the project with more capabilities
function setBreedingContractAddress(address _bAddress) public onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
//this function can be called only from the extending contract
function mintExternal(address _address, uint256 _mintAmount) external {
}
function setWhitelistingRoot(bytes32 _root) public onlyOwner {
}
// Verify that a given leaf is in the tree.
function _verify(
bytes32 _leafNode,
bytes32[] memory proof
) internal view returns (bool) {
}
// Generate the leaf node (just the hash of tokenID concatenated with the account address)
function _leaf(address account) internal pure returns (bytes32) {
}
//whitelist mint
function mintWhitelist(
bytes32[] calldata proof,
uint256 _mintAmount
) public payable {
}
function numberMinted(address owner) public view returns (uint256) {
}
// public
function mint(uint256 _mintAmount) public payable {
if (msg.sender != owner()) {
uint256 ownerTokenCount = balanceOf(msg.sender);
require(!paused);
require(<FILL_ME>)
require(_mintAmount > 0, "Mint amount should be greater than 0");
require(
_mintAmount <= maxMintAmountPerTransaction,
"Sorry you cant mint this amount at once"
);
require(
totalSupply() + _mintAmount <= maxSupply,
"Exceeds Max Supply"
);
require(
(ownerTokenCount + _mintAmount) <= maxMintAmountPerWallet,
"Sorry you cant mint more"
);
require(msg.value >= cost * _mintAmount, "Insuffient funds");
}
_mintLoop(msg.sender, _mintAmount);
}
function gift(address _to, uint256 _mintAmount) public onlyOwner {
}
function airdrop(address[] memory _airdropAddresses) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setWhitelistingCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPerTransaction(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWallet(uint16 _amount) public onlyOwner {
}
function setMaxMintAmountPerWhitelist(uint16 _amount) public onlyOwner {
}
function setMaxSupply(uint256 _supply) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function togglePause() public onlyOwner {
}
function toggleWhiteSale() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
function withdraw() public payable onlyOwner {
}
}
| !whiteListingSale,"You cant mint on Presale" | 281,824 | !whiteListingSale |
"already sold" | pragma solidity ^0.5.10;
contract MolochLike {
function updateDelegateKey(address) external;
function submitVote(uint256, uint8) external;
function submitProposal(address, uint256, uint256, string calldata) external;
function processProposal(uint256) external;
function getProposalQueueLength() external view returns (uint256);
function getMemberProposalVote(address, uint256) external view returns (uint256);
function proposalDeposit() external view returns (uint256);
function periodDuration() external view returns (uint256);
function approvedToken() external view returns (address);
}
contract GemLike {
function approve(address, uint256) external returns (bool);
function transfer(address, uint256) external returns (bool);
function balanceOf(address) external view returns (uint256);
}
contract WethLike is GemLike {
function deposit() external payable;
}
contract SelloutDao {
address public owner;
MolochLike public dao;
GemLike public gem;
address public hat;
bool public sold;
uint256 public prop;
bool public voted;
modifier auth() {
}
modifier only_hat() {
}
constructor(MolochLike dao_) public {
}
function () external payable {
}
function buy() public payable {
require(<FILL_ME>)
require(msg.value >= 0.5 ether, "need to send at least 0.5 eth");
sold = true;
hat = msg.sender;
}
function make(address who, uint256 tribute, uint256 shares, string calldata text) external only_hat {
}
function vote(uint8 val) external only_hat {
}
function take() external auth {
}
}
| !sold,"already sold" | 281,856 | !sold |
"No more tokens available" | pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual {
}
function _setOwner(address newOwner) public {
}
}
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
function reset(Counter storage counter) internal {
}
}
pragma solidity ^0.8.0;
//import "@openzeppelin/contracts/utils/Counters.sol";
/// @author 1001.digital
/// @title A token tracker that limits the token supply and increments token IDs on each new mint.
abstract contract WithLimitedSupply {
using Counters for Counters.Counter;
// Keeps track of how many we have minted
Counters.Counter private _tokenCount;
/// @dev The maximum count of tokens this token tracker will hold.
uint256 private _totalSupply;
/// Instanciate the contract
/// @param totalSupply_ how many tokens this collection should hold
constructor (uint256 totalSupply_) {
}
/// @dev Get the max Supply
/// @return the maximum token count
function totalLimitedSupply() public view returns (uint256) {
}
/// @dev Get the current token count
/// @return the created token count
function tokenCount() public view returns (uint256) {
}
/// @dev Check whether tokens are still available
/// @return the available token count
function availableTokenCount() public view returns (uint256) {
}
/// @dev Increment the token count and fetch the latest count
/// @return the next token id
function nextToken() internal virtual ensureAvailability returns (uint256) {
}
/// @dev Check whether another token is still available
modifier ensureAvailability() {
require(<FILL_ME>)
_;
}
/// @param amount Check whether number of tokens are still available
/// @dev Check whether tokens are still available
modifier ensureAvailabilityFor(uint256 amount) {
}
}
pragma solidity ^0.8.0;
/// @author 1001.digital
/// @title Randomly assign tokenIDs from a given set of tokens.
abstract contract RandomlyAssigned is WithLimitedSupply {
// Used for random index assignment
mapping(uint256 => uint256) private tokenMatrix;
// The initial token ID
uint256 private startFrom;
/// Instanciate the contract
/// @param _totalSupply how many tokens this collection should hold
/// @param _startFrom the tokenID with which to start counting
constructor (uint256 _totalSupply, uint256 _startFrom)
WithLimitedSupply(_totalSupply)
{
}
/// Get the next token ID
/// @dev Randomly gets a new token ID and keeps track of the ones that are still available.
/// @return the next token ID
function nextToken() internal override ensureAvailability returns (uint256) {
}
}
| availableTokenCount()>0,"No more tokens available" | 281,865 | availableTokenCount()>0 |
"Requested number of tokens not available" | pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
function owner() public view virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual {
}
function _setOwner(address newOwner) public {
}
}
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
function reset(Counter storage counter) internal {
}
}
pragma solidity ^0.8.0;
//import "@openzeppelin/contracts/utils/Counters.sol";
/// @author 1001.digital
/// @title A token tracker that limits the token supply and increments token IDs on each new mint.
abstract contract WithLimitedSupply {
using Counters for Counters.Counter;
// Keeps track of how many we have minted
Counters.Counter private _tokenCount;
/// @dev The maximum count of tokens this token tracker will hold.
uint256 private _totalSupply;
/// Instanciate the contract
/// @param totalSupply_ how many tokens this collection should hold
constructor (uint256 totalSupply_) {
}
/// @dev Get the max Supply
/// @return the maximum token count
function totalLimitedSupply() public view returns (uint256) {
}
/// @dev Get the current token count
/// @return the created token count
function tokenCount() public view returns (uint256) {
}
/// @dev Check whether tokens are still available
/// @return the available token count
function availableTokenCount() public view returns (uint256) {
}
/// @dev Increment the token count and fetch the latest count
/// @return the next token id
function nextToken() internal virtual ensureAvailability returns (uint256) {
}
/// @dev Check whether another token is still available
modifier ensureAvailability() {
}
/// @param amount Check whether number of tokens are still available
/// @dev Check whether tokens are still available
modifier ensureAvailabilityFor(uint256 amount) {
require(<FILL_ME>)
_;
}
}
pragma solidity ^0.8.0;
/// @author 1001.digital
/// @title Randomly assign tokenIDs from a given set of tokens.
abstract contract RandomlyAssigned is WithLimitedSupply {
// Used for random index assignment
mapping(uint256 => uint256) private tokenMatrix;
// The initial token ID
uint256 private startFrom;
/// Instanciate the contract
/// @param _totalSupply how many tokens this collection should hold
/// @param _startFrom the tokenID with which to start counting
constructor (uint256 _totalSupply, uint256 _startFrom)
WithLimitedSupply(_totalSupply)
{
}
/// Get the next token ID
/// @dev Randomly gets a new token ID and keeps track of the ones that are still available.
/// @return the next token ID
function nextToken() internal override ensureAvailability returns (uint256) {
}
}
| availableTokenCount()>=amount,"Requested number of tokens not available" | 281,865 | availableTokenCount()>=amount |
"!voted" | pragma solidity ^0.5.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public vote = IERC20(0xa279dab6ec190eE4Efce7Da72896EB58AD533262);
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function withdraw(uint256 amount) public {
}
}
interface Executor {
function execute(uint, uint, uint, uint) external;
}
contract YFUGovernance is LPTokenWrapper, IRewardDistributionRecipient {
/* Fee collection for any other token */
function seize(IERC20 _token, uint amount) external {
}
/* Fees breaker, to protect withdraws if anything ever goes wrong */
bool public breaker = false;
function setBreaker(bool _breaker) external {
}
/* Modifications for proposals */
mapping(address => uint) public voteLock; // period that your sake it locked to keep it for voting
struct Proposal {
uint id;
address proposer;
mapping(address => uint) forVotes;
mapping(address => uint) againstVotes;
uint totalForVotes;
uint totalAgainstVotes;
uint start; // block start;
uint end; // start + period
address executor;
string hash;
uint totalVotesAvailable;
uint quorum;
uint quorumRequired;
bool open;
}
mapping (uint => Proposal) public proposals;
uint public proposalCount;
uint public period = 17280; // voting period in blocks ~ 17280 3 days for 15s/block
uint public lock = 17280; // vote lock in blocks ~ 17280 3 days for 15s/block
uint public minimum = 1e18;
uint public quorum = 2000;
bool public config = true;
address public governance;
function setGovernance(address _governance) public {
}
function setQuorum(uint _quorum) public {
}
function setMinimum(uint _minimum) public {
}
function setPeriod(uint _period) public {
}
function setLock(uint _lock) public {
}
function initialize(uint id) public {
}
event NewProposal(uint id, address creator, uint start, uint duration, address executor);
event Vote(uint indexed id, address indexed voter, bool vote, uint weight);
function propose(address executor, string memory hash) public {
}
function execute(uint id) public {
}
function getStats(uint id) public view returns (uint _for, uint _against, uint _quorum) {
}
event ProposalFinished(uint indexed id, uint _for, uint _against, bool quorumReached);
function tallyVotes(uint id) public {
}
function votesOf(address voter) public view returns (uint) {
}
uint public totalVotes;
mapping(address => uint) public votes;
event RegisterVoter(address voter, uint votes, uint totalVotes);
event RevokeVoter(address voter, uint votes, uint totalVotes);
function register() public {
}
function revoke() public {
}
mapping(address => bool) public voters;
function voteFor(uint id) public {
}
function voteAgainst(uint id) public {
}
/* Default rewards contract */
IERC20 public token = IERC20(0xa279dab6ec190eE4Efce7Da72896EB58AD533262);
uint256 public constant DURATION = 7 days;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
modifier updateReward(address account) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public updateReward(msg.sender) {
}
function withdraw(uint256 amount) public updateReward(msg.sender) {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) {
if (breaker == false) {
require(<FILL_ME>)
}
uint256 reward = earned(msg.sender);
if (reward > 0) {
rewards[msg.sender] = 0;
token.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
}
}
| voteLock[msg.sender]>block.number,"!voted" | 281,916 | voteLock[msg.sender]>block.number |
"Max supply reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./ERC721Enumerable.sol";
import "./OpenSea.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract LarvaLarms is ERC721Enumerable, OpenSea, Ownable, PaymentSplitter {
using Strings for uint256;
string private _baseTokenURI;
string private _tokenURISuffix;
uint256 public price = 11100000000000000; // 0.0111 ETH
uint256 public constant MAX_SUPPLY = 3335;
uint256 public maxPerTx = 20;
bool public started = false;
constructor(
address openSeaProxyRegistry,
address[] memory _payees,
uint256[] memory _shares
) ERC721("LarvaLarms", "LarvaLarms") PaymentSplitter(_payees, _shares) {
}
function mint(uint256 count) public payable {
require(started, "Minting not started");
require(count <= maxPerTx, "Exceed max per transaction");
uint256 supply = _owners.length;
require(<FILL_ME>)
if (supply < 2223 && supply + count > 2223) {
uint256 payCount = supply + count - 2223;
require(payCount * price == msg.value, "Invalid funds provided.");
} else if (supply >= 2223) {
require(count * price == msg.value, "Invalid funds provided.");
}
for (uint256 i; i < count; i++) {
_safeMint(msg.sender, supply++);
}
}
function tokenURI(uint256 tokenId)
external
view
virtual
override
returns (string memory)
{
}
function setBaseURI(string calldata _newBaseURI, string calldata _newSuffix)
external
onlyOwner
{
}
function toggleStarted() external onlyOwner {
}
function airdrop(uint256[] calldata quantity, address[] calldata recipient)
external
onlyOwner
{
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
| supply+count<MAX_SUPPLY,"Max supply reached" | 281,925 | supply+count<MAX_SUPPLY |
"Invalid funds provided." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./ERC721Enumerable.sol";
import "./OpenSea.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract LarvaLarms is ERC721Enumerable, OpenSea, Ownable, PaymentSplitter {
using Strings for uint256;
string private _baseTokenURI;
string private _tokenURISuffix;
uint256 public price = 11100000000000000; // 0.0111 ETH
uint256 public constant MAX_SUPPLY = 3335;
uint256 public maxPerTx = 20;
bool public started = false;
constructor(
address openSeaProxyRegistry,
address[] memory _payees,
uint256[] memory _shares
) ERC721("LarvaLarms", "LarvaLarms") PaymentSplitter(_payees, _shares) {
}
function mint(uint256 count) public payable {
require(started, "Minting not started");
require(count <= maxPerTx, "Exceed max per transaction");
uint256 supply = _owners.length;
require(supply + count < MAX_SUPPLY, "Max supply reached");
if (supply < 2223 && supply + count > 2223) {
uint256 payCount = supply + count - 2223;
require(<FILL_ME>)
} else if (supply >= 2223) {
require(count * price == msg.value, "Invalid funds provided.");
}
for (uint256 i; i < count; i++) {
_safeMint(msg.sender, supply++);
}
}
function tokenURI(uint256 tokenId)
external
view
virtual
override
returns (string memory)
{
}
function setBaseURI(string calldata _newBaseURI, string calldata _newSuffix)
external
onlyOwner
{
}
function toggleStarted() external onlyOwner {
}
function airdrop(uint256[] calldata quantity, address[] calldata recipient)
external
onlyOwner
{
}
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
| payCount*price==msg.value,"Invalid funds provided." | 281,925 | payCount*price==msg.value |
null | /**
* @title ICHX token contract.
*/
contract ICHXToken is BaseICOToken, SelfDestructible, Withdrawal {
using SafeMath for uint;
string public constant name = "IceChain";
string public constant symbol = "ICHX";
uint8 public constant decimals = 18;
uint internal constant ONE_TOKEN = 1e18;
constructor(uint totalSupplyTokens_,
uint companyTokens_) public
BaseICOToken(totalSupplyTokens_.mul(ONE_TOKEN)) {
}
// Disable direct payments
function() external payable {
}
/**
* @dev Assign `amountWei_` of wei converted into tokens to investor identified by `to_` address.
* @param to_ Investor address.
* @param amountWei_ Number of wei invested
* @param ethTokenExchangeRatio_ Number of tokens in 1 Eth
* @return Amount of invested tokens
*/
function icoInvestmentWei(address to_, uint amountWei_, uint ethTokenExchangeRatio_) public onlyICO returns (uint) {
uint amount = amountWei_.mul(ethTokenExchangeRatio_).mul(ONE_TOKEN).div(1 ether);
require(<FILL_ME>)
availableSupply = availableSupply.sub(amount);
balances[to_] = balances[to_].add(amount);
emit ICOTokensInvested(to_, amount);
return amount;
}
}
| isValidICOInvestment(to_,amount) | 281,940 | isValidICOInvestment(to_,amount) |
null | pragma solidity ^0.4.19;
/**
* Virtual Cash (VCA) Token
*
* This is a very simple token with the following properties:
* - 20.000.000 tokens maximum supply
* - 15.000.000 crowdsale allocation
* - 5.000.000 initial supply to be use for Bonus, Airdrop, Marketing, Ads, Bounty, Future Dev, Reserved tokens
* - Investor receives bonus tokens from Company Wallet during bonus phases
*
* Visit https://virtualcash.shop for more information and token holder benefits.
*/
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
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) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @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) {
}
/**
* 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) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @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 {
}
}
/**
* @dev VCA_Token is StandardToken, Ownable
*/
contract VCA_Token is StandardToken, Ownable {
string public constant name = "Virtual Cash";
string public constant symbol = "VCA";
uint256 public constant decimals = 8;
uint256 public constant UNIT = 10 ** decimals;
address public companyWallet;
address public admin;
uint256 public tokenPrice = 0.00025 ether;
uint256 public maxSupply = 20000000 * UNIT;
uint256 public totalSupply = 0;
uint256 public totalWeiReceived = 0;
uint256 startDate = 1517443260; // 12:01 GMT February 1 2018
uint256 endDate = 1522537260; // 12:00 GMT March 15 2018
uint256 bonus35end = 1517702460; // 12:01 GMT February 4 2018
uint256 bonus32end = 1517961660; // 12:01 GMT February 7 2018
uint256 bonus29end = 1518220860; // 12:01 GMT February 10 2018
uint256 bonus26end = 1518480060; // 12:01 GMT February 13 2018
uint256 bonus23end = 1518825660; // 12:01 GMT February 17 2018
uint256 bonus20end = 1519084860; // 12:01 GMT February 20 2018
uint256 bonus17end = 1519344060; // 12:01 GMT February 23 2018
uint256 bonus14end = 1519603260; // 12:01 GMT February 26 2018
uint256 bonus11end = 1519862460; // 12:01 GMT March 1 2018
uint256 bonus09end = 1520121660; // 12:01 GMT March 4 2018
uint256 bonus06end = 1520380860; // 12:01 GMT March 7 2018
uint256 bonus03end = 1520640060; // 12:01 GMT March 10 2018
/**
* 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);
event NewSale();
modifier onlyAdmin() {
}
function VCA_Token(address _companyWallet, address _admin) public {
}
function setAdmin(address _admin) public onlyOwner {
}
function calcBonus(uint256 _amount) internal view returns (uint256) {
}
function buyTokens() public payable {
}
function() public payable {
}
/***
* This function is used to transfer tokens that have been bought through other means (credit card, bitcoin, etc), and to burn tokens after the sale.
*/
function sendTokens(address receiver, uint256 tokens) public onlyAdmin {
require(now < endDate);
require(now >= startDate);
require(<FILL_ME>)
uint256 amount = tokens * UNIT;
balances[receiver] += amount;
totalSupply += amount;
Transfer(address(0x0), receiver, amount);
}
}
| totalSupply+tokens*UNIT<=maxSupply | 281,996 | totalSupply+tokens*UNIT<=maxSupply |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
require(<FILL_ME>)
return true;
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| stk(tkn,amount,msg.sender) | 282,044 | stk(tkn,amount,msg.sender) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
require(<FILL_ME>)
require(stk(tkn,amount,staker));
return true;
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| modules[msg.sender] | 282,044 | modules[msg.sender] |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
require(modules[msg.sender]);
require(<FILL_ME>)
return true;
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| stk(tkn,amount,staker) | 282,044 | stk(tkn,amount,staker) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
require(amount > 0);
require(status!=2);
ERC20 token=ERC20(tkn);
uint256 allowance = token.allowance(staker, address(this));
require(allowance >= amount);
require(<FILL_ME>)
if(stake[staker]==0)total_stakers++;
stake[staker]+=amount;
total_stake+=amount;
emit Staked(staker);
return true;
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| token.transferFrom(staker,address(this),amount) | 282,044 | token.transferFrom(staker,address(this),amount) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
require(<FILL_ME>)
return true;
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| unstk(tkn,msg.sender) | 282,044 | unstk(tkn,msg.sender) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
require(modules[msg.sender]);
require(<FILL_ME>)
return true;
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| unstk(tkn,unstaker) | 282,044 | unstk(tkn,unstaker) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
require(<FILL_ME>)
if(status==1)require((startLock+lockTime)<block.number);
ERC20 token=ERC20(tkn);
require(token.transfer(unstaker, stake[unstaker]));
total_stake-=stake[unstaker];
stake[unstaker]=0;
total_stakers--;
return true;
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| stake[unstaker]>0 | 282,044 | stake[unstaker]>0 |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
require(stake[unstaker] > 0);
if(status==1)require((startLock+lockTime)<block.number);
ERC20 token=ERC20(tkn);
require(<FILL_ME>)
total_stake-=stake[unstaker];
stake[unstaker]=0;
total_stakers--;
return true;
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| token.transfer(unstaker,stake[unstaker]) | 282,044 | token.transfer(unstaker,stake[unstaker]) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
require(modules[msg.sender]);
ERC20 token=ERC20(tkn);
require(<FILL_ME>)
emit Gifted(gifted);
return true;
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| token.transfer(gifted,amount) | 282,044 | token.transfer(gifted,amount) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
require(<FILL_ME>)
require(staker.stakeNow(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount,msg.sender));
require(gifter.gift(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount*multiplier/100,msg.sender));
return true;
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| staker.status()==1 | 282,044 | staker.status()==1 |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
require(staker.status()==1);
require(<FILL_ME>)
require(gifter.gift(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount*multiplier/100,msg.sender));
return true;
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| staker.stakeNow(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount,msg.sender) | 282,044 | staker.stakeNow(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount,msg.sender) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
require(staker.status()==1);
require(staker.stakeNow(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount,msg.sender));
require(<FILL_ME>)
return true;
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| gifter.gift(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount*multiplier/100,msg.sender) | 282,044 | gifter.gift(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD,amount*multiplier/100,msg.sender) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
require(<FILL_ME>)
require(gifter.gift(berry,1,msg.sender));
return true;
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| staker.stake(msg.sender)>0 | 282,044 | staker.stake(msg.sender)>0 |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
require(staker.stake(msg.sender)>0);
require(<FILL_ME>)
return true;
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
}
}
| gifter.gift(berry,1,msg.sender) | 282,044 | gifter.gift(berry,1,msg.sender) |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
require(<FILL_ME>)
uint s=staker.stake(msg.sender);
require(s>0);
require(!rewarded[msg.sender]);
rewarded[msg.sender]=true;
require(ERC20(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD).transfer(msg.sender, 30000000000000000000/(tot*1000/s)*1000));
return true;
}
}
| staker.status()==2 | 282,044 | staker.status()==2 |
null | /*
* MultitokenPeriodicStaker
* VERSION: 1.0
*
*/
contract ERC20{
function allowance(address owner, address spender) external view returns (uint256){}
function transfer(address recipient, uint256 amount) external returns (bool){}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool){}
function balanceOf(address account) external view returns (uint256){}
}
contract PeriodicStaker {
event Staked(address staker);
uint public total_stake=0;
uint public total_stakers=0;
mapping(address => uint)public stake;
uint public status=0;
uint safeWindow=40320;
uint public startLock;
uint public lockTime;
uint minLock=10000;
uint maxLock=200000;
uint public freezeTime;
uint minFreeze=10000;
uint maxFreeze=200000;
address public master;
mapping(address => bool)public modules;
address[] public modules_list;
constructor(address mastr) public {
}
function stakeNow(address tkn,uint256 amount) public returns(bool){
}
function stakeNow(address tkn,uint amount,address staker) public returns(bool){
}
function stk(address tkn,uint amount,address staker)internal returns(bool){
}
function unstake(address tkn) public returns(bool){
}
function unstake(address tkn,address unstaker) public returns(bool){
}
function unstk(address tkn,address unstaker)internal returns(bool){
}
function openDropping(uint lock) public returns(bool){
}
function freeze(uint freez) public returns(bool){
}
function open() public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
}
contract ItemsGifterDB{
event Gifted(address gifted);
address[] public modules_list;
mapping(address => bool)public modules;
ERC20 public token;
address master;
address public receiver;
constructor() public{
}
function gift(address tkn,uint amount,address gifted) public returns(bool){
}
function burn(address tkn)public returns(bool){
}
function setModule(address new_module,bool set)public returns(bool){
}
function setMaster(address new_master)public returns(bool){
}
}
contract LockDropper{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
uint public multiplier;
constructor() public{
}
function LockDrop(uint amount) public returns(bool){
}
}
contract BerryClaimer{
PeriodicStaker public staker;
ItemsGifterDB public gifter;
address berry;
constructor() public{
}
function claimBerry() public returns(bool){
}
}
contract InstaClaimer{
PeriodicStaker public staker;
uint public tot;
mapping(address => bool) rewarded;
constructor() public{
}
function instaClaim() public returns(bool){
require(staker.status()==2);
uint s=staker.stake(msg.sender);
require(s>0);
require(!rewarded[msg.sender]);
rewarded[msg.sender]=true;
require(<FILL_ME>)
return true;
}
}
| ERC20(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD).transfer(msg.sender,30000000000000000000/(tot*1000/s)*1000) | 282,044 | ERC20(0x801F90f81786dC72B4b9d51Ab613fbe99e5E4cCD).transfer(msg.sender,30000000000000000000/(tot*1000/s)*1000) |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract TokenERC20 is owned {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/* Returns total supply of issued tokens */
function totalSupply() constant public returns (uint256 supply) {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract CDRTToken is TokenERC20 {
uint256 public buyBackPrice;
// Snapshot of PE balances by Ethereum Address and by year
mapping (uint256 => mapping (address => uint256)) public snapShot;
// This is time for next Profit Equivalent
uint256 public nextPE = 1539205199;
// List of Team and Founders account's frozen till 15 November 2018
mapping (address => uint256) public frozenAccount;
// List of all years when snapshots were made
uint[] internal yearsPast = [17];
// Holds current year PE balance
uint256 public peBalance;
// Holds full Buy Back balance
uint256 public bbBalance;
// Holds unclaimed PE balance from last periods
uint256 internal peLastPeriod;
// All ever used in transactions Ethereum Addresses' positions in list
mapping (address => uint256) internal ownerPos;
// Total number of Ethereum Addresses used in transactions
uint256 internal pos;
// All ever used in transactions Ethereum Addresses list
mapping (uint256 => address) internal addressList;
/* Handles incoming payments to contract's address */
function() payable public {
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function CDRTToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal insertion in list of all Ethereum Addresses used in transactions, called by contract */
function _insert(address _to) internal {
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
require(<FILL_ME>) // Check if sender is frozen
_insert(_to);
balanceOf[_from] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(_from, _to, _value);
}
/**
* @notice Freezes from sending & receiving tokens. For users protection can't be used after 1542326399
* and will not allow corrections.
*
* Will set freeze to 1542326399
*
* @param _from Founders and Team account we are freezing from sending
*
*/
function freezeAccount(address _from) onlyOwner public {
}
/**
* @notice Allow owner to set tokens price for Buy-Back Campaign. Can not be executed until 1539561600
*
* @param _newPrice market value of 1 CDRT Token
*
*/
function setPrice(uint256 _newPrice) onlyOwner public {
}
/**
* @notice Contract owner can take snapshot of current balances and issue PE to each balance
*
* @param _year year of the snapshot to take, must be greater than existing value
*
* @param _nextPE set new Profit Equivalent date
*
*/
function takeSnapshot(uint256 _year, uint256 _nextPE) onlyOwner public {
}
/**
* @notice Allow user to claim his PE on his Ethereum Address. Should be called manualy by user
*
*/
function claimProfitEquivalent() public{
}
/**
* @notice Allow user to sell CDRT tokens and destroy them. Can not be executed until 1539561600
*
* @param _qty amount to sell and destroy
*/
function execBuyBack(uint256 _qty) public{
}
/**
* @notice Allow owner to set balances
*
*
*/
function setBalances(uint256 _peBalance, uint256 _bbBalance) public{
}
}
| frozenAccount[_from]<now | 282,047 | frozenAccount[_from]<now |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract TokenERC20 is owned {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/* Returns total supply of issued tokens */
function totalSupply() constant public returns (uint256 supply) {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract CDRTToken is TokenERC20 {
uint256 public buyBackPrice;
// Snapshot of PE balances by Ethereum Address and by year
mapping (uint256 => mapping (address => uint256)) public snapShot;
// This is time for next Profit Equivalent
uint256 public nextPE = 1539205199;
// List of Team and Founders account's frozen till 15 November 2018
mapping (address => uint256) public frozenAccount;
// List of all years when snapshots were made
uint[] internal yearsPast = [17];
// Holds current year PE balance
uint256 public peBalance;
// Holds full Buy Back balance
uint256 public bbBalance;
// Holds unclaimed PE balance from last periods
uint256 internal peLastPeriod;
// All ever used in transactions Ethereum Addresses' positions in list
mapping (address => uint256) internal ownerPos;
// Total number of Ethereum Addresses used in transactions
uint256 internal pos;
// All ever used in transactions Ethereum Addresses list
mapping (uint256 => address) internal addressList;
/* Handles incoming payments to contract's address */
function() payable public {
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function CDRTToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal insertion in list of all Ethereum Addresses used in transactions, called by contract */
function _insert(address _to) internal {
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* @notice Freezes from sending & receiving tokens. For users protection can't be used after 1542326399
* and will not allow corrections.
*
* Will set freeze to 1542326399
*
* @param _from Founders and Team account we are freezing from sending
*
*/
function freezeAccount(address _from) onlyOwner public {
require(now < 1542326400);
require(<FILL_ME>)
frozenAccount[_from] = 1542326399;
}
/**
* @notice Allow owner to set tokens price for Buy-Back Campaign. Can not be executed until 1539561600
*
* @param _newPrice market value of 1 CDRT Token
*
*/
function setPrice(uint256 _newPrice) onlyOwner public {
}
/**
* @notice Contract owner can take snapshot of current balances and issue PE to each balance
*
* @param _year year of the snapshot to take, must be greater than existing value
*
* @param _nextPE set new Profit Equivalent date
*
*/
function takeSnapshot(uint256 _year, uint256 _nextPE) onlyOwner public {
}
/**
* @notice Allow user to claim his PE on his Ethereum Address. Should be called manualy by user
*
*/
function claimProfitEquivalent() public{
}
/**
* @notice Allow user to sell CDRT tokens and destroy them. Can not be executed until 1539561600
*
* @param _qty amount to sell and destroy
*/
function execBuyBack(uint256 _qty) public{
}
/**
* @notice Allow owner to set balances
*
*
*/
function setBalances(uint256 _peBalance, uint256 _bbBalance) public{
}
}
| frozenAccount[_from]==0 | 282,047 | frozenAccount[_from]==0 |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract TokenERC20 is owned {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/* Returns total supply of issued tokens */
function totalSupply() constant public returns (uint256 supply) {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract CDRTToken is TokenERC20 {
uint256 public buyBackPrice;
// Snapshot of PE balances by Ethereum Address and by year
mapping (uint256 => mapping (address => uint256)) public snapShot;
// This is time for next Profit Equivalent
uint256 public nextPE = 1539205199;
// List of Team and Founders account's frozen till 15 November 2018
mapping (address => uint256) public frozenAccount;
// List of all years when snapshots were made
uint[] internal yearsPast = [17];
// Holds current year PE balance
uint256 public peBalance;
// Holds full Buy Back balance
uint256 public bbBalance;
// Holds unclaimed PE balance from last periods
uint256 internal peLastPeriod;
// All ever used in transactions Ethereum Addresses' positions in list
mapping (address => uint256) internal ownerPos;
// Total number of Ethereum Addresses used in transactions
uint256 internal pos;
// All ever used in transactions Ethereum Addresses list
mapping (uint256 => address) internal addressList;
/* Handles incoming payments to contract's address */
function() payable public {
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function CDRTToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal insertion in list of all Ethereum Addresses used in transactions, called by contract */
function _insert(address _to) internal {
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* @notice Freezes from sending & receiving tokens. For users protection can't be used after 1542326399
* and will not allow corrections.
*
* Will set freeze to 1542326399
*
* @param _from Founders and Team account we are freezing from sending
*
*/
function freezeAccount(address _from) onlyOwner public {
}
/**
* @notice Allow owner to set tokens price for Buy-Back Campaign. Can not be executed until 1539561600
*
* @param _newPrice market value of 1 CDRT Token
*
*/
function setPrice(uint256 _newPrice) onlyOwner public {
}
/**
* @notice Contract owner can take snapshot of current balances and issue PE to each balance
*
* @param _year year of the snapshot to take, must be greater than existing value
*
* @param _nextPE set new Profit Equivalent date
*
*/
function takeSnapshot(uint256 _year, uint256 _nextPE) onlyOwner public {
}
/**
* @notice Allow user to claim his PE on his Ethereum Address. Should be called manualy by user
*
*/
function claimProfitEquivalent() public{
}
/**
* @notice Allow user to sell CDRT tokens and destroy them. Can not be executed until 1539561600
*
* @param _qty amount to sell and destroy
*/
function execBuyBack(uint256 _qty) public{
require(now > 1539561600);
uint256 toPay = _qty*buyBackPrice;
require(<FILL_ME>) // check if user has enough CDRT Tokens
require(buyBackPrice > 0); // check if sale price set
require(bbBalance >= toPay);
require(frozenAccount[msg.sender] < now); // Check if sender is frozen
msg.sender.transfer(toPay);
bbBalance -= toPay;
burn(_qty);
}
/**
* @notice Allow owner to set balances
*
*
*/
function setBalances(uint256 _peBalance, uint256 _bbBalance) public{
}
}
| balanceOf[msg.sender]>=_qty | 282,047 | balanceOf[msg.sender]>=_qty |
null | pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract TokenERC20 is owned {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 8;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
}
/* Returns total supply of issued tokens */
function totalSupply() constant public returns (uint256 supply) {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract CDRTToken is TokenERC20 {
uint256 public buyBackPrice;
// Snapshot of PE balances by Ethereum Address and by year
mapping (uint256 => mapping (address => uint256)) public snapShot;
// This is time for next Profit Equivalent
uint256 public nextPE = 1539205199;
// List of Team and Founders account's frozen till 15 November 2018
mapping (address => uint256) public frozenAccount;
// List of all years when snapshots were made
uint[] internal yearsPast = [17];
// Holds current year PE balance
uint256 public peBalance;
// Holds full Buy Back balance
uint256 public bbBalance;
// Holds unclaimed PE balance from last periods
uint256 internal peLastPeriod;
// All ever used in transactions Ethereum Addresses' positions in list
mapping (address => uint256) internal ownerPos;
// Total number of Ethereum Addresses used in transactions
uint256 internal pos;
// All ever used in transactions Ethereum Addresses list
mapping (uint256 => address) internal addressList;
/* Handles incoming payments to contract's address */
function() payable public {
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function CDRTToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal insertion in list of all Ethereum Addresses used in transactions, called by contract */
function _insert(address _to) internal {
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* @notice Freezes from sending & receiving tokens. For users protection can't be used after 1542326399
* and will not allow corrections.
*
* Will set freeze to 1542326399
*
* @param _from Founders and Team account we are freezing from sending
*
*/
function freezeAccount(address _from) onlyOwner public {
}
/**
* @notice Allow owner to set tokens price for Buy-Back Campaign. Can not be executed until 1539561600
*
* @param _newPrice market value of 1 CDRT Token
*
*/
function setPrice(uint256 _newPrice) onlyOwner public {
}
/**
* @notice Contract owner can take snapshot of current balances and issue PE to each balance
*
* @param _year year of the snapshot to take, must be greater than existing value
*
* @param _nextPE set new Profit Equivalent date
*
*/
function takeSnapshot(uint256 _year, uint256 _nextPE) onlyOwner public {
}
/**
* @notice Allow user to claim his PE on his Ethereum Address. Should be called manualy by user
*
*/
function claimProfitEquivalent() public{
}
/**
* @notice Allow user to sell CDRT tokens and destroy them. Can not be executed until 1539561600
*
* @param _qty amount to sell and destroy
*/
function execBuyBack(uint256 _qty) public{
require(now > 1539561600);
uint256 toPay = _qty*buyBackPrice;
require(balanceOf[msg.sender] >= _qty); // check if user has enough CDRT Tokens
require(buyBackPrice > 0); // check if sale price set
require(bbBalance >= toPay);
require(<FILL_ME>) // Check if sender is frozen
msg.sender.transfer(toPay);
bbBalance -= toPay;
burn(_qty);
}
/**
* @notice Allow owner to set balances
*
*
*/
function setBalances(uint256 _peBalance, uint256 _bbBalance) public{
}
}
| frozenAccount[msg.sender]<now | 282,047 | frozenAccount[msg.sender]<now |
'not-a-signer' | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import '@sphynxswap/sphynx-swap-lib/contracts/access/Manageable.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/BEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxPair.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxFactory.sol';
import '@sphynxswap/swap-periphery/contracts/interfaces/ISphynxRouter02.sol';
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
// getRoundData and latestRoundData should both raise "No data present"
// if they do not have data to report, instead of returning unset values
// which could be misinterpreted as actual reported values.
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract SphynxToken is BEP20, Manageable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
ISphynxRouter02 public sphynxSwapRouter;
address public sphynxSwapPair;
bool private swapping;
address public masterChef;
address public sphynxBridge;
address payable public marketingWallet = payable(0x3D458e65828d031B46579De28e9BBAAeb2729064);
address payable public developmentWallet = payable(0x7dB8380C7A017F82CC1d2DC7F8F1dE2d29Fd1df6);
address public lotteryAddress;
uint256 public usdAmountToSwap = 500;
uint256 public marketingFee;
uint256 public developmentFee;
uint256 public lotteryFee;
uint256 public totalFees;
uint256 public blockNumber;
bool public SwapAndLiquifyEnabled = false;
bool public sendToLottery = false;
bool public stopTrade = false;
bool public claimable = true;
uint256 public maxTxAmount = 800000000 * (10 ** 18); // Initial Max Tx Amount
mapping(address => bool) signers;
mapping(uint256 => address) signersArray;
mapping(address => bool) stopTradeSign;
AggregatorV3Interface internal priceFeed;
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
// getting fee addresses
mapping(address => bool) public _isGetFees;
// store addresses that are automated market maker pairs. Any transfer to these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
modifier onlyMasterChefAndBridge() {
}
modifier onlySigner() {
require(<FILL_ME>)
_;
}
modifier nonReentrant() {
}
// Contract Events
event ExcludeFromFees(address indexed account, bool isExcluded);
event GetFee(address indexed account, bool isGetFee);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newMarketingWallet, address indexed oldMarketingWallet);
event DevelopmentWalletUpdated(address indexed newDevelopmentWallet, address indexed oldDevelopmentWallet);
event LotteryAddressUpdated(address indexed newLotteryAddress, address indexed oldLotteryAddress);
event UpdateSphynxSwapRouter(address indexed newAddress, address indexed oldAddress);
event SwapAndLiquify(uint256 tokensSwapped, uint256 nativeReceived, uint256 tokensIntoLiqudity);
event UpdateSwapAndLiquify(bool value);
event UpdateSendToLottery(bool value);
event SetMarketingFee(uint256 value);
event SetDevelopmentFee(uint256 value);
event SetLotteryFee(uint256 value);
event SetAllFeeToZero(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event MaxFees(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event SetUsdAmountToSwap(uint256 usdAmountToSwap);
event SetBlockNumber(uint256 blockNumber);
event UpdateMasterChef(address masterChef);
event UpdateSphynxBridge(address sphynxBridge);
event UpdateMaxTxAmount(uint256 txAmount);
constructor() public BEP20('Sphynx ETH', 'SPHYNX') {
}
receive() external payable {}
// mint function for masterchef;
function mint(address to, uint256 amount) public onlyMasterChefAndBridge {
}
function updateSwapAndLiquifiy(bool value) public onlyManager {
}
function updateSendToLottery(bool value) public onlyManager {
}
function setMarketingFee(uint256 value) external onlyManager {
}
function setDevelopmentFee(uint256 value) external onlyManager {
}
function setLotteryFee(uint256 value) external onlyManager {
}
function setAllFeeToZero() external onlyOwner {
}
function maxFees() external onlyOwner {
}
function updateSphynxSwapRouter(address newAddress) public onlyManager {
}
function updateMasterChef(address _masterChef) public onlyManager {
}
function updateSphynxBridge(address _sphynxBridge) public onlyManager {
}
function excludeFromFees(address account, bool excluded) public onlyManager {
}
function setFeeAccount(address account, bool isGetFee) public onlyManager {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyManager {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setUsdAmountToSwap(uint256 _usdAmount) public onlyManager {
}
function updateMarketingWallet(address newMarketingWallet) public onlyManager {
}
function updateDevelopmentgWallet(address newDevelopmentWallet) public onlyManager {
}
function updateLotteryAddress(address newLotteryAddress) public onlyManager {
}
function setBlockNumber() public onlyOwner {
}
function updateMaxTxAmount(uint256 _amount) public onlyManager {
}
function updateTokenClaim(bool _claim) public onlyManager {
}
function updateStopTrade(bool _value) external onlySigner {
}
function updateSignerWallet(address _signer) external onlySigner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokens(uint256 tokenAmount) private {
}
// Swap tokens on PacakeSwap
function swapTokensForNative(uint256 tokenAmount) private {
}
function getNativeAmountFromUSD() public view returns (uint256 amount) {
}
function _getTokenAmountFromNative() internal view returns (uint256) {
}
function transferNativeToMarketingWallet(uint256 amount) private {
}
function transferNativeToDevelopmentWallet(uint256 amount) private {
}
}
| signers[msg.sender],'not-a-signer' | 282,332 | signers[msg.sender] |
"SPHYNX: Account is already the value of 'isGetFee'" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import '@sphynxswap/sphynx-swap-lib/contracts/access/Manageable.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/BEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxPair.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxFactory.sol';
import '@sphynxswap/swap-periphery/contracts/interfaces/ISphynxRouter02.sol';
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
// getRoundData and latestRoundData should both raise "No data present"
// if they do not have data to report, instead of returning unset values
// which could be misinterpreted as actual reported values.
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract SphynxToken is BEP20, Manageable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
ISphynxRouter02 public sphynxSwapRouter;
address public sphynxSwapPair;
bool private swapping;
address public masterChef;
address public sphynxBridge;
address payable public marketingWallet = payable(0x3D458e65828d031B46579De28e9BBAAeb2729064);
address payable public developmentWallet = payable(0x7dB8380C7A017F82CC1d2DC7F8F1dE2d29Fd1df6);
address public lotteryAddress;
uint256 public usdAmountToSwap = 500;
uint256 public marketingFee;
uint256 public developmentFee;
uint256 public lotteryFee;
uint256 public totalFees;
uint256 public blockNumber;
bool public SwapAndLiquifyEnabled = false;
bool public sendToLottery = false;
bool public stopTrade = false;
bool public claimable = true;
uint256 public maxTxAmount = 800000000 * (10 ** 18); // Initial Max Tx Amount
mapping(address => bool) signers;
mapping(uint256 => address) signersArray;
mapping(address => bool) stopTradeSign;
AggregatorV3Interface internal priceFeed;
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
// getting fee addresses
mapping(address => bool) public _isGetFees;
// store addresses that are automated market maker pairs. Any transfer to these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
modifier onlyMasterChefAndBridge() {
}
modifier onlySigner() {
}
modifier nonReentrant() {
}
// Contract Events
event ExcludeFromFees(address indexed account, bool isExcluded);
event GetFee(address indexed account, bool isGetFee);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newMarketingWallet, address indexed oldMarketingWallet);
event DevelopmentWalletUpdated(address indexed newDevelopmentWallet, address indexed oldDevelopmentWallet);
event LotteryAddressUpdated(address indexed newLotteryAddress, address indexed oldLotteryAddress);
event UpdateSphynxSwapRouter(address indexed newAddress, address indexed oldAddress);
event SwapAndLiquify(uint256 tokensSwapped, uint256 nativeReceived, uint256 tokensIntoLiqudity);
event UpdateSwapAndLiquify(bool value);
event UpdateSendToLottery(bool value);
event SetMarketingFee(uint256 value);
event SetDevelopmentFee(uint256 value);
event SetLotteryFee(uint256 value);
event SetAllFeeToZero(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event MaxFees(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event SetUsdAmountToSwap(uint256 usdAmountToSwap);
event SetBlockNumber(uint256 blockNumber);
event UpdateMasterChef(address masterChef);
event UpdateSphynxBridge(address sphynxBridge);
event UpdateMaxTxAmount(uint256 txAmount);
constructor() public BEP20('Sphynx ETH', 'SPHYNX') {
}
receive() external payable {}
// mint function for masterchef;
function mint(address to, uint256 amount) public onlyMasterChefAndBridge {
}
function updateSwapAndLiquifiy(bool value) public onlyManager {
}
function updateSendToLottery(bool value) public onlyManager {
}
function setMarketingFee(uint256 value) external onlyManager {
}
function setDevelopmentFee(uint256 value) external onlyManager {
}
function setLotteryFee(uint256 value) external onlyManager {
}
function setAllFeeToZero() external onlyOwner {
}
function maxFees() external onlyOwner {
}
function updateSphynxSwapRouter(address newAddress) public onlyManager {
}
function updateMasterChef(address _masterChef) public onlyManager {
}
function updateSphynxBridge(address _sphynxBridge) public onlyManager {
}
function excludeFromFees(address account, bool excluded) public onlyManager {
}
function setFeeAccount(address account, bool isGetFee) public onlyManager {
require(<FILL_ME>)
_isGetFees[account] = isGetFee;
emit GetFee(account, isGetFee);
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyManager {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setUsdAmountToSwap(uint256 _usdAmount) public onlyManager {
}
function updateMarketingWallet(address newMarketingWallet) public onlyManager {
}
function updateDevelopmentgWallet(address newDevelopmentWallet) public onlyManager {
}
function updateLotteryAddress(address newLotteryAddress) public onlyManager {
}
function setBlockNumber() public onlyOwner {
}
function updateMaxTxAmount(uint256 _amount) public onlyManager {
}
function updateTokenClaim(bool _claim) public onlyManager {
}
function updateStopTrade(bool _value) external onlySigner {
}
function updateSignerWallet(address _signer) external onlySigner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokens(uint256 tokenAmount) private {
}
// Swap tokens on PacakeSwap
function swapTokensForNative(uint256 tokenAmount) private {
}
function getNativeAmountFromUSD() public view returns (uint256 amount) {
}
function _getTokenAmountFromNative() internal view returns (uint256) {
}
function transferNativeToMarketingWallet(uint256 amount) private {
}
function transferNativeToDevelopmentWallet(uint256 amount) private {
}
}
| _isGetFees[account]!=isGetFee,"SPHYNX: Account is already the value of 'isGetFee'" | 282,332 | _isGetFees[account]!=isGetFee |
'already-sign' | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import '@sphynxswap/sphynx-swap-lib/contracts/access/Manageable.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/BEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxPair.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxFactory.sol';
import '@sphynxswap/swap-periphery/contracts/interfaces/ISphynxRouter02.sol';
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
// getRoundData and latestRoundData should both raise "No data present"
// if they do not have data to report, instead of returning unset values
// which could be misinterpreted as actual reported values.
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract SphynxToken is BEP20, Manageable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
ISphynxRouter02 public sphynxSwapRouter;
address public sphynxSwapPair;
bool private swapping;
address public masterChef;
address public sphynxBridge;
address payable public marketingWallet = payable(0x3D458e65828d031B46579De28e9BBAAeb2729064);
address payable public developmentWallet = payable(0x7dB8380C7A017F82CC1d2DC7F8F1dE2d29Fd1df6);
address public lotteryAddress;
uint256 public usdAmountToSwap = 500;
uint256 public marketingFee;
uint256 public developmentFee;
uint256 public lotteryFee;
uint256 public totalFees;
uint256 public blockNumber;
bool public SwapAndLiquifyEnabled = false;
bool public sendToLottery = false;
bool public stopTrade = false;
bool public claimable = true;
uint256 public maxTxAmount = 800000000 * (10 ** 18); // Initial Max Tx Amount
mapping(address => bool) signers;
mapping(uint256 => address) signersArray;
mapping(address => bool) stopTradeSign;
AggregatorV3Interface internal priceFeed;
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
// getting fee addresses
mapping(address => bool) public _isGetFees;
// store addresses that are automated market maker pairs. Any transfer to these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
modifier onlyMasterChefAndBridge() {
}
modifier onlySigner() {
}
modifier nonReentrant() {
}
// Contract Events
event ExcludeFromFees(address indexed account, bool isExcluded);
event GetFee(address indexed account, bool isGetFee);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newMarketingWallet, address indexed oldMarketingWallet);
event DevelopmentWalletUpdated(address indexed newDevelopmentWallet, address indexed oldDevelopmentWallet);
event LotteryAddressUpdated(address indexed newLotteryAddress, address indexed oldLotteryAddress);
event UpdateSphynxSwapRouter(address indexed newAddress, address indexed oldAddress);
event SwapAndLiquify(uint256 tokensSwapped, uint256 nativeReceived, uint256 tokensIntoLiqudity);
event UpdateSwapAndLiquify(bool value);
event UpdateSendToLottery(bool value);
event SetMarketingFee(uint256 value);
event SetDevelopmentFee(uint256 value);
event SetLotteryFee(uint256 value);
event SetAllFeeToZero(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event MaxFees(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event SetUsdAmountToSwap(uint256 usdAmountToSwap);
event SetBlockNumber(uint256 blockNumber);
event UpdateMasterChef(address masterChef);
event UpdateSphynxBridge(address sphynxBridge);
event UpdateMaxTxAmount(uint256 txAmount);
constructor() public BEP20('Sphynx ETH', 'SPHYNX') {
}
receive() external payable {}
// mint function for masterchef;
function mint(address to, uint256 amount) public onlyMasterChefAndBridge {
}
function updateSwapAndLiquifiy(bool value) public onlyManager {
}
function updateSendToLottery(bool value) public onlyManager {
}
function setMarketingFee(uint256 value) external onlyManager {
}
function setDevelopmentFee(uint256 value) external onlyManager {
}
function setLotteryFee(uint256 value) external onlyManager {
}
function setAllFeeToZero() external onlyOwner {
}
function maxFees() external onlyOwner {
}
function updateSphynxSwapRouter(address newAddress) public onlyManager {
}
function updateMasterChef(address _masterChef) public onlyManager {
}
function updateSphynxBridge(address _sphynxBridge) public onlyManager {
}
function excludeFromFees(address account, bool excluded) public onlyManager {
}
function setFeeAccount(address account, bool isGetFee) public onlyManager {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyManager {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setUsdAmountToSwap(uint256 _usdAmount) public onlyManager {
}
function updateMarketingWallet(address newMarketingWallet) public onlyManager {
}
function updateDevelopmentgWallet(address newDevelopmentWallet) public onlyManager {
}
function updateLotteryAddress(address newLotteryAddress) public onlyManager {
}
function setBlockNumber() public onlyOwner {
}
function updateMaxTxAmount(uint256 _amount) public onlyManager {
}
function updateTokenClaim(bool _claim) public onlyManager {
}
function updateStopTrade(bool _value) external onlySigner {
require(stopTrade != _value, 'already-set');
require(<FILL_ME>)
stopTradeSign[msg.sender] = true;
if (
stopTradeSign[signersArray[0]] &&
stopTradeSign[signersArray[1]] &&
stopTradeSign[signersArray[2]]
) {
stopTrade = _value;
stopTradeSign[signersArray[0]] = false;
stopTradeSign[signersArray[1]] = false;
stopTradeSign[signersArray[2]] = false;
}
}
function updateSignerWallet(address _signer) external onlySigner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function swapTokens(uint256 tokenAmount) private {
}
// Swap tokens on PacakeSwap
function swapTokensForNative(uint256 tokenAmount) private {
}
function getNativeAmountFromUSD() public view returns (uint256 amount) {
}
function _getTokenAmountFromNative() internal view returns (uint256) {
}
function transferNativeToMarketingWallet(uint256 amount) private {
}
function transferNativeToDevelopmentWallet(uint256 amount) private {
}
}
| !stopTradeSign[msg.sender],'already-sign' | 282,332 | !stopTradeSign[msg.sender] |
'trade-stopped' | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import '@sphynxswap/sphynx-swap-lib/contracts/access/Manageable.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/BEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@sphynxswap/sphynx-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxPair.sol';
import '@sphynxswap/swap-core/contracts/interfaces/ISphynxFactory.sol';
import '@sphynxswap/swap-periphery/contracts/interfaces/ISphynxRouter02.sol';
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
// getRoundData and latestRoundData should both raise "No data present"
// if they do not have data to report, instead of returning unset values
// which could be misinterpreted as actual reported values.
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract SphynxToken is BEP20, Manageable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
ISphynxRouter02 public sphynxSwapRouter;
address public sphynxSwapPair;
bool private swapping;
address public masterChef;
address public sphynxBridge;
address payable public marketingWallet = payable(0x3D458e65828d031B46579De28e9BBAAeb2729064);
address payable public developmentWallet = payable(0x7dB8380C7A017F82CC1d2DC7F8F1dE2d29Fd1df6);
address public lotteryAddress;
uint256 public usdAmountToSwap = 500;
uint256 public marketingFee;
uint256 public developmentFee;
uint256 public lotteryFee;
uint256 public totalFees;
uint256 public blockNumber;
bool public SwapAndLiquifyEnabled = false;
bool public sendToLottery = false;
bool public stopTrade = false;
bool public claimable = true;
uint256 public maxTxAmount = 800000000 * (10 ** 18); // Initial Max Tx Amount
mapping(address => bool) signers;
mapping(uint256 => address) signersArray;
mapping(address => bool) stopTradeSign;
AggregatorV3Interface internal priceFeed;
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
// getting fee addresses
mapping(address => bool) public _isGetFees;
// store addresses that are automated market maker pairs. Any transfer to these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
modifier onlyMasterChefAndBridge() {
}
modifier onlySigner() {
}
modifier nonReentrant() {
}
// Contract Events
event ExcludeFromFees(address indexed account, bool isExcluded);
event GetFee(address indexed account, bool isGetFee);
event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event MarketingWalletUpdated(address indexed newMarketingWallet, address indexed oldMarketingWallet);
event DevelopmentWalletUpdated(address indexed newDevelopmentWallet, address indexed oldDevelopmentWallet);
event LotteryAddressUpdated(address indexed newLotteryAddress, address indexed oldLotteryAddress);
event UpdateSphynxSwapRouter(address indexed newAddress, address indexed oldAddress);
event SwapAndLiquify(uint256 tokensSwapped, uint256 nativeReceived, uint256 tokensIntoLiqudity);
event UpdateSwapAndLiquify(bool value);
event UpdateSendToLottery(bool value);
event SetMarketingFee(uint256 value);
event SetDevelopmentFee(uint256 value);
event SetLotteryFee(uint256 value);
event SetAllFeeToZero(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event MaxFees(uint256 marketingFee, uint256 developmentFee, uint256 lotteryFee);
event SetUsdAmountToSwap(uint256 usdAmountToSwap);
event SetBlockNumber(uint256 blockNumber);
event UpdateMasterChef(address masterChef);
event UpdateSphynxBridge(address sphynxBridge);
event UpdateMaxTxAmount(uint256 txAmount);
constructor() public BEP20('Sphynx ETH', 'SPHYNX') {
}
receive() external payable {}
// mint function for masterchef;
function mint(address to, uint256 amount) public onlyMasterChefAndBridge {
}
function updateSwapAndLiquifiy(bool value) public onlyManager {
}
function updateSendToLottery(bool value) public onlyManager {
}
function setMarketingFee(uint256 value) external onlyManager {
}
function setDevelopmentFee(uint256 value) external onlyManager {
}
function setLotteryFee(uint256 value) external onlyManager {
}
function setAllFeeToZero() external onlyOwner {
}
function maxFees() external onlyOwner {
}
function updateSphynxSwapRouter(address newAddress) public onlyManager {
}
function updateMasterChef(address _masterChef) public onlyManager {
}
function updateSphynxBridge(address _sphynxBridge) public onlyManager {
}
function excludeFromFees(address account, bool excluded) public onlyManager {
}
function setFeeAccount(address account, bool isGetFee) public onlyManager {
}
function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyManager {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setUsdAmountToSwap(uint256 _usdAmount) public onlyManager {
}
function updateMarketingWallet(address newMarketingWallet) public onlyManager {
}
function updateDevelopmentgWallet(address newDevelopmentWallet) public onlyManager {
}
function updateLotteryAddress(address newLotteryAddress) public onlyManager {
}
function setBlockNumber() public onlyOwner {
}
function updateMaxTxAmount(uint256 _amount) public onlyManager {
}
function updateTokenClaim(bool _claim) public onlyManager {
}
function updateStopTrade(bool _value) external onlySigner {
}
function updateSignerWallet(address _signer) external onlySigner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), 'BEP20: transfer from the zero address');
require(to != address(0), 'BEP20: transfer to the zero address');
require(<FILL_ME>)
require(amount <= maxTxAmount, 'max-tx-amount-overflow');
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if(SwapAndLiquifyEnabled) {
uint256 contractTokenBalance = balanceOf(address(this));
uint256 nativeTokenAmount = _getTokenAmountFromNative();
bool canSwap = contractTokenBalance >= nativeTokenAmount;
if (canSwap && !swapping && !automatedMarketMakerPairs[from]) {
swapping = true;
// Set number of tokens to sell to nativeTokenAmount
contractTokenBalance = nativeTokenAmount;
swapTokens(contractTokenBalance);
swapping = false;
}
}
// indicates if fee should be deducted from transfer
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
if (takeFee) {
if (block.number - blockNumber <= 10) {
uint256 afterBalance = balanceOf(to) + amount;
require(afterBalance <= 250000 * (10**18), 'Owned amount exceeds the maxOwnedAmount');
}
uint256 fees;
if (_isGetFees[from] || _isGetFees[to]) {
if (block.number - blockNumber <= 5) {
fees = amount.mul(99).div(10**2);
} else {
fees = amount.mul(totalFees).div(10**2);
if (sendToLottery) {
uint256 lotteryAmount = amount.mul(lotteryFee).div(10**2);
amount = amount.sub(lotteryAmount);
super._transfer(from, lotteryAddress, lotteryAmount);
}
}
amount = amount.sub(fees);
super._transfer(from, address(this), fees);
}
}
super._transfer(from, to, amount);
}
function swapTokens(uint256 tokenAmount) private {
}
// Swap tokens on PacakeSwap
function swapTokensForNative(uint256 tokenAmount) private {
}
function getNativeAmountFromUSD() public view returns (uint256 amount) {
}
function _getTokenAmountFromNative() internal view returns (uint256) {
}
function transferNativeToMarketingWallet(uint256 amount) private {
}
function transferNativeToDevelopmentWallet(uint256 amount) private {
}
}
| !stopTrade,'trade-stopped' | 282,332 | !stopTrade |
null | pragma solidity ^0.5.9;
contract sproof {
event lockHashEvent(address indexed from, bytes32 indexed hash);
address payable owner;
mapping(address => bool) sproofAccounts;
uint costToLockHash = 0;
constructor() public {
}
function addSproofAccount(address _addr) public{
}
function updateOwner(address payable newOwner) public{
}
function removeSproofAccount(address _addr) public{
}
function setCost (uint newCostToLockHash) public {
}
function getCost() public view returns(uint) {
}
function lockHash(bytes32 hash) public payable{
}
function lockHashProxy(address _addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s) public payable {
require(<FILL_ME>)
if (sproofAccounts[msg.sender] != true)
require(msg.value >= costToLockHash);
emit lockHashEvent(_addr, hash);
}
function lockHashesProxy(address [] memory _addresses, bytes32 [] memory hashes, uint8[] memory vs, bytes32 [] memory rs, bytes32 [] memory ss) public payable {
}
function payout() public{
}
}
| ecrecover(hash,v,r,s)==_addr | 282,352 | ecrecover(hash,v,r,s)==_addr |
null | pragma solidity ^0.5.9;
contract sproof {
event lockHashEvent(address indexed from, bytes32 indexed hash);
address payable owner;
mapping(address => bool) sproofAccounts;
uint costToLockHash = 0;
constructor() public {
}
function addSproofAccount(address _addr) public{
}
function updateOwner(address payable newOwner) public{
}
function removeSproofAccount(address _addr) public{
}
function setCost (uint newCostToLockHash) public {
}
function getCost() public view returns(uint) {
}
function lockHash(bytes32 hash) public payable{
}
function lockHashProxy(address _addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s) public payable {
}
function lockHashesProxy(address [] memory _addresses, bytes32 [] memory hashes, uint8[] memory vs, bytes32 [] memory rs, bytes32 [] memory ss) public payable {
if (sproofAccounts[msg.sender] != true)
require(msg.value >= _addresses.length*costToLockHash);
for (uint i=0; i < _addresses.length; i++) {
require(<FILL_ME>)
emit lockHashEvent(_addresses[i], hashes[i]);
}
}
function payout() public{
}
}
| ecrecover(hashes[i],vs[i],rs[i],ss[i])==_addresses[i] | 282,352 | ecrecover(hashes[i],vs[i],rs[i],ss[i])==_addresses[i] |
"eth_not_deposited" | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
//create WETH from ETH
if (ETHAmount != 0) {
WETH.deposit.value(ETHAmount)();
}
require(<FILL_ME>)
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| WETH.balanceOf(address(this))>=ETHAmount,"eth_not_deposited" | 282,410 | WETH.balanceOf(address(this))>=ETHAmount |
'delta_pos' | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
require(msg.sender == quadoEthUniswapPoolAddress, 'uni_sender');
SwapData memory swapData = swapDataFromBytes(data);
require(swapData.eventType > 0, 'swap_data_type');
require(<FILL_ME>)
int256 quadoAmount = quadoEthUniswapPoolToken0IsQuado ? amount0Delta : amount1Delta;
int256 ethAmount = quadoEthUniswapPoolToken0IsQuado ? amount1Delta : amount0Delta;
if(quadoAmount > 0) {
// OOOO is needed by the pool, means quado to ETH
require(uint256(quadoAmount) <= balanceOf(swapData.account), 'owner_oooo_bal');
transferFrom(swapData.account, msg.sender, uint256(quadoAmount));
// pay the owner the ETH he got
// UNWRAP WETH
// https://ethereum.stackexchange.com/questions/83929/while-testing-wrap-unwrap-of-eth-to-weth-on-kovan-however-the-wrap-function-i
unwrap(uint256(-ethAmount));
swapData.account.transfer( uint256(-ethAmount)); //, 'eth_to_acc');
emit SwapEvent(3, swapData.account, uint256(ethAmount), uint256(quadoAmount));
} else if(ethAmount > 0) {
// ETH is needed, means eth to quado cash (eventType 2) or coin (eventType 4)
//require(uint256(amount0Delta) <= address(this).balance, 'contract_eth_bal');
require(WETH.balanceOf(address(this)) >= uint256(ethAmount), 'contract_weth_bal');
// Transfer WRAPPED ETH to contract
WETH.transfer(quadoEthUniswapPoolAddress, uint256(ethAmount));
//quadoEthUniswapPoolAddress.transfer(uint256(amount0Delta));// ), 'eth_to_uni');
// pay the owner the OOOO he got
if(swapData.eventType == 2) {
// inform the cash system that it should mint coins to the owner
emit SwapEvent(2, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
} else {
emit SwapEvent(4, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
_approve(address(this), quadoEthUniswapPoolAddress, uint256(-quadoAmount));
transferFrom(address(this), swapData.account, uint256(-quadoAmount));
}
}
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| (amount0Delta>0)||(amount1Delta>0),'delta_pos' | 282,410 | (amount0Delta>0)||(amount1Delta>0) |
'owner_oooo_bal' | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
require(msg.sender == quadoEthUniswapPoolAddress, 'uni_sender');
SwapData memory swapData = swapDataFromBytes(data);
require(swapData.eventType > 0, 'swap_data_type');
require((amount0Delta > 0) || (amount1Delta > 0), 'delta_pos');
int256 quadoAmount = quadoEthUniswapPoolToken0IsQuado ? amount0Delta : amount1Delta;
int256 ethAmount = quadoEthUniswapPoolToken0IsQuado ? amount1Delta : amount0Delta;
if(quadoAmount > 0) {
// OOOO is needed by the pool, means quado to ETH
require(<FILL_ME>)
transferFrom(swapData.account, msg.sender, uint256(quadoAmount));
// pay the owner the ETH he got
// UNWRAP WETH
// https://ethereum.stackexchange.com/questions/83929/while-testing-wrap-unwrap-of-eth-to-weth-on-kovan-however-the-wrap-function-i
unwrap(uint256(-ethAmount));
swapData.account.transfer( uint256(-ethAmount)); //, 'eth_to_acc');
emit SwapEvent(3, swapData.account, uint256(ethAmount), uint256(quadoAmount));
} else if(ethAmount > 0) {
// ETH is needed, means eth to quado cash (eventType 2) or coin (eventType 4)
//require(uint256(amount0Delta) <= address(this).balance, 'contract_eth_bal');
require(WETH.balanceOf(address(this)) >= uint256(ethAmount), 'contract_weth_bal');
// Transfer WRAPPED ETH to contract
WETH.transfer(quadoEthUniswapPoolAddress, uint256(ethAmount));
//quadoEthUniswapPoolAddress.transfer(uint256(amount0Delta));// ), 'eth_to_uni');
// pay the owner the OOOO he got
if(swapData.eventType == 2) {
// inform the cash system that it should mint coins to the owner
emit SwapEvent(2, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
} else {
emit SwapEvent(4, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
_approve(address(this), quadoEthUniswapPoolAddress, uint256(-quadoAmount));
transferFrom(address(this), swapData.account, uint256(-quadoAmount));
}
}
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| uint256(quadoAmount)<=balanceOf(swapData.account),'owner_oooo_bal' | 282,410 | uint256(quadoAmount)<=balanceOf(swapData.account) |
'contract_weth_bal' | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
require(msg.sender == quadoEthUniswapPoolAddress, 'uni_sender');
SwapData memory swapData = swapDataFromBytes(data);
require(swapData.eventType > 0, 'swap_data_type');
require((amount0Delta > 0) || (amount1Delta > 0), 'delta_pos');
int256 quadoAmount = quadoEthUniswapPoolToken0IsQuado ? amount0Delta : amount1Delta;
int256 ethAmount = quadoEthUniswapPoolToken0IsQuado ? amount1Delta : amount0Delta;
if(quadoAmount > 0) {
// OOOO is needed by the pool, means quado to ETH
require(uint256(quadoAmount) <= balanceOf(swapData.account), 'owner_oooo_bal');
transferFrom(swapData.account, msg.sender, uint256(quadoAmount));
// pay the owner the ETH he got
// UNWRAP WETH
// https://ethereum.stackexchange.com/questions/83929/while-testing-wrap-unwrap-of-eth-to-weth-on-kovan-however-the-wrap-function-i
unwrap(uint256(-ethAmount));
swapData.account.transfer( uint256(-ethAmount)); //, 'eth_to_acc');
emit SwapEvent(3, swapData.account, uint256(ethAmount), uint256(quadoAmount));
} else if(ethAmount > 0) {
// ETH is needed, means eth to quado cash (eventType 2) or coin (eventType 4)
//require(uint256(amount0Delta) <= address(this).balance, 'contract_eth_bal');
require(<FILL_ME>)
// Transfer WRAPPED ETH to contract
WETH.transfer(quadoEthUniswapPoolAddress, uint256(ethAmount));
//quadoEthUniswapPoolAddress.transfer(uint256(amount0Delta));// ), 'eth_to_uni');
// pay the owner the OOOO he got
if(swapData.eventType == 2) {
// inform the cash system that it should mint coins to the owner
emit SwapEvent(2, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
} else {
emit SwapEvent(4, swapData.account, uint256(ethAmount), uint256(-quadoAmount));
_approve(address(this), quadoEthUniswapPoolAddress, uint256(-quadoAmount));
transferFrom(address(this), swapData.account, uint256(-quadoAmount));
}
}
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| WETH.balanceOf(address(this))>=uint256(ethAmount),'contract_weth_bal' | 282,410 | WETH.balanceOf(address(this))>=uint256(ethAmount) |
"fees_to_owner" | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
require(msg.value >= tx.gasprice * (_toEth ? gasToCashOutToEth : gasToCashOut), "min_gas_to_cashout");
// pay owner the gas fee it needs to call settlecashout
address payable payowner = address(uint160(owner()));
require(<FILL_ME>)
//→ emit event
emit SwapEvent(_toEth ? 7 : 1, msg.sender, msg.value, _amount);
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| payowner.send(msg.value),"fees_to_owner" | 282,410 | payowner.send(msg.value) |
null | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
IUniswapV3PoolImmutables poolImmu = IUniswapV3PoolImmutables(_poolAddress);
require(<FILL_ME>)
quadoEthUniswapPoolToken0IsQuado = (poolImmu.token0() == address(this));
quadoEthUniswapPoolAddress = _poolAddress;
quadoEthUniswapPool = IUniswapV3PoolActions(quadoEthUniswapPoolAddress);
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| (poolImmu.token0()==address(this))||(poolImmu.token1()==address(this)) | 282,410 | (poolImmu.token0()==address(this))||(poolImmu.token1()==address(this)) |
'no_send' | pragma solidity >=0.5.0;
/**
@title Quado: The Holobots Coin
@dev ERC20 Token to be used as in-world money for the Holobots.world.
* Supports UniSwap to ETH and off-chain deposit/cashout.
* Pre-mints locked funds for liquidity pool bootstrap, developer incentives and infrastructure coverage.
* Approves payout to developers for each 10% of all minted bots, monthly infrastructre costs.
* Bootstrap approved to transfer on creation.
*/
contract Quado is ERC20, ERC20Detailed, ERC20Mintable, ERC20Capped, Ownable, IUniswapV3SwapCallback {
//address god;
uint256 public gasToCashOut = 23731;
uint256 public gasToCashOutToEth = 43731;
uint256 public currentInfrastructureCosts = 200000 * 10**18;
uint256 public percentBootstrap;
uint256 public percentDevteam;
uint256 public percentInfrastructureFund;
uint public lastInfrastructureGrand;
IUniswapV3PoolActions quadoEthUniswapPool;
address payable public quadoEthUniswapPoolAddress;
bool quadoEthUniswapPoolToken0IsQuado;
address public devTeamPayoutAdress;
address public infrastructurePayoutAdress;
uint256 public usedForInfrstructure;
WETH9_ internal WETH;
/**
* @dev Emited when funds for the owner gets approved to be taken from the contract
**/
event OwnerFundsApproval (
uint16 eventType,
uint256 indexed amount
);
/**
* @dev Emited to swap quado cash/quado coin/eth
**/
event SwapEvent (
uint16 eventType,
address indexed owner,
uint256 indexed ethValue,
uint256 indexed coinAmount
);
struct SwapData {
uint8 eventType;
address payable account;
}
/**
* @dev
* @param _maxSupply Max supply of coins
* @param _percentBootstrap How many percent of the currency are reserved for the bootstrap
* @param _percentDevteam How many percent of the currency are reserved for dev incentives
* @param _percentInfrastructureFund How many percent of the currency is reserved to fund infrastcture during game pre-launch
**/
constructor(
uint256 _maxSupply,
uint256 _percentBootstrap,
uint256 _percentDevteam,
uint256 _percentInfrastructureFund,
address _bootstrapPayoutAdress,
address payable _WETHAddr
) public ERC20Detailed("Quado Holobots Coin", "OOOO", 18)
ERC20Capped(_maxSupply)
{
}
/**
* @dev ETH to Quado Cash
*/
function toQuadoCash(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev ETH to Quado Coin
*/
function toQuadoCoin(uint160 sqrtPriceLimitX96) public payable {
}
/**
* @dev Quado Coin to ETH
* @param _amount amount of quado to swap to eth
*/
function toETH(uint256 _amount, uint160 sqrtPriceLimitX96) public {
}
function wrap(uint256 ETHAmount) private
{
}
function unwrap(uint256 Amount) private
{
}
// default method when ether is paid to the contract's address
// used for the WETH withdraw callback
function() external payable {
}
function bytesToAddress(bytes memory bys) private pure returns (address payable addr) {
}
// https://ethereum.stackexchange.com/questions/11246/convert-struct-to-bytes-in-solidity
function swapDataFromBytes(bytes memory data) private pure returns (SwapData memory d) {
}
function swapDataToBytes(SwapData memory swapData) private pure returns (bytes memory data) {
}
/**
* @dev Uniswap swap callback, satisfy IUniswapV3SwapCallback
* https://docs.uniswap.org/reference/core/interfaces/callback/IUniswapV3SwapCallback
*/
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
}
/**
* @dev Quado Cash to Coin: Emits event to cash out deposited Quado Cash to Quado in user's wallet
* @param _amount amount of quado cash to cash out
*/
function cashOut(uint256 _amount, bool _toEth) public payable {
}
/**
* @dev Cashes out deposited Quado Cash to Quado in user's wallet
* @param _to address of the future owner of the token
* @param _amount how much Quado to cash out
* @param _notMinted not minted cash to reflect on blockchain
*/
function settleCashOut(address payable _to, uint256 _amount, bool _toEth, uint160 sqrtPriceLimitX96, uint256 _notMinted) public onlyOwner {
}
/**
* @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) public returns (bool) {
}
/**
* @dev Mints token to one of the payout adddresses for bootstrap, infrastructure and dev team
* @dev Approves the contract owner to transfer that minted tokens
* @param _amount mints this amount of Quado to the contract itself
* @param _to address on where to mint
*/
function mintOwnerFundsTo(uint256 _amount, address _to) internal onlyMinter {
}
/**
* @dev Reflects the current quado cash state to quado coin by minting to the contract itself
* @dev Approves the contract owner to transfer that minted cash later
* @dev Additionally approves pre-minted funds for hardware payment and dev incentives
* @param _amount mints this amount of Quado to the contract itself
*/
function mintFromCash(uint256 _amount) public onlyMinter {
}
function setGasToCashOutEstimate(uint256 _cashOut, uint256 _cashOutToEth) public onlyOwner {
}
function setCurrentInfrastructureCosts(uint256 _costs) public onlyOwner {
}
function setUniswapPool(address payable _poolAddress) public onlyOwner {
}
function setPayoutAddresses(address _devTeamPayoutAdress, address _infrastructurePayoutAdress) public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner)
*/
function withdrawETH(uint256 amount) public onlyOwner {
require(amount <= address(this).balance, 'balance_low');
require(<FILL_ME>)
}
/*function setGod(address _god) public onlyOwner {
god = _god;
}*/
}
| msg.sender.send(amount),'no_send' | 282,410 | msg.sender.send(amount) |
'Insufficient Balance' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/af7ec04b78c2b5dec330153de90682b13f17a1bb/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/utils/Address.sol";
/**
*
*/
contract ELONPhant is IERC20 {
using SafeMath for uint256;
using Address for address;
// token data
string constant _name = "ELONphant";
string constant _symbol = "ELONphant";
uint8 constant _decimals = 18;
// 1 Billion Starting Supply
uint256 _totalSupply = 10**9 * 10**_decimals;
// Bot Prevention
uint256 maxTransfer;
bool maxTransferCheckEnabled;
// balances
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
// Fees
uint256 public fee = 3; // 3% transfer fee
// fee exemption for staking / utility
mapping ( address => bool ) public isFeeExempt;
// Uniswap Router
IUniswapV2Router02 _router;
// ETH -> Token
address[] path;
// Tokens -> ETH
address[] sellPath;
// owner
address _owner;
// multisignature wallet
address _developmentFund;
// Auto Swapper Enabled
bool swapEnabled;
modifier onlyOwner() {
}
// initialize some stuff
constructor () {
}
function totalSupply() external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
// function name() public pure override returns (string memory) {
// return _name;
// }
function name() public view virtual returns (string memory) {
}
// function symbol() public pure override returns (string memory) {
// return _symbol;
// }
function symbol() public view virtual returns (string memory) {
}
// function decimals() public pure override returns (uint8) {
// return _decimals;
// }
function decimals() public view virtual returns (uint8) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
/** Transfer Function */
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
/** Transfer Function */
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
/** Internal Transfer */
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function burnTokens(uint256 numTokens) external {
}
function burnAllTokens() external {
}
function burnTokensIncludingDecimals(uint256 numTokens) external {
}
// function purchaseTokenForAddress(address receiver) external payable {
// require(msg.value >= 10**4, 'Amount Too Few');
// _purchaseToken(receiver);
// }
function sellTokensForETH(address receiver, uint256 numTokens) external {
}
function sellTokensForETH(uint256 numTokens) external {
}
function sellTokensForETHWholeTokenAmounts(uint256 numTokens) external {
}
///////////////////////////////////
////// OWNER FUNCTIONS ///////
///////////////////////////////////
function setUniswapRouterAddress(address router) external onlyOwner {
}
function setSwapEnabled(bool enabled) external onlyOwner {
}
/** Withdraws Tokens Mistakingly Sent To Contract */
function withdrawTokens(address token) external onlyOwner {
}
/** Sets Maximum Transaction Data */
function setMaxTransactionData(bool checkEnabled, uint256 transferThreshold) external onlyOwner {
}
/** Updates The Address Of The Development Fund Receiver */
function updateDevelopmentFundingAddress(address newFund) external onlyOwner {
}
/** Excludes Contract From Fees */
function setFeeExemption(address wallet, bool exempt) external onlyOwner {
}
/** Sets Transfer Fees */
function setFee(uint256 newFee) external onlyOwner {
}
/** Transfers Ownership To Another User */
function transferOwnership(address newOwner) external onlyOwner {
}
/** Transfers Ownership To Zero Address */
function renounceOwnership() external onlyOwner {
}
///////////////////////////////////
////// INTERNAL FUNCTIONS ///////
///////////////////////////////////
function _sellTokensForETH(address receiver, uint256 numberTokens) internal {
// checks
require(<FILL_ME>)
require(receiver != address(this) && receiver != address(0), 'Insufficient Destination');
require(swapEnabled, 'Swapping Disabled');
// transfer in tokens
_balances[msg.sender] = _balances[msg.sender].sub(numberTokens, 'Insufficient Balance');
// divvy up amount
uint256 tax = isFeeExempt[msg.sender] ? 0 : numberTokens.mul(fee).div(10**2);
// amount to send to recipient
uint256 sendAmount = numberTokens.sub(tax);
require(sendAmount > 0, 'Zero Tokens To Send');
// Allocate To Contract
_balances[address(this)] = _balances[address(this)].add(sendAmount);
emit Transfer(msg.sender, address(this), sendAmount);
// Allocate Tax
if (tax > 0) {
_balances[_developmentFund] = _balances[_developmentFund].add(tax);
emit Transfer(msg.sender, _developmentFund, tax);
}
// Approve Of Router To Move Tokens
_allowances[address(this)][address(_router)] = sendAmount;
// make the swap
_router.swapExactTokensForETH(
sendAmount,
0,
sellPath,
receiver,
block.timestamp + 30
);
}
function _purchaseToken(address receiver) internal {
}
function _burnTokens(uint256 numTokens) internal {
}
/** Purchase Tokens For Holder */
receive() external payable {
}
///////////////////////////////////
////// EVENTS ///////
///////////////////////////////////
event UpdatedDevelopmentFundingAddress(address newFund);
event TransferOwnership(address newOwner);
event SetSwapEnabled(bool enabled);
event SetFee(uint256 newFee);
event SetUniswapRouterAddress(address router);
event SetFeeExemption(address Contract, bool exempt);
event MaxTransactionDataSet(bool checkEnabled, uint256 transferThreshold);
}
| _balances[msg.sender]>=numberTokens,'Insufficient Balance' | 282,438 | _balances[msg.sender]>=numberTokens |
'Insufficient Balance' | //SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/af7ec04b78c2b5dec330153de90682b13f17a1bb/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/utils/Address.sol";
/**
*
*/
contract ELONPhant is IERC20 {
using SafeMath for uint256;
using Address for address;
// token data
string constant _name = "ELONphant";
string constant _symbol = "ELONphant";
uint8 constant _decimals = 18;
// 1 Billion Starting Supply
uint256 _totalSupply = 10**9 * 10**_decimals;
// Bot Prevention
uint256 maxTransfer;
bool maxTransferCheckEnabled;
// balances
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
// Fees
uint256 public fee = 3; // 3% transfer fee
// fee exemption for staking / utility
mapping ( address => bool ) public isFeeExempt;
// Uniswap Router
IUniswapV2Router02 _router;
// ETH -> Token
address[] path;
// Tokens -> ETH
address[] sellPath;
// owner
address _owner;
// multisignature wallet
address _developmentFund;
// Auto Swapper Enabled
bool swapEnabled;
modifier onlyOwner() {
}
// initialize some stuff
constructor () {
}
function totalSupply() external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
// function name() public pure override returns (string memory) {
// return _name;
// }
function name() public view virtual returns (string memory) {
}
// function symbol() public pure override returns (string memory) {
// return _symbol;
// }
function symbol() public view virtual returns (string memory) {
}
// function decimals() public pure override returns (uint8) {
// return _decimals;
// }
function decimals() public view virtual returns (uint8) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
/** Transfer Function */
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
/** Transfer Function */
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
/** Internal Transfer */
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function burnTokens(uint256 numTokens) external {
}
function burnAllTokens() external {
}
function burnTokensIncludingDecimals(uint256 numTokens) external {
}
// function purchaseTokenForAddress(address receiver) external payable {
// require(msg.value >= 10**4, 'Amount Too Few');
// _purchaseToken(receiver);
// }
function sellTokensForETH(address receiver, uint256 numTokens) external {
}
function sellTokensForETH(uint256 numTokens) external {
}
function sellTokensForETHWholeTokenAmounts(uint256 numTokens) external {
}
///////////////////////////////////
////// OWNER FUNCTIONS ///////
///////////////////////////////////
function setUniswapRouterAddress(address router) external onlyOwner {
}
function setSwapEnabled(bool enabled) external onlyOwner {
}
/** Withdraws Tokens Mistakingly Sent To Contract */
function withdrawTokens(address token) external onlyOwner {
}
/** Sets Maximum Transaction Data */
function setMaxTransactionData(bool checkEnabled, uint256 transferThreshold) external onlyOwner {
}
/** Updates The Address Of The Development Fund Receiver */
function updateDevelopmentFundingAddress(address newFund) external onlyOwner {
}
/** Excludes Contract From Fees */
function setFeeExemption(address wallet, bool exempt) external onlyOwner {
}
/** Sets Transfer Fees */
function setFee(uint256 newFee) external onlyOwner {
}
/** Transfers Ownership To Another User */
function transferOwnership(address newOwner) external onlyOwner {
}
/** Transfers Ownership To Zero Address */
function renounceOwnership() external onlyOwner {
}
///////////////////////////////////
////// INTERNAL FUNCTIONS ///////
///////////////////////////////////
function _sellTokensForETH(address receiver, uint256 numberTokens) internal {
}
function _purchaseToken(address receiver) internal {
}
function _burnTokens(uint256 numTokens) internal {
require(<FILL_ME>)
// remove from balance and supply
_balances[msg.sender] = _balances[msg.sender].sub(numTokens, 'Insufficient Balance');
_totalSupply = _totalSupply.sub(numTokens, 'Insufficient Supply');
// emit transfer to zero
emit Transfer(msg.sender, address(0), numTokens);
}
/** Purchase Tokens For Holder */
receive() external payable {
}
///////////////////////////////////
////// EVENTS ///////
///////////////////////////////////
event UpdatedDevelopmentFundingAddress(address newFund);
event TransferOwnership(address newOwner);
event SetSwapEnabled(bool enabled);
event SetFee(uint256 newFee);
event SetUniswapRouterAddress(address router);
event SetFeeExemption(address Contract, bool exempt);
event MaxTransactionDataSet(bool checkEnabled, uint256 transferThreshold);
}
| _balances[msg.sender]>=numTokens&&numTokens>0,'Insufficient Balance' | 282,438 | _balances[msg.sender]>=numTokens&&numTokens>0 |
"Exceeds maximum Unicorns supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract TiredUnicorns is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
string _metadataExtension = "";
string public METADATA_PROVENANCE_HASH = "";
string private _baseContractURI;
uint16 private _reserved = 300;
uint16 public constant MAX_UNICORNS = 12000;
uint256 private _price = 0.02 ether;
bool public _paused = false;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
constructor(string memory baseURI, string memory baseContractURI) ERC721("Tired Unicorns", "UNICORNS") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getMetadataExtension() public view returns(string memory) {
}
function adoptUnicorn(uint8 num) public payable {
uint256 supply = totalSupply();
require( !_paused, "Sale paused" );
require( num > 0 && num < 21, "You can adopt a maximum of 20 unicorn and minimum 1" );
require(<FILL_ME>)
require( msg.value >= _price * num, "Ether sent is not correct" );
for(uint8 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function tokensOfOwner(address _owner) public view returns(uint256[] memory) {
}
function getPrice() public view returns (uint256) {
}
function getReservedCount() public view returns (uint16) {
}
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function setContractURI(string memory baseContractURI) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/**
* @dev Internal function to set the token URI for a given token.
* Reverts if the token ID does not exist.
* @param tokenId uint256 ID of the token to set its URI
* @param uri string URI to assign
*/
function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner {
}
function setMetadataExtension(string memory str) public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner {
}
function reserveAirdrop(address _to, uint8 _amount) external onlyOwner {
}
function pauseSale(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| supply+num<MAX_UNICORNS-_reserved,"Exceeds maximum Unicorns supply" | 282,604 | supply+num<MAX_UNICORNS-_reserved |
"Not whitelisted" | /**
* @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 {ERC20PresetMinterPauser}.
*
* 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 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol) public {
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override 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) public virtual override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override 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) public virtual override 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) public virtual 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) public virtual returns (bool) {
}
/**
* @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 virtual {
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This 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 virtual {
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
/**
* @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 {
}
}
////// src/mith-jar.sol
// https://github.com/iearn-finance/vaults/blob/master/contracts/vaults/yVault.sol
/* pragma solidity ^0.6.7; */
/* import "./interfaces/strategy.sol"; */
/* import "./lib/erc20.sol"; */
/* import "./lib/safe-math.sol"; */
contract MithJar is ERC20 {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IERC20 public token;
uint256 public min = 9500;
uint256 public constant max = 10000;
address public strategy;
constructor(IStrategy _strategy)
public
ERC20(
string(abi.encodePacked(ERC20(_strategy.want()).name(), "vault")),
string(abi.encodePacked("v", ERC20(_strategy.want()).symbol()))
)
{
}
function balance() public view returns (uint256) {
}
// Custom logic in here for how much the jars allows to be borrowed
// Sets minimum required on-hand to keep small withdrawals cheap
function available() public view returns (uint256) {
}
function earn() public {
require(<FILL_ME>)
uint256 _bal = available();
token.safeTransfer(strategy, _bal);
IStrategy(strategy).deposit();
}
function depositAll() external {
}
function deposit(uint256 _amount) public {
}
function withdrawAll() external {
}
// No rebalance implementation for lower fees and faster swaps
function withdraw(uint256 _shares) public {
}
function getRatio() public view returns (uint256) {
}
}
| IStrategy(strategy).isWhitelisted(msg.sender),"Not whitelisted" | 282,613 | IStrategy(strategy).isWhitelisted(msg.sender) |
"Only voting system" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
require(<FILL_ME>)
_;
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| isVotingSystem(msg.sender),"Only voting system" | 282,702 | isVotingSystem(msg.sender) |
"Only exchange factory" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
require(<FILL_ME>)
_;
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| isExchangeFactory(msg.sender),"Only exchange factory" | 282,702 | isExchangeFactory(msg.sender) |
"Only exchange factory or voting" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
require(<FILL_ME>)
_;
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| isExchangeFactory(msg.sender)||isVotingSystem(msg.sender),"Only exchange factory or voting" | 282,702 | isExchangeFactory(msg.sender)||isVotingSystem(msg.sender) |
"requires wallet access" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
require(<FILL_ME>)
_;
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| getRegistry().hasWalletAccess(msg.sender),"requires wallet access" | 282,702 | getRegistry().hasWalletAccess(msg.sender) |
"only MessageProcessor" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
require(<FILL_ME>)
_;
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| getRegistry().getMessageProcessorAddress()==msg.sender,"only MessageProcessor" | 282,702 | getRegistry().getMessageProcessorAddress()==msg.sender |
"Only exchange" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
require(<FILL_ME>)
_;
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| getRegistry().isExchange(msg.sender),"Only exchange" | 282,702 | getRegistry().isExchange(msg.sender) |
"only registry" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
require(<FILL_ME>)
_;
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| getRegistryAddress()==msg.sender,"only registry" | 282,702 | getRegistryAddress()==msg.sender |
"only oracle" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
require(<FILL_ME>)
_;
}
modifier requiresLiquidityTokenSnapshotAccess() {
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| isValidOracleAddress(msg.sender),"only oracle" | 282,702 | isValidOracleAddress(msg.sender) |
"only incentives" | pragma solidity ^0.5.17;
// Base class for objects that need to know about other objects in the system
// This allows us to share modifiers and have a unified way of looking up other objects.
contract KnowsRegistry is IRegistryUpdateConsumer {
RegistryHolder private registryHolder;
modifier onlyVotingSystem() {
}
modifier onlyExchangeFactory() {
}
modifier onlyExchangeFactoryOrVotingSystem() {
}
modifier requiresWalletAcccess() {
}
modifier onlyMessageProcessor() {
}
modifier onlyExchange() {
}
modifier onlyRegistry() {
}
modifier onlyOracle() {
}
modifier requiresLiquidityTokenSnapshotAccess() {
require(<FILL_ME>)
_;
}
constructor(address _registryHolder) public {
}
function getRegistryHolder() internal view returns (RegistryHolder) {
}
function getRegistry() internal view returns (IRegistry) {
}
function getRegistryAddress() internal view returns (address) {
}
function isRegistryHolder(address a) internal view returns (bool) {
}
function isValidOracleAddress(address oracleAddress) public view returns (bool) {
}
function isValidVerifierAddress(address verifierAddress) public view returns (bool) {
}
function isValidStamperAddress(address stamperAddress) public view returns (bool) {
}
function isVotingSystem(address a) public view returns (bool) {
}
function isExchangeFactory(address a) public view returns (bool) {
}
function checkNotNull(address a) internal pure returns (address) {
}
function checkNotNullAP(address payable a) internal pure returns (address payable) {
}
}
| getRegistry().hasLiquidityTokensnapshotAccess(msg.sender),"only incentives" | 282,702 | getRegistry().hasLiquidityTokensnapshotAccess(msg.sender) |
"!= 1" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
require(<FILL_ME>)
requireExchangeExists(_exchangeAddress);
ExchangeData storage data = exchangeDataByExchangeAddress[_exchangeAddress];
currentSumOfExchangeWeights = currentSumOfExchangeWeights.add(defaultExchangeWeight).sub(
data.defaultExchangeWeight
);
data.defaultLiquidityPayoutMultiplier = _liquidityPayoutMultiplier;
data.defaultTraderPayoutMultiplier = _traderPayoutMultiplier;
data.defaultReferralPayoutMultiplier = _referralPayoutMultiplier;
data.defaultExchangeWeight = defaultExchangeWeight;
// Updating the current epoch
Epoch storage epoch = data.epochEntries[epochCount];
if (epoch.isActiveEpoch) {
epoch.liquidityPayoutMultiplier = _liquidityPayoutMultiplier;
epoch.traderPayoutMultiplier = _traderPayoutMultiplier;
epoch.referralPayoutMultiplier = _referralPayoutMultiplier;
epoch.exchangeWeight = defaultExchangeWeight;
}
for (uint256 i = 0; i < allExchangeAddresses.length; i++) {
ExchangeData storage exchangeData = exchangeDataByExchangeAddress[allExchangeAddresses[i]];
Epoch storage exchangeEpoch = exchangeData.epochEntries[epochCount];
if (epoch.isActiveEpoch) {
exchangeEpoch.sumOfExchangeWeights = currentSumOfExchangeWeights;
}
}
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| _liquidityPayoutMultiplier.add(_traderPayoutMultiplier).add(_referralPayoutMultiplier)==1ether,"!= 1" | 282,703 | _liquidityPayoutMultiplier.add(_traderPayoutMultiplier).add(_referralPayoutMultiplier)==1ether |
"exchange should not exists" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
require(<FILL_ME>)
allExchangeAddresses.push(_exchange);
ExchangeData storage data = exchangeDataByExchangeAddress[_exchange];
data.exchangeAddress = _exchange;
data.liquidityToken = ERC20Snapshot(_liquidityToken);
// init epoch
Epoch storage epoch = data.epochEntries[epochCount];
epoch.isActiveEpoch = true;
epoch.snapShotId = data.liquidityToken.snapshot();
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| exchangeDataByExchangeAddress[_exchange].exchangeAddress==address(0),"exchange should not exists" | 282,703 | exchangeDataByExchangeAddress[_exchange].exchangeAddress==address(0) |
"Exchange is removed" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
require(epochCount < maxEpoch, "max epoch reached");
ExchangeData storage data = exchangeDataByExchangeAddress[exchange];
require(<FILL_ME>)
Epoch storage epochEntry = data.epochEntries[epochCount];
require(epochEntry.isActiveEpoch, "Epoch should be active");
return epochEntry;
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| !data.isRemoved,"Exchange is removed" | 282,703 | !data.isRemoved |
"Epoch should be active" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
require(epochCount < maxEpoch, "max epoch reached");
ExchangeData storage data = exchangeDataByExchangeAddress[exchange];
require(!data.isRemoved, "Exchange is removed");
Epoch storage epochEntry = data.epochEntries[epochCount];
require(<FILL_ME>)
return epochEntry;
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| epochEntry.isActiveEpoch,"Epoch should be active" | 282,703 | epochEntry.isActiveEpoch |
"Already paid out" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
uint256 totalPayout = 0;
for (uint256 i = 0; i < allExchangeAddresses.length; i++) {
for (uint256 j = 0; j < _epochs.length; j++) {
Epoch storage epochEntry = getEpochOrDie(allExchangeAddresses[i], _epochs[j]);
totalPayout = totalPayout.add(
calculateLiquidityProviderPayout(_target, allExchangeAddresses[i], epochEntry)
);
// Ensure liquidity rewards can not be withdrawn twice for a epoch
require(<FILL_ME>)
epochEntry.paidOutLiquidityByAddress[_target] = true;
}
}
fsToken.mint(_target, totalPayout);
emit LiquidityProviderPayout(_target, totalPayout);
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| !epochEntry.paidOutLiquidityByAddress[_target],"Already paid out" | 282,703 | !epochEntry.paidOutLiquidityByAddress[_target] |
"epoch can not be withdrawn yet" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
requireExchangeExists(exchangeAddress);
ExchangeData storage data = exchangeDataByExchangeAddress[exchangeAddress];
Epoch storage epochEntry = data.epochEntries[epoch];
require(<FILL_ME>)
return epochEntry;
}
function requireExchangeExists(address exchangeAddress) private view {
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| !epochEntry.isActiveEpoch,"epoch can not be withdrawn yet" | 282,703 | !epochEntry.isActiveEpoch |
"Exchange does not exist" | pragma solidity ^0.5.17;
contract Incentives is KnowsRegistry, IIncentives {
using SafeMath for uint256;
// A structure containin all data about an exchange
struct ExchangeData {
address exchangeAddress;
// The liquidity token of the exchange
ERC20Snapshot liquidityToken;
uint256 defaultLiquidityPayoutMultiplier;
uint256 defaultTraderPayoutMultiplier;
uint256 defaultReferralPayoutMultiplier;
uint256 defaultExchangeWeight;
// A mapping for all epochs this exchange has been active
mapping(uint16 => Epoch) epochEntries;
// Has this exchange been removed
bool isRemoved;
}
// An epoch entry for an exchange
struct Epoch {
uint256 snapShotId;
uint256 liquidityPayoutMultiplier;
uint256 traderPayoutMultiplier;
uint256 referralPayoutMultiplier;
uint256 exchangeWeight;
uint256 sumOfExchangeWeights;
uint256 totalLiquidityRemoved;
mapping(address => uint256) traderPayout;
mapping(address => uint256) referralPayout;
mapping(address => uint256) withdrawnLiquidityByAddress;
uint256 totalTraderPayout;
uint256 totalReferralPayout;
bool isActiveEpoch;
mapping(address => bool) paidOutLiquidityByAddress;
bool isRemoved;
}
event ReferralPayout(address _target, uint256 totalPayout);
event TraderPayout(address _target, uint256 totalPayout);
event LiquidityProviderPayout(address _target, uint256 totalPayout);
// Reference to the fsToken contract
ERC20Mintable public fsToken;
// A mapping from exchange address to ExchangeData
mapping(address => ExchangeData) public exchangeDataByExchangeAddress;
// A list of all supported exchanges, when exchanges get removed they simply get marked as removed
// in the ExchangeData / EpochEntry
address[] private allExchangeAddresses;
// The count of epochs since this contract has launched
uint16 public epochCount;
// The maximum epoch this contract will run for ~5 years
uint16 public maxEpoch = 1750;
uint256 public totalTokensToMintPerEpoch = 40000 ether;
// Time until the next epoch can be rolled forward
// We chose slightly less than 24 hrs since we expect this to drift over time
// allowing us to make up for a slight drift by sending the transaction slightly earlier
uint256 public epochAdvanceTime = 23 hours + 55 minutes;
uint256 public lastUpdateTimestamp = now;
// The sum of all exchanges weight that are being active.
uint256 public currentSumOfExchangeWeights;
// will not payout to LP's if less to minRequiredSnapshotId
uint256 public minRequiredSnapshotId = 0;
constructor(address _registryHolder) public KnowsRegistry(_registryHolder) {
}
function setMaxEpoch(uint16 _maxEpoch) public onlyVotingSystem {
}
function setTotalTokensToMintPerEpoch(uint256 _totalTokensToMintPerEpoch) public onlyVotingSystem {
}
function setEpochAdvanceTime(uint256 _epochAdvanceTime) public onlyVotingSystem {
}
function setMinRequiredSnapshotId(uint256 _minRequiredSnapshotId) public onlyVotingSystem {
}
// Moves the contract one epoch forward.
// Enables the previous epoch to be paid out.
// Enables the new current epoch to track rewards.
function advanceEpoch() public {
}
// Changes the payout distribution for a given exchange
function updatePayoutDistribution(
address _exchangeAddress,
uint256 _liquidityPayoutMultiplier,
uint256 _traderPayoutMultiplier,
uint256 _referralPayoutMultiplier,
uint256 defaultExchangeWeight
) public onlyExchangeFactoryOrVotingSystem {
}
// Adds an exchange creating its associated data structures
function addExchange(address _exchange, address _liquidityToken) public onlyExchangeFactoryOrVotingSystem {
}
// Removes an exchange
// Instead of actually deleting its mapping it will be marked as removed
function removeExchange(address _exchange) public onlyExchangeFactoryOrVotingSystem {
}
// Serves as a safety switch to disable minting for FST in case there is a problem with incentives
function renounceMinter() public onlyVotingSystem {
}
// See IIncentives#rewardTrader
function rewardTrader(address _trader, address _referral, uint256 _amount) public onlyExchange {
}
// See IIncentives#trackLiquidityRemoved
function trackLiquidityRemoved(address _liquidityProvider, uint256 _amount) public onlyExchange {
}
function getActiveEpoch(address exchange) private view returns (Epoch storage) {
}
// Payout a trader for a given set of epochs
function payoutTrader(address _target, uint16[] memory _epochs) public {
}
// Get the payout for a trader for a given set of epochs
function getTraderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateTraderPayout(Epoch storage epochEntry, address trader) private view returns (uint256) {
}
// Payout referrals for a given set of epochs
function payoutReferral(address _target, uint16[] memory _epochs) public {
}
// Get payout referrals for a given set of epochs
function getReferralPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateReferralPayout(Epoch storage epochEntry, address referral) private view returns (uint256) {
}
// Payout liquidity providers for a given set of epochs
function payoutLiquidityProvider(address _target, uint16[] memory _epochs) public {
}
// Get Payout for liquidity providers for a given set of epochs
function getLiquidityProviderPayout(address _target, uint16[] memory _epochs) public view returns (uint256) {
}
function calculateLiquidityProviderPayout(
address liquidityProvider,
address exchangeAddress,
Epoch storage epochEntry
) private view returns (uint256) {
}
function getEpochOrDie(address exchangeAddress, uint16 epoch) private view returns (Epoch storage) {
}
function requireExchangeExists(address exchangeAddress) private view {
require(<FILL_ME>)
}
function onRegistryRefresh() public onlyRegistry {
}
function getAllExchangeAddresses() public view returns (address[] memory) {
}
function getExchangeDataByAddress(address exchangeAddress)
public
view
returns (address, uint256, uint256, uint256, uint256, bool)
{
}
function getExchangeEpoch(address exchangeAddress, uint16 epochNumber)
public
view
returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool)
{
}
function getExchangeEpochByUser(address exchangeAddress, uint16 epochNumber, address userAddress)
public
view
returns (uint256, uint256, uint256, bool, uint256)
{
}
}
| address(exchangeDataByExchangeAddress[exchangeAddress].exchangeAddress)!=address(0),"Exchange does not exist" | 282,703 | address(exchangeDataByExchangeAddress[exchangeAddress].exchangeAddress)!=address(0) |
"Insufficient Balance" | /// note.sol -- the `note' modifier, for logging calls as events
// Copyright (C) 2017 DappHub, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
//
// 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 (express or implied).
pragma solidity ^0.4.24;
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
/// auth.sol -- widely-used access control pattern for Ethereum
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// 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 (express or implied).
pragma solidity ^0.4.24;
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
mapping(address => bool) public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_)
public
auth
{
}
function setAuthority(address authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src) internal view returns (bool) {
}
}
/// math.sol -- mixin for inline numerical wizardry
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// 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 (express or implied).
pragma solidity ^0.4.24;
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
/*
Copyright 2017 DappHub, LLC
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.
*/
pragma solidity ^0.4.24;
// Token standard API
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function totalSupply() public view returns (uint supply);
function balanceOf( address who ) public view returns (uint value);
function allowance( address owner, address spender ) public view returns (uint _allowance);
function transfer( address to, uint value) public returns (bool ok);
function transferFrom( address from, address to, uint value) public returns (bool ok);
function approve( address spender, uint value ) public returns (bool ok);
event Transfer( address indexed from, address indexed to, uint value);
event Approval( address indexed owner, address indexed spender, uint value);
}
/// stop.sol -- mixin for enable/disable functionality
// Copyright (C) 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// 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 (express or implied).
pragma solidity ^0.4.13;
contract DSStop is DSNote, DSAuth {
bool public stopped;
modifier stoppable {
}
function stop() public auth note {
}
function start() public auth note {
}
}
/// base.sol -- basic ERC20 implementation
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// 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 (express or implied).
pragma solidity ^0.4.24;
contract DSTokenBase is ERC20, DSMath {
uint256 _supply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
constructor (uint supply) public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address src) public view returns (uint) {
}
function allowance(address src, address guy) public view returns (uint) {
}
function transfer(address dst, uint wad) public returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
returns (bool)
{
}
function approve(address guy, uint wad) public returns (bool) {
}
}
/// token.sol -- ERC20 implementation with minting and burning
// Copyright (C) 2015, 2016, 2017 DappHub, LLC
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// 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 (express or implied).
pragma solidity ^0.4.24;
contract TrueGoldToken is DSTokenBase(0), DSStop {
mapping (address => mapping (address => bool)) _trusted;
// Optional token name
string public name = "";
string public symbol = "";
uint256 public decimals = 18; // standard token precision. override to customize
uint256 public totalBuyBackRequested;
constructor (string name_,string symbol_) public {
}
event Trust(address indexed src, address indexed guy, bool wat);
event BuyBackIssuance(address buyBackHolder,address indexed guy, uint wad);
event Mint(address indexed guy, uint wad);
event Burn(address indexed guy, uint wad);
event BuyBackRequested(address indexed guy,uint wad);
function trusted(address src, address guy) public view returns (bool) {
}
function trust(address guy, bool wat) public stoppable {
}
function approve(address guy, uint wad) public stoppable returns (bool) {
}
function transfer(address dst, uint wad) public stoppable returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
stoppable
returns (bool)
{
}
function mint(uint wad) public {
}
function burn(uint wad) public {
}
function mint(address guy, uint wad) public auth stoppable {
}
function burn(address guy, uint wad) public auth stoppable {
}
function sendBuyBackRequest(address _sender,uint wad) public returns(bool)
{
require(wad > 0,"Insufficient Value");
require(<FILL_ME>)
burn(_sender,wad);
totalBuyBackRequested = add(totalBuyBackRequested,wad);
emit BuyBackRequested(_sender, wad);
return true;
}
function setName(string name_) public auth {
}
}
| _balances[_sender]>=wad,"Insufficient Balance" | 282,870 | _balances[_sender]>=wad |
"LinearDutchAuction: incorrect reserve" | // SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;
import "./Seller.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
/// @notice A Seller with a linearly decreasing price.
abstract contract LinearDutchAuction is Seller {
/**
@param unit The unit of "time" used for decreasing prices, block number or
timestamp. NOTE: See the comment on AuctionIntervalUnit re use of Time as a
unit.
@param startPoint The block or timestamp at which the auction opens. A value
of zero disables the auction. See setAuctionStartPoint().
@param startPrice The price at `startPoint`.
@param decreaseInterval The number of units to wait before decreasing the
price. MUST be non-zero.
@param decreaseSize The amount by which price decreases after every
`decreaseInterval`.
@param numDecreases The maximum number of price decreases before remaining
constant. The reserve price is therefore implicit and equal to
startPrice-numDecrease*decreaseSize.
*/
struct DutchAuctionConfig {
uint256 startPoint;
uint256 startPrice;
uint256 decreaseInterval;
uint256 decreaseSize;
// From https://docs.soliditylang.org/en/v0.8.10/types.html#enums "Enums
// cannot have more than 256 members"; presumably they take 8 bits, so
// use some of the numDecreases space instead.
uint248 numDecreases;
AuctionIntervalUnit unit;
}
/**
@notice The unit of "time" along which the cost decreases.
@dev If no value is provided then the zero UNSPECIFIED will trigger an
error.
NOTE: The Block unit is more reliable as it has an explicit progression
(simply incrementing). Miners are allowed to have a time drift into the
future although which predisposes to unexpected behaviour by which "future"
costs are encountered. See the ConsenSys 15-second rule:
https://consensys.net/blog/developers/solidity-best-practices-for-smart-contract-security/
*/
enum AuctionIntervalUnit {
UNSPECIFIED,
Block,
Time
}
/// @param expectedReserve See setAuctionConfig().
constructor(
DutchAuctionConfig memory config,
uint256 expectedReserve,
Seller.SellerConfig memory sellerConfig,
address payable _beneficiary
) Seller(sellerConfig, _beneficiary) {
}
/// @notice Configuration of price changes.
DutchAuctionConfig public dutchAuctionConfig;
/**
@notice Sets the auction config.
@param expectedReserve A safety check that the reserve, as calculated from
the config, is as expected.
*/
function setAuctionConfig(DutchAuctionConfig memory config, uint256 expectedReserve) public onlyOwner {
// Underflow might occur is size/num decreases is too large.
unchecked {
require(<FILL_ME>)
}
require(config.unit != AuctionIntervalUnit.UNSPECIFIED, "LinearDutchAuction: unspecified unit");
require(config.decreaseInterval > 0, "LinearDutchAuction: zero decrease interval");
dutchAuctionConfig = config;
}
/**
@notice Sets the config startPoint. A startPoint of zero disables the
auction.
@dev The auction can be toggle on and off with this function, without the
cost of having to update the entire config.
*/
function setAuctionStartPoint(uint256 startPoint) public onlyOwner {
}
/// @notice Override of Seller.cost() with Dutch-auction logic.
function cost(uint256 n) public view override returns (uint256) {
}
}
| config.startPrice-config.decreaseSize*config.numDecreases==expectedReserve,"LinearDutchAuction: incorrect reserve" | 282,911 | config.startPrice-config.decreaseSize*config.numDecreases==expectedReserve |
"CollateralMarket::changeDepositary: collateral depositary is not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "./utils/OwnablePausable.sol";
import "./Issuer.sol";
import "./Treasury.sol";
contract CollateralMarket is OwnablePausable {
using SafeMath for uint256;
using SafeERC20 for ERC20;
using EnumerableSet for EnumerableSet.AddressSet;
/// @notice Address of issuer contract.
Issuer public issuer;
/// @notice Address of treasury contract.
Treasury public treasury;
/// @notice Address of depositary contract.
address public depositary;
/// @dev Allowed tokens list.
EnumerableSet.AddressSet private _allowedTokens;
/// @notice An event emitted when token allowed.
event TokenAllowed(address token);
/// @notice An event emitted when token denied.
event TokenDenied(address token);
/// @notice An event thats emitted when an Issuer contract address changed.
event IssuerChanged(address newIssuer);
/// @notice An event thats emitted when an Treasury contract address changed.
event TreasuryChanged(address newTreasury);
/// @notice An event thats emitted when an Depositary contract address changed.
event DepositaryChanged(address newDepositary);
/// @notice An event thats emitted when an account buyed token.
event Buy(address customer, address token, uint256 amount, uint256 buy);
constructor(
address _issuer,
address payable _treasury,
address _depositary
) public {
}
/**
* @notice Allow token.
* @param token Allowable token.
*/
function allowToken(address token) external onlyOwner {
}
/**
* @notice Deny token.
* @param token Denied token.
*/
function denyToken(address token) external onlyOwner {
}
/**
* @return Allowed tokens list.
*/
function allowedTokens() external view returns (address[] memory) {
}
/**
* @notice Change Issuer contract address.
* @param _issuer New address Issuer contract.
*/
function changeIssuer(address _issuer) external onlyOwner {
}
/**
* @notice Change Treasury contract address.
* @param _treasury New address Treasury contract.
*/
function changeTreasury(address payable _treasury) external onlyOwner {
}
/**
* @notice Change Depositary contract address.
* @param _depositary New address Depositary contract.
*/
function changeDepositary(address _depositary) external onlyOwner {
require(<FILL_ME>)
depositary = _depositary;
emit DepositaryChanged(depositary);
}
/**
* @notice Buy stable token with ERC20 payment token amount.
* @param token Payment token.
* @param amount Amount of payment token.
*/
function buy(ERC20 token, uint256 amount) external whenNotPaused {
}
}
| issuer.hasDepositary(_depositary),"CollateralMarket::changeDepositary: collateral depositary is not allowed" | 282,961 | issuer.hasDepositary(_depositary) |
"CollateralMarket::buy: token is not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "./utils/OwnablePausable.sol";
import "./Issuer.sol";
import "./Treasury.sol";
contract CollateralMarket is OwnablePausable {
using SafeMath for uint256;
using SafeERC20 for ERC20;
using EnumerableSet for EnumerableSet.AddressSet;
/// @notice Address of issuer contract.
Issuer public issuer;
/// @notice Address of treasury contract.
Treasury public treasury;
/// @notice Address of depositary contract.
address public depositary;
/// @dev Allowed tokens list.
EnumerableSet.AddressSet private _allowedTokens;
/// @notice An event emitted when token allowed.
event TokenAllowed(address token);
/// @notice An event emitted when token denied.
event TokenDenied(address token);
/// @notice An event thats emitted when an Issuer contract address changed.
event IssuerChanged(address newIssuer);
/// @notice An event thats emitted when an Treasury contract address changed.
event TreasuryChanged(address newTreasury);
/// @notice An event thats emitted when an Depositary contract address changed.
event DepositaryChanged(address newDepositary);
/// @notice An event thats emitted when an account buyed token.
event Buy(address customer, address token, uint256 amount, uint256 buy);
constructor(
address _issuer,
address payable _treasury,
address _depositary
) public {
}
/**
* @notice Allow token.
* @param token Allowable token.
*/
function allowToken(address token) external onlyOwner {
}
/**
* @notice Deny token.
* @param token Denied token.
*/
function denyToken(address token) external onlyOwner {
}
/**
* @return Allowed tokens list.
*/
function allowedTokens() external view returns (address[] memory) {
}
/**
* @notice Change Issuer contract address.
* @param _issuer New address Issuer contract.
*/
function changeIssuer(address _issuer) external onlyOwner {
}
/**
* @notice Change Treasury contract address.
* @param _treasury New address Treasury contract.
*/
function changeTreasury(address payable _treasury) external onlyOwner {
}
/**
* @notice Change Depositary contract address.
* @param _depositary New address Depositary contract.
*/
function changeDepositary(address _depositary) external onlyOwner {
}
/**
* @notice Buy stable token with ERC20 payment token amount.
* @param token Payment token.
* @param amount Amount of payment token.
*/
function buy(ERC20 token, uint256 amount) external whenNotPaused {
require(<FILL_ME>)
require(issuer.hasDepositary(depositary), "CollateralMarket::buy: collateral depositary is not allowed");
token.safeTransferFrom(_msgSender(), address(this), amount);
token.transfer(depositary, amount);
ERC20 stableToken = ERC20(issuer.stableToken());
uint256 stableTokenDecimals = stableToken.decimals();
uint256 tokenDecimals = token.decimals();
uint256 reward = amount.mul(10**(stableTokenDecimals.sub(tokenDecimals)));
issuer.rebalance();
treasury.transfer(address(stableToken), _msgSender(), reward);
emit Buy(_msgSender(), address(token), amount, reward);
}
}
| _allowedTokens.contains(address(token)),"CollateralMarket::buy: token is not allowed" | 282,961 | _allowedTokens.contains(address(token)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.