comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"invalid address" | pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IKingSwapERC20.sol";
import "./interfaces/IKingSwapPair.sol";
import "./interfaces/IKingSwapFactory.sol";
contract KingServant is Ownable {
using SafeMath for uint256;
IKingSwapFactory public factory;
address public table;
address public king;
address public weth;
uint8 public burnRatio = 0;
constructor(IKingSwapFactory _factory, address _table, address _king, address _weth) public {
require(<FILL_ME>)
factory = _factory;
king = _king;
table = _table;
weth = _weth;
}
function convert(address token0, address token1) public {
}
function _toWETH(address token) internal returns (uint256) {
}
function _toKING(uint256 amountIn, address to) internal {
}
function setBurnRatio(uint8 newRatio) public onlyOwner {
}
}
| address(_factory)!=address(0)&&_table!=address(0)&&_king!=address(0)&&_weth!=address(0),"invalid address" | 46,818 | address(_factory)!=address(0)&&_table!=address(0)&&_king!=address(0)&&_weth!=address(0) |
"Invalid basis points" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
require(<FILL_ME>)
require(payableOptions[msg.value], "Invalid msg.value");
require(validateSig(encodeData(_user, _referrer, _referralBasisPoint, _guildType), _signature), "Invalid signature");
if (_hash != bytes32(0)) {
recordHash(_hash);
}
uint8 purchaseType = campaign.proxyPurchaseType;
uint256 netValue = msg.value;
uint256 referralValue = _referrerBack(_referrer, _referralBasisPoint);
uint256 guildValue = _guildPoolBack(_guildType);
netValue = msg.value.sub(referralValue).sub(guildValue);
emit Sold(
_user,
_referrer,
purchaseType,
msg.value,
referralValue,
guildValue,
netValue,
_guildType
);
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| _referralBasisPoint+ethBackBasisPoint+guildBasisPoint<=BASE,"Invalid basis points" | 46,875 | _referralBasisPoint+ethBackBasisPoint+guildBasisPoint<=BASE |
"Invalid msg.value" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
require(_referralBasisPoint + ethBackBasisPoint + guildBasisPoint <= BASE, "Invalid basis points");
require(<FILL_ME>)
require(validateSig(encodeData(_user, _referrer, _referralBasisPoint, _guildType), _signature), "Invalid signature");
if (_hash != bytes32(0)) {
recordHash(_hash);
}
uint8 purchaseType = campaign.proxyPurchaseType;
uint256 netValue = msg.value;
uint256 referralValue = _referrerBack(_referrer, _referralBasisPoint);
uint256 guildValue = _guildPoolBack(_guildType);
netValue = msg.value.sub(referralValue).sub(guildValue);
emit Sold(
_user,
_referrer,
purchaseType,
msg.value,
referralValue,
guildValue,
netValue,
_guildType
);
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| payableOptions[msg.value],"Invalid msg.value" | 46,875 | payableOptions[msg.value] |
"Invalid signature" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
require(_referralBasisPoint + ethBackBasisPoint + guildBasisPoint <= BASE, "Invalid basis points");
require(payableOptions[msg.value], "Invalid msg.value");
require(<FILL_ME>)
if (_hash != bytes32(0)) {
recordHash(_hash);
}
uint8 purchaseType = campaign.proxyPurchaseType;
uint256 netValue = msg.value;
uint256 referralValue = _referrerBack(_referrer, _referralBasisPoint);
uint256 guildValue = _guildPoolBack(_guildType);
netValue = msg.value.sub(referralValue).sub(guildValue);
emit Sold(
_user,
_referrer,
purchaseType,
msg.value,
referralValue,
guildValue,
netValue,
_guildType
);
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| validateSig(encodeData(_user,_referrer,_referralBasisPoint,_guildType),_signature),"Invalid signature" | 46,875 | validateSig(encodeData(_user,_referrer,_referralBasisPoint,_guildType),_signature) |
"Invalid signature" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
require(_referralBasisPoint + ethBackBasisPoint + guildBasisPoint <= BASE, "Invalid basis points");
require(payableOptions[msg.value], "Invalid msg.value");
require(<FILL_ME>)
uint8 purchaseType = campaign.purchaseType;
uint256 netValue = msg.value;
uint256 referralValue = 0;
uint256 guildValue = 0;
if (purchaseType == PURCHASE_ETH_BACK || purchaseType == PURCHASE_ETH_BACK_UP20) {
if (getRandom(chanceDenom, nonce, msg.sender) == 0) {
uint256 ethBackValue = _ethBack(msg.sender, ethBackBasisPoint);
netValue = netValue.sub(ethBackValue);
} else {
purchaseType = campaign.subPurchaseType;
referralValue = _referrerBack(_referrer, _referralBasisPoint);
guildValue = _guildPoolBack(_guildType);
netValue = msg.value.sub(referralValue).sub(guildValue);
}
nonce++;
} else {
referralValue = _referrerBack(_referrer, _referralBasisPoint);
guildValue = _guildPoolBack(_guildType);
netValue = msg.value.sub(referralValue).sub(guildValue);
}
emit Sold(
msg.sender,
_referrer,
purchaseType,
msg.value,
referralValue,
guildValue,
netValue,
_guildType
);
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| validateSig(encodeData(msg.sender,_referrer,_referralBasisPoint,_guildType),_signature),"Invalid signature" | 46,875 | validateSig(encodeData(msg.sender,_referrer,_referralBasisPoint,_guildType),_signature) |
"The hash is already transacted" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
require(<FILL_ME>)
_hashTransactedAt[_hash] = block.number;
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| _hashTransactedAt[_hash]==0,"The hash is already transacted" | 46,875 | _hashTransactedAt[_hash]==0 |
"Invalid _guildType" | pragma solidity 0.5.17;
interface GuildAsset {
function getTotalVolume(uint16 _guildType) external view returns (uint256);
}
interface SPLGuildPool {
function addEthToGuildPool(uint16 _guildType, address _purchaseBy) external payable;
}
interface IngameMoney {
function hashTransactedAt(bytes32 _hash) external view returns(uint256);
function buy(address payable _user, address payable _referrer, uint256 _referralBasisPoint, uint16 _guildType, bytes calldata _signature, bytes32 _hash) external payable;
}
contract SPLSPLGatewayV1 is Operatable, Withdrawable, IngameMoney {
using Uint256 for uint256;
struct Campaign {
uint8 purchaseType;
uint8 subPurchaseType;
uint8 proxyPurchaseType;
}
uint8 constant PURCHASE_NORMAL = 0;
uint8 constant PURCHASE_ETH_BACK = 1;
uint8 constant PURCHASE_UP20 = 2;
uint8 constant PURCHASE_REGULAR = 3;
uint8 constant PURCHASE_ETH_BACK_UP20 = 4;
Campaign public campaign;
mapping(uint256 => bool) public payableOptions;
address public validater;
GuildAsset public guildAsset;
SPLGuildPool public guildPool;
uint256 public guildBasisPoint;
uint256 constant BASE = 10000;
uint256 private nonce;
uint16 public chanceDenom;
uint256 public ethBackBasisPoint;
bytes private salt;
mapping(bytes32 => uint256) private _hashTransactedAt;
event Sold(
address indexed user,
address indexed referrer,
uint8 purchaseType,
uint256 grossValue,
uint256 referralValue,
uint256 guildValue,
uint256 netValue,
uint16 indexed guildType
);
event CampaignUpdated(
uint8 purchaseType,
uint8 subPurchaseType,
uint8 proxyPurchaseType
);
event GuildBasisPointUpdated(
uint256 guildBasisPoint
);
constructor(
address _validater,
address _guildAssetAddress,
address payable _guildPoolAddress
) public payable {
}
function setValidater(address _varidater) public onlyOperator() {
}
function setPayableOption(uint256 _option, bool desired) external onlyOperator() {
}
function setCampaign(
uint8 _purchaseType,
uint8 _subPurchaseType,
uint8 _proxyPurchaseType
)
public
onlyOperator()
{
}
function setGuildAssetAddress(address _guildAssetAddress) public onlyOwner() {
}
function setGuildPoolAddress(address payable _guildPoolAddress) public onlyOwner() {
}
function updateGuildBasisPoint(uint256 _newGuildBasisPoint) public onlyOwner() {
}
function updateChance(uint16 _newchanceDenom) public onlyOperator() {
}
function updateEthBackBasisPoint(uint256 _ethBackBasisPoint) public onlyOperator() {
}
function buy(
address payable _user,
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature,
bytes32 _hash
)
public
payable
whenNotPaused()
{
}
function buySPL(
address payable _referrer,
uint256 _referralBasisPoint,
uint16 _guildType,
bytes memory _signature
)
public
payable
{
}
function hashTransactedAt(bytes32 _hash) public view returns (uint256) {
}
function recordHash(bytes32 _hash) internal {
}
function getRandom(uint16 max, uint256 _nonce, address _sender) public view returns (uint16) {
}
function _ethBack(address payable _buyer, uint256 _ethBackBasisPoint) internal returns (uint256) {
}
function _guildPoolBack(uint16 _guildType) internal returns (uint256) {
if(_guildType == 0) {
return 0;
}
require(<FILL_ME>)
uint256 guildValue;
guildValue = msg.value.mul(guildBasisPoint).div(BASE);
guildPool.addEthToGuildPool.value(guildValue)(_guildType, msg.sender);
return guildValue;
}
function _referrerBack(address payable _referrer, uint256 _referralBasisPoint) internal returns (uint256) {
}
function encodeData(address _sender, address _referrer, uint256 _referralBasisPoint, uint16 _guildType) public pure returns (bytes32) {
}
function validateSig(bytes32 _message, bytes memory _signature) public view returns (bool) {
}
function recover(bytes32 _message, bytes memory _signature) public pure returns (address) {
}
}
| guildAsset.getTotalVolume(_guildType)!=0,"Invalid _guildType" | 46,875 | guildAsset.getTotalVolume(_guildType)!=0 |
"Not in blocklist" | pragma solidity 0.5.16;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/
contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBlocklist(address indexed account, address by);
/**
* @notice Event emitted when a user is removed from the blocklist
*/
event removedFromBlocklist(address indexed account, address by);
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyInBlocklist(address account) {
require(<FILL_ME>)
_;
}
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyNotInBlocklist(address account) {
}
/**
* @dev Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function _addToBlocklist(address account) private onlyNotInBlocklist(account) returns(bool) {
}
/**
* @notice Adds many addresses to the blocklist at once
* @param accounts[] The list of addresses to add
* @dev Fails if at least one of the addresses was already blocklisted
*/
function batchAddToBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function addToBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @dev Removes an address from the blocklist
* @param account The address to remove
* @return true if the operation succeeds
* @dev Fails if the address was not blocklisted
*/
function _removeFromBlocklist(address account) private onlyInBlocklist(account) returns(bool) {
}
/**
* @notice Removes many addresses from the blocklist at once
* @param accounts[] The list of addresses to remove
* @dev Fails if at least one of the addresses was not blocklisted
*/
function batchRemoveFromBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Removes an address from the blocklist
* @param account The address to remove
* @dev Fails if the address was not blocklisted
* @return true if the operation succeeded
*/
function removeFromBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @notice Consults whether an address is blocklisted
* @param account The address to check
* @return bool True if the address is blocklisted
*/
function isBlocklisted(address account) public view returns(bool) {
}
/**
* @notice Fetches the list of all blocklisted addresses
* @return array The list of currently blocklisted addresses
*/
function getFullList() public view returns(address[] memory) {
}
}
| isBlocklisted(account),"Not in blocklist" | 46,878 | isBlocklisted(account) |
"Already in blocklist" | pragma solidity 0.5.16;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/
contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBlocklist(address indexed account, address by);
/**
* @notice Event emitted when a user is removed from the blocklist
*/
event removedFromBlocklist(address indexed account, address by);
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyInBlocklist(address account) {
}
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyNotInBlocklist(address account) {
require(<FILL_ME>)
_;
}
/**
* @dev Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function _addToBlocklist(address account) private onlyNotInBlocklist(account) returns(bool) {
}
/**
* @notice Adds many addresses to the blocklist at once
* @param accounts[] The list of addresses to add
* @dev Fails if at least one of the addresses was already blocklisted
*/
function batchAddToBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function addToBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @dev Removes an address from the blocklist
* @param account The address to remove
* @return true if the operation succeeds
* @dev Fails if the address was not blocklisted
*/
function _removeFromBlocklist(address account) private onlyInBlocklist(account) returns(bool) {
}
/**
* @notice Removes many addresses from the blocklist at once
* @param accounts[] The list of addresses to remove
* @dev Fails if at least one of the addresses was not blocklisted
*/
function batchRemoveFromBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Removes an address from the blocklist
* @param account The address to remove
* @dev Fails if the address was not blocklisted
* @return true if the operation succeeded
*/
function removeFromBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @notice Consults whether an address is blocklisted
* @param account The address to check
* @return bool True if the address is blocklisted
*/
function isBlocklisted(address account) public view returns(bool) {
}
/**
* @notice Fetches the list of all blocklisted addresses
* @return array The list of currently blocklisted addresses
*/
function getFullList() public view returns(address[] memory) {
}
}
| !isBlocklisted(account),"Already in blocklist" | 46,878 | !isBlocklisted(account) |
null | pragma solidity 0.5.16;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/
contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBlocklist(address indexed account, address by);
/**
* @notice Event emitted when a user is removed from the blocklist
*/
event removedFromBlocklist(address indexed account, address by);
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyInBlocklist(address account) {
}
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyNotInBlocklist(address account) {
}
/**
* @dev Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function _addToBlocklist(address account) private onlyNotInBlocklist(account) returns(bool) {
}
/**
* @notice Adds many addresses to the blocklist at once
* @param accounts[] The list of addresses to add
* @dev Fails if at least one of the addresses was already blocklisted
*/
function batchAddToBlocklist(address[] calldata accounts) external onlyOwner {
for (uint256 i = 0; i < accounts.length; i++) {
require(<FILL_ME>)
}
}
/**
* @notice Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function addToBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @dev Removes an address from the blocklist
* @param account The address to remove
* @return true if the operation succeeds
* @dev Fails if the address was not blocklisted
*/
function _removeFromBlocklist(address account) private onlyInBlocklist(account) returns(bool) {
}
/**
* @notice Removes many addresses from the blocklist at once
* @param accounts[] The list of addresses to remove
* @dev Fails if at least one of the addresses was not blocklisted
*/
function batchRemoveFromBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Removes an address from the blocklist
* @param account The address to remove
* @dev Fails if the address was not blocklisted
* @return true if the operation succeeded
*/
function removeFromBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @notice Consults whether an address is blocklisted
* @param account The address to check
* @return bool True if the address is blocklisted
*/
function isBlocklisted(address account) public view returns(bool) {
}
/**
* @notice Fetches the list of all blocklisted addresses
* @return array The list of currently blocklisted addresses
*/
function getFullList() public view returns(address[] memory) {
}
}
| _addToBlocklist(accounts[i]) | 46,878 | _addToBlocklist(accounts[i]) |
null | pragma solidity 0.5.16;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/
contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBlocklist(address indexed account, address by);
/**
* @notice Event emitted when a user is removed from the blocklist
*/
event removedFromBlocklist(address indexed account, address by);
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyInBlocklist(address account) {
}
/**
* @notice Modifier to facilitate checking the blocklist
*/
modifier onlyNotInBlocklist(address account) {
}
/**
* @dev Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function _addToBlocklist(address account) private onlyNotInBlocklist(account) returns(bool) {
}
/**
* @notice Adds many addresses to the blocklist at once
* @param accounts[] The list of addresses to add
* @dev Fails if at least one of the addresses was already blocklisted
*/
function batchAddToBlocklist(address[] calldata accounts) external onlyOwner {
}
/**
* @notice Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/
function addToBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @dev Removes an address from the blocklist
* @param account The address to remove
* @return true if the operation succeeds
* @dev Fails if the address was not blocklisted
*/
function _removeFromBlocklist(address account) private onlyInBlocklist(account) returns(bool) {
}
/**
* @notice Removes many addresses from the blocklist at once
* @param accounts[] The list of addresses to remove
* @dev Fails if at least one of the addresses was not blocklisted
*/
function batchRemoveFromBlocklist(address[] calldata accounts) external onlyOwner {
for (uint256 i = 0; i < accounts.length; i++) {
require(<FILL_ME>)
}
}
/**
* @notice Removes an address from the blocklist
* @param account The address to remove
* @dev Fails if the address was not blocklisted
* @return true if the operation succeeded
*/
function removeFromBlocklist(address account) external onlyOwner returns(bool) {
}
/**
* @notice Consults whether an address is blocklisted
* @param account The address to check
* @return bool True if the address is blocklisted
*/
function isBlocklisted(address account) public view returns(bool) {
}
/**
* @notice Fetches the list of all blocklisted addresses
* @return array The list of currently blocklisted addresses
*/
function getFullList() public view returns(address[] memory) {
}
}
| _removeFromBlocklist(accounts[i]) | 46,878 | _removeFromBlocklist(accounts[i]) |
"Ownable: caller is not the owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ERC20 {
function totalSupply() public view virtual returns (uint256);
function balanceOf(address who) public view virtual returns (uint256);
function transfer(address to, uint256 value) public virtual returns (bool);
function transferFrom(address from, address to, uint256 value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Deposit is Ownable{
ERC20 public fungibleContract;
uint256 public erc20TokenValue = 34 * 10 ** 16;
uint256 public depositLimit = 10* 10**18;
address public erc20AdminAddress;
mapping (address => bool) public depositedMap;
event DepositSuccess(address addr, uint256 value);
constructor(){}
receive() external payable {
}
function setERC20Address(address _address) external onlyOwner {
}
function setERC20TokenValueCount(uint256 _wei, uint256 _limit) external onlyOwner {
}
// function setDepositLimit(uint256 _limit) public onlyOwner{
// depositLimit = _limit;
// }
function setERC20AdminAddress(address _address) external onlyOwner {
}
function withdrawBalance(address payable _address) external onlyOwner {
}
}
| owner()==msg.sender,"Ownable: caller is not the owner" | 46,907 | owner()==msg.sender |
"recharged" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ERC20 {
function totalSupply() public view virtual returns (uint256);
function balanceOf(address who) public view virtual returns (uint256);
function transfer(address to, uint256 value) public virtual returns (bool);
function transferFrom(address from, address to, uint256 value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Deposit is Ownable{
ERC20 public fungibleContract;
uint256 public erc20TokenValue = 34 * 10 ** 16;
uint256 public depositLimit = 10* 10**18;
address public erc20AdminAddress;
mapping (address => bool) public depositedMap;
event DepositSuccess(address addr, uint256 value);
constructor(){}
receive() external payable {
require(msg.value == erc20TokenValue, "not integer token");
require(<FILL_ME>)
require(fungibleContract.transferFrom(erc20AdminAddress, msg.sender, depositLimit), "transfer erc20 token failed");
depositedMap[msg.sender] = true;
emit DepositSuccess(msg.sender, depositLimit);
}
function setERC20Address(address _address) external onlyOwner {
}
function setERC20TokenValueCount(uint256 _wei, uint256 _limit) external onlyOwner {
}
// function setDepositLimit(uint256 _limit) public onlyOwner{
// depositLimit = _limit;
// }
function setERC20AdminAddress(address _address) external onlyOwner {
}
function withdrawBalance(address payable _address) external onlyOwner {
}
}
| !depositedMap[msg.sender],"recharged" | 46,907 | !depositedMap[msg.sender] |
"transfer erc20 token failed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract ERC20 {
function totalSupply() public view virtual returns (uint256);
function balanceOf(address who) public view virtual returns (uint256);
function transfer(address to, uint256 value) public virtual returns (bool);
function transferFrom(address from, address to, uint256 value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract Deposit is Ownable{
ERC20 public fungibleContract;
uint256 public erc20TokenValue = 34 * 10 ** 16;
uint256 public depositLimit = 10* 10**18;
address public erc20AdminAddress;
mapping (address => bool) public depositedMap;
event DepositSuccess(address addr, uint256 value);
constructor(){}
receive() external payable {
require(msg.value == erc20TokenValue, "not integer token");
require(!depositedMap[msg.sender], "recharged");
require(<FILL_ME>)
depositedMap[msg.sender] = true;
emit DepositSuccess(msg.sender, depositLimit);
}
function setERC20Address(address _address) external onlyOwner {
}
function setERC20TokenValueCount(uint256 _wei, uint256 _limit) external onlyOwner {
}
// function setDepositLimit(uint256 _limit) public onlyOwner{
// depositLimit = _limit;
// }
function setERC20AdminAddress(address _address) external onlyOwner {
}
function withdrawBalance(address payable _address) external onlyOwner {
}
}
| fungibleContract.transferFrom(erc20AdminAddress,msg.sender,depositLimit),"transfer erc20 token failed" | 46,907 | fungibleContract.transferFrom(erc20AdminAddress,msg.sender,depositLimit) |
'MerkleDistributor: Withdraw transfer failed.' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.5;
contract ForefrontMerkle is IMerkleDistributor, Ownable {
address public immutable override token;
bytes32 public immutable override merkleRoot;
event Withdraw(uint256 amount, address recipient);
// This is a packed array of booleans.
mapping(uint256 => uint256) private claimedBitMap;
constructor(address token_, bytes32 merkleRoot_) public {
}
function isClaimed(uint256 index) public view override returns (bool) {
}
function _setClaimed(uint256 index) private {
}
function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override {
}
// Allows the authorized user to reclaim the tokens deposited in this contract
function withdraw(address recipient) public onlyOwner() {
require(<FILL_ME>)
emit Withdraw(IERC20(token).balanceOf(address(this)), recipient);
}
function totalSupply() view public returns(uint256) {
}
}
| IERC20(token).transfer(recipient,IERC20(token).balanceOf(address(this))),'MerkleDistributor: Withdraw transfer failed.' | 46,908 | IERC20(token).transfer(recipient,IERC20(token).balanceOf(address(this))) |
"user is not whitelisted" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(<FILL_ME>)
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| isOgWhitelisted(msg.sender),"user is not whitelisted" | 46,940 | isOgWhitelisted(msg.sender) |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(<FILL_ME>)
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=ogNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=ogNftPerAddressLimit |
"max NFT limit exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(<FILL_ME>)
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=ogMaxSupply,"max NFT limit exceeded" | 46,940 | supply+_mintAmount<=ogMaxSupply |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(<FILL_ME>)
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=ogNftPerAddressLimit+wlNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=ogNftPerAddressLimit+wlNftPerAddressLimit |
"user is not whitelisted" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(<FILL_ME>)
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| isWlWhitelisted(msg.sender),"user is not whitelisted" | 46,940 | isWlWhitelisted(msg.sender) |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(<FILL_ME>)
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=wlNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=wlNftPerAddressLimit |
"max NFT limit exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(<FILL_ME>)
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=wlMaxSupply,"max NFT limit exceeded" | 46,940 | supply+_mintAmount<=wlMaxSupply |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(<FILL_ME>)
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=ogNftPerAddressLimit+wlNftPerAddressLimit+pNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=ogNftPerAddressLimit+wlNftPerAddressLimit+pNftPerAddressLimit |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(<FILL_ME>)
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=wlNftPerAddressLimit+pNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=wlNftPerAddressLimit+pNftPerAddressLimit |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(<FILL_ME>)
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= pMaxSupply, "max NFT limit exceeded");
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+_mintAmount<=pNftPerAddressLimit,"max NFT per address exceeded" | 46,940 | ownerMintedCount+_mintAmount<=pNftPerAddressLimit |
"max NFT limit exceeded" | // SPDX-License-Identifier: GPL-3.0
// Amended by HashLips
/**
!Disclaimer!
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.
*/
pragma solidity >=0.7.0 <0.9.0;
contract MetaJoseon is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public saleState = 1;
string public notRevealedUri;
uint256 public ogMaxSupply = 250;
uint256 public wlMaxSupply = 3250;
uint256 public pMaxSupply = 8941;
bool public revealed = false;
address[] public ogWhitelistedAddresses;
address[] public wlWhitelistedAddresses;
uint256 public ogCost = 0 ether;
uint256 public wlCost = 0.06 ether;
uint256 public pCost = 0.08 ether;
uint256 public ogNftPerAddressLimit = 1;
uint256 public wlNftPerAddressLimit = 3;
uint256 public pNftPerAddressLimit = 5;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address[] memory _ogWhitelistedAddresses,
address[] memory _wlWhitelistedAddresses
) ERC721(_name, _symbol) {
}
// internal
function _setOgwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _setWlwhitelistUsers(address[] memory _users) private onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(_mintAmount > 0, "need to mint at least 1 NFT");
if(msg.sender != owner()){
//Stop
require(saleState != 0, "the contract is paused");
//og
if(saleState == 1){
require(isOgWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit, "max NFT per address exceeded");
require(msg.value >= ogCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= ogMaxSupply, "max NFT limit exceeded");
//wl
}else if(saleState == 2){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(isWlWhitelisted(msg.sender), "user is not whitelisted");
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= wlCost * _mintAmount, "insufficient funds");
require(supply + _mintAmount <= wlMaxSupply, "max NFT limit exceeded");
//public
}else if(saleState == 3){
if(isOgWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= ogNftPerAddressLimit + wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else if(isWlWhitelisted(msg.sender)){
require(ownerMintedCount + _mintAmount <= wlNftPerAddressLimit + pNftPerAddressLimit, "max NFT per address exceeded");
}else{
require(ownerMintedCount + _mintAmount <= pNftPerAddressLimit, "max NFT per address exceeded");
}
require(msg.value >= pCost * _mintAmount, "insufficient funds");
require(<FILL_ME>)
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isOgWhitelisted(address _user) public view returns (bool) {
}
function isWlWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setOgwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setWlwhitelistUsers(address[] calldata _users) public onlyOwner {
}
function setOgCost(uint256 _newCost) public onlyOwner {
}
function setWlCost(uint256 _newCost) public onlyOwner {
}
function setPCost(uint256 _newCost) public onlyOwner {
}
function setOgNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setWlNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setSaleState(uint256 _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=pMaxSupply,"max NFT limit exceeded" | 46,940 | supply+_mintAmount<=pMaxSupply |
"Max investment allowed is 5 ether" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IToken {
function transfer(address to, uint256 tokens) external returns (bool success);
function burnTokens(uint256 _amount) external;
function balanceOf(address tokenOwner) external view returns (uint256 balance);
}
contract STEKpresale is Owned {
using SafeMath for uint256;
address public tokenAddress;
bool public saleOpen;
uint256 tokenRatePerEth = 65000; // 65000 ÷ 100 = 650 Tokens // 1 ETH = 650 STEK
mapping(address => uint256) public usersInvestments;
constructor() public {
}
function startSale() external onlyOwner{
}
function setTokenAddress(address tokenContract) external onlyOwner{
}
function closeSale() external onlyOwner{
}
receive() external payable{
require(saleOpen, "Sale is not open");
require(<FILL_ME>)
uint256 tokens = getTokenAmount(msg.value);
require(IToken(tokenAddress).transfer(msg.sender, tokens), "Insufficient balance of sale contract!");
usersInvestments[msg.sender] = usersInvestments[msg.sender].add(msg.value);
// send received funds to the owner
owner.transfer(msg.value);
}
function getTokenAmount(uint256 amount) internal view returns(uint256){
}
function burnUnSoldTokens() external onlyOwner{
}
}
| usersInvestments[msg.sender].add(msg.value)<=5ether,"Max investment allowed is 5 ether" | 46,946 | usersInvestments[msg.sender].add(msg.value)<=5ether |
"Insufficient balance of sale contract!" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: MIT
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IToken {
function transfer(address to, uint256 tokens) external returns (bool success);
function burnTokens(uint256 _amount) external;
function balanceOf(address tokenOwner) external view returns (uint256 balance);
}
contract STEKpresale is Owned {
using SafeMath for uint256;
address public tokenAddress;
bool public saleOpen;
uint256 tokenRatePerEth = 65000; // 65000 ÷ 100 = 650 Tokens // 1 ETH = 650 STEK
mapping(address => uint256) public usersInvestments;
constructor() public {
}
function startSale() external onlyOwner{
}
function setTokenAddress(address tokenContract) external onlyOwner{
}
function closeSale() external onlyOwner{
}
receive() external payable{
require(saleOpen, "Sale is not open");
require(usersInvestments[msg.sender].add(msg.value) <= 5 ether, "Max investment allowed is 5 ether");
uint256 tokens = getTokenAmount(msg.value);
require(<FILL_ME>)
usersInvestments[msg.sender] = usersInvestments[msg.sender].add(msg.value);
// send received funds to the owner
owner.transfer(msg.value);
}
function getTokenAmount(uint256 amount) internal view returns(uint256){
}
function burnUnSoldTokens() external onlyOwner{
}
}
| IToken(tokenAddress).transfer(msg.sender,tokens),"Insufficient balance of sale contract!" | 46,946 | IToken(tokenAddress).transfer(msg.sender,tokens) |
"Aloe: Pool already full" | // SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./AloePool.sol";
contract AloePoolCapped is AloePool {
using SafeERC20 for IERC20;
address public immutable MULTISIG;
uint256 public maxTotalSupply;
constructor(address predictions, address multisig) AloePool(predictions) {
}
function deposit(
uint256 amount0Max,
uint256 amount1Max,
uint256 amount0Min,
uint256 amount1Min
)
public
override
lock
returns (
uint256 shares,
uint256 amount0,
uint256 amount1
)
{
(shares, amount0, amount1) = super.deposit(amount0Max, amount1Max, amount0Min, amount1Min);
require(<FILL_ME>)
}
/**
* @notice Removes tokens accidentally sent to this vault.
*/
function sweep(
IERC20 token,
uint256 amount,
address to
) external {
}
/**
* @notice Used to change deposit cap for a guarded launch or to ensure
* vault doesn't grow too large relative to the UNI_POOL. Cap is on total
* supply rather than amounts of TOKEN0 and TOKEN1 as those amounts
* fluctuate naturally over time.
*/
function setMaxTotalSupply(uint256 _maxTotalSupply) external {
}
}
| totalSupply()<=maxTotalSupply,"Aloe: Pool already full" | 46,960 | totalSupply()<=maxTotalSupply |
null | pragma solidity ^0.8.4;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
modifier nonReentrant() {
}
}
interface IERC20{
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);
function _burn(address account, uint256 amount) external;
}
interface swapInterface{
function swap(address addr) external;
function withdraw(uint256 amount) external;
function massSwap(address[] memory users) external;
function balanceOf() external view returns (uint256);
event Swap(address indexed user, uint256 amount);
event MassSwap();
function giveAllowence(address user) external ;
function removeAllowence(address user) external ;
function allowance(address user) external view returns(bool) ;
}
contract swapContract is swapInterface, ReentrancyGuard {
IERC20 oldToken;
IERC20 newToken;
address _owner;
mapping (address => bool) private _allowence;
constructor(address oldOne, address newOne) ReentrancyGuard() {
}
function allowance(address user) external view override returns(bool){
require(<FILL_ME>)
return _allowence[user];
}
function giveAllowence(address user) external override {
}
function removeAllowence(address user) external override {
}
function swap(address addr) external override nonReentrant {
}
function withdraw(uint256 amount) external override {
}
function massSwap(address[] memory users) external override nonReentrant {
}
function balanceOf() external override view returns (uint256) {
}
}
| _allowence[msg.sender] | 47,158 | _allowence[msg.sender] |
"Not auth bot" | pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
import "../../interfaces/Manager.sol";
import "../../interfaces/Vat.sol";
import "../../interfaces/Spotter.sol";
import "../../DS/DSMath.sol";
import "../../auth/AdminAuth.sol";
import "../../loggers/DefisaverLogger.sol";
import "../../utils/GasBurner.sol";
import "../../utils/BotRegistry.sol";
import "../../exchangeV3/DFSExchangeData.sol";
import "./ISubscriptionsV2.sol";
import "./StaticV2.sol";
import "./MCDMonitorProxyV2.sol";
/// @title Implements logic that allows bots to call Boost and Repay
contract MCDMonitorV2 is DSMath, AdminAuth, GasBurner, StaticV2 {
uint public REPAY_GAS_TOKEN = 25;
uint public BOOST_GAS_TOKEN = 25;
uint public MAX_GAS_PRICE = 800000000000; // 800 gwei
uint public REPAY_GAS_COST = 1000000;
uint public BOOST_GAS_COST = 1000000;
bytes4 public REPAY_SELECTOR = 0xf360ce20;
bytes4 public BOOST_SELECTOR = 0x8ec2ae25;
MCDMonitorProxyV2 public monitorProxyContract;
ISubscriptionsV2 public subscriptionsContract;
address public mcdSaverTakerAddress;
address public constant BOT_REGISTRY_ADDRESS = 0x637726f8b08a7ABE3aE3aCaB01A80E2d8ddeF77B;
address public constant PROXY_PERMISSION_ADDR = 0x5a4f877CA808Cca3cB7c2A194F80Ab8588FAE26B;
Manager public manager = Manager(0x5ef30b9986345249bc32d8928B7ee64DE9435E39);
Vat public vat = Vat(0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B);
Spotter public spotter = Spotter(0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3);
DefisaverLogger public constant logger = DefisaverLogger(0x5c55B921f590a89C1Ebe84dF170E655a82b62126);
modifier onlyApproved() {
require(<FILL_ME>)
_;
}
constructor(address _monitorProxy, address _subscriptions, address _mcdSaverTakerAddress) public {
}
/// @notice Bots call this method to repay for user when conditions are met
/// @dev If the contract ownes gas token it will try and use it for gas price reduction
function repayFor(
DFSExchangeData.ExchangeData memory _exchangeData,
uint _cdpId,
uint _nextPrice,
address _joinAddr
) public payable onlyApproved burnGas(REPAY_GAS_TOKEN) {
}
/// @notice Bots call this method to boost for user when conditions are met
/// @dev If the contract ownes gas token it will try and use it for gas price reduction
function boostFor(
DFSExchangeData.ExchangeData memory _exchangeData,
uint _cdpId,
uint _nextPrice,
address _joinAddr
) public payable onlyApproved burnGas(BOOST_GAS_TOKEN) {
}
/******************* INTERNAL METHODS ********************************/
function returnEth() internal {
}
/******************* STATIC METHODS ********************************/
/// @notice Returns an address that owns the CDP
/// @param _cdpId Id of the CDP
function getOwner(uint _cdpId) public view returns(address) {
}
/// @notice Gets CDP info (collateral, debt)
/// @param _cdpId Id of the CDP
/// @param _ilk Ilk of the CDP
function getCdpInfo(uint _cdpId, bytes32 _ilk) public view returns (uint, uint) {
}
/// @notice Gets a price of the asset
/// @param _ilk Ilk of the CDP
function getPrice(bytes32 _ilk) public view returns (uint) {
}
/// @notice Gets CDP ratio
/// @param _cdpId Id of the CDP
/// @param _nextPrice Next price for user
function getRatio(uint _cdpId, uint _nextPrice) public view returns (uint) {
}
/// @notice Checks if Boost/Repay could be triggered for the CDP
/// @dev Called by MCDMonitor to enforce the min/max check
function canCall(Method _method, uint _cdpId, uint _nextPrice) public view returns(bool, uint) {
}
/// @dev After the Boost/Repay check if the ratio doesn't trigger another call
function ratioGoodAfter(Method _method, uint _cdpId, uint _nextPrice) public view returns(bool, uint) {
}
/// @notice Calculates gas cost (in Eth) of tx
/// @dev Gas price is limited to MAX_GAS_PRICE to prevent attack of draining user CDP
/// @param _gasAmount Amount of gas used for the tx
function calcGasCost(uint _gasAmount) public view returns (uint) {
}
/******************* OWNER ONLY OPERATIONS ********************************/
/// @notice Allows owner to change gas cost for boost operation, but only up to 3 millions
/// @param _gasCost New gas cost for boost method
function changeBoostGasCost(uint _gasCost) public onlyOwner {
}
/// @notice Allows owner to change gas cost for repay operation, but only up to 3 millions
/// @param _gasCost New gas cost for repay method
function changeRepayGasCost(uint _gasCost) public onlyOwner {
}
/// @notice Allows owner to change max gas price
/// @param _maxGasPrice New max gas price
function changeMaxGasPrice(uint _maxGasPrice) public onlyOwner {
}
/// @notice Allows owner to change the amount of gas token burned per function call
/// @param _gasAmount Amount of gas token
/// @param _isRepay Flag to know for which function we are setting the gas token amount
function changeGasTokenAmount(uint _gasAmount, bool _isRepay) public onlyOwner {
}
}
| BotRegistry(BOT_REGISTRY_ADDRESS).botList(msg.sender),"Not auth bot" | 47,217 | BotRegistry(BOT_REGISTRY_ADDRESS).botList(msg.sender) |
"Dollar: must have admin role" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "./interfaces/IIncentive.sol";
import "./ERC20Ubiquity.sol";
contract UbiquityAlgorithmicDollar is ERC20Ubiquity {
/// @notice get associated incentive contract, 0 address if N/A
mapping(address => address) public incentiveContract;
event IncentiveContractUpdate(
address indexed _incentivized,
address indexed _incentiveContract
);
constructor(address _manager)
ERC20Ubiquity(_manager, "Ubiquity Algorithmic Dollar", "uAD")
{} // solhint-disable-line no-empty-blocks
/// @param account the account to incentivize
/// @param incentive the associated incentive contract
/// @notice only UAD manager can set Incentive contract
function setIncentiveContract(address account, address incentive) external {
require(<FILL_ME>)
incentiveContract[account] = incentive;
emit IncentiveContractUpdate(account, incentive);
}
function _checkAndApplyIncentives(
address sender,
address recipient,
uint256 amount
) internal {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
}
}
| ERC20Ubiquity.manager.hasRole(ERC20Ubiquity.manager.UBQ_TOKEN_MANAGER_ROLE(),msg.sender),"Dollar: must have admin role" | 47,264 | ERC20Ubiquity.manager.hasRole(ERC20Ubiquity.manager.UBQ_TOKEN_MANAGER_ROLE(),msg.sender) |
"MasterChef: not UBQ manager" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IERC20Ubiquity.sol";
import "./UbiquityAlgorithmicDollarManager.sol";
import "./interfaces/ITWAPOracle.sol";
import "./BondingShareV2.sol";
import "./interfaces/IUbiquityFormulas.sol";
import "./interfaces/IERC1155Ubiquity.sol";
contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of uGOVs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accuGOVPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accuGOVPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
uint256 lastRewardBlock; // Last block number that uGOVs distribution occurs.
uint256 accuGOVPerShare; // Accumulated uGOVs per share, times 1e12. See below.
}
uint256 private _totalShares;
// Ubiquity Manager
UbiquityAlgorithmicDollarManager public manager;
// uGOV tokens created per block.
uint256 public uGOVPerBlock = 1e18;
// Bonus muliplier for early uGOV makers.
uint256 public uGOVmultiplier = 1e18;
uint256 public minPriceDiffToUpdateMultiplier = 1000000000000000;
uint256 public lastPrice = 1 ether;
uint256 public uGOVDivider;
// Info of each pool.
PoolInfo public pool;
// Info of each user that stakes LP tokens.
mapping(uint256 => BondingShareInfo) private _bsInfo;
event Deposit(
address indexed user,
uint256 amount,
uint256 indexed bondingShareId
);
event Withdraw(
address indexed user,
uint256 amount,
uint256 indexed bondingShareId
);
// ----------- Modifiers -----------
modifier onlyTokenManager() {
require(<FILL_ME>)
_;
}
modifier onlyBondingContract() {
}
constructor(address _manager) {
}
function setUGOVPerBlock(uint256 _uGOVPerBlock) external onlyTokenManager {
}
// the bigger uGOVDivider is the less extra Ugov will be minted for the treasury
function setUGOVShareForTreasury(uint256 _uGOVDivider)
external
onlyTokenManager
{
}
function setMinPriceDiffToUpdateMultiplier(
uint256 _minPriceDiffToUpdateMultiplier
) external onlyTokenManager {
}
// Deposit LP tokens to MasterChef for uGOV allocation.
function deposit(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
}
// Withdraw LP tokens from MasterChef.
function withdraw(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
}
/// @dev get pending uGOV rewards from MasterChef.
/// @return amount of pending rewards transfered to msg.sender
/// @notice only send pending rewards
function getRewards(uint256 bondingShareID) external returns (uint256) {
}
// View function to see pending uGOVs on frontend.
function pendingUGOV(uint256 bondingShareID)
external
view
returns (uint256)
{
}
/**
* @dev get the amount of shares and the reward debt of a bonding share .
*/
function getBondingShareInfo(uint256 _id)
external
view
returns (uint256[2] memory)
{
}
/**
* @dev Total amount of shares .
*/
function totalShares() external view virtual returns (uint256) {
}
// UPDATE uGOV multiplier
function _updateUGOVMultiplier() internal {
}
// Update reward variables of the given pool to be up-to-date.
function _updatePool() internal {
}
// Safe uGOV transfer function, just in case if rounding
// error causes pool to not have enough uGOVs.
function _safeUGOVTransfer(address _to, uint256 _amount) internal {
}
function _getMultiplier() internal view returns (uint256) {
}
function _getTwapPrice() internal view returns (uint256) {
}
}
| manager.hasRole(manager.UBQ_TOKEN_MANAGER_ROLE(),msg.sender),"MasterChef: not UBQ manager" | 47,271 | manager.hasRole(manager.UBQ_TOKEN_MANAGER_ROLE(),msg.sender) |
"MS: caller is not owner" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IERC20Ubiquity.sol";
import "./UbiquityAlgorithmicDollarManager.sol";
import "./interfaces/ITWAPOracle.sol";
import "./BondingShareV2.sol";
import "./interfaces/IUbiquityFormulas.sol";
import "./interfaces/IERC1155Ubiquity.sol";
contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of uGOVs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accuGOVPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accuGOVPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
uint256 lastRewardBlock; // Last block number that uGOVs distribution occurs.
uint256 accuGOVPerShare; // Accumulated uGOVs per share, times 1e12. See below.
}
uint256 private _totalShares;
// Ubiquity Manager
UbiquityAlgorithmicDollarManager public manager;
// uGOV tokens created per block.
uint256 public uGOVPerBlock = 1e18;
// Bonus muliplier for early uGOV makers.
uint256 public uGOVmultiplier = 1e18;
uint256 public minPriceDiffToUpdateMultiplier = 1000000000000000;
uint256 public lastPrice = 1 ether;
uint256 public uGOVDivider;
// Info of each pool.
PoolInfo public pool;
// Info of each user that stakes LP tokens.
mapping(uint256 => BondingShareInfo) private _bsInfo;
event Deposit(
address indexed user,
uint256 amount,
uint256 indexed bondingShareId
);
event Withdraw(
address indexed user,
uint256 amount,
uint256 indexed bondingShareId
);
// ----------- Modifiers -----------
modifier onlyTokenManager() {
}
modifier onlyBondingContract() {
}
constructor(address _manager) {
}
function setUGOVPerBlock(uint256 _uGOVPerBlock) external onlyTokenManager {
}
// the bigger uGOVDivider is the less extra Ugov will be minted for the treasury
function setUGOVShareForTreasury(uint256 _uGOVDivider)
external
onlyTokenManager
{
}
function setMinPriceDiffToUpdateMultiplier(
uint256 _minPriceDiffToUpdateMultiplier
) external onlyTokenManager {
}
// Deposit LP tokens to MasterChef for uGOV allocation.
function deposit(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
}
// Withdraw LP tokens from MasterChef.
function withdraw(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
}
/// @dev get pending uGOV rewards from MasterChef.
/// @return amount of pending rewards transfered to msg.sender
/// @notice only send pending rewards
function getRewards(uint256 bondingShareID) external returns (uint256) {
require(<FILL_ME>)
// calculate user reward
BondingShareInfo storage user = _bsInfo[bondingShareID];
_updatePool();
uint256 pending = ((user.amount * pool.accuGOVPerShare) / 1e12) -
user.rewardDebt;
_safeUGOVTransfer(msg.sender, pending);
user.rewardDebt = (user.amount * pool.accuGOVPerShare) / 1e12;
return pending;
}
// View function to see pending uGOVs on frontend.
function pendingUGOV(uint256 bondingShareID)
external
view
returns (uint256)
{
}
/**
* @dev get the amount of shares and the reward debt of a bonding share .
*/
function getBondingShareInfo(uint256 _id)
external
view
returns (uint256[2] memory)
{
}
/**
* @dev Total amount of shares .
*/
function totalShares() external view virtual returns (uint256) {
}
// UPDATE uGOV multiplier
function _updateUGOVMultiplier() internal {
}
// Update reward variables of the given pool to be up-to-date.
function _updatePool() internal {
}
// Safe uGOV transfer function, just in case if rounding
// error causes pool to not have enough uGOVs.
function _safeUGOVTransfer(address _to, uint256 _amount) internal {
}
function _getMultiplier() internal view returns (uint256) {
}
function _getTwapPrice() internal view returns (uint256) {
}
}
| IERC1155Ubiquity(manager.bondingShareAddress()).balanceOf(msg.sender,bondingShareID)==1,"MS: caller is not owner" | 47,271 | IERC1155Ubiquity(manager.bondingShareAddress()).balanceOf(msg.sender,bondingShareID)==1 |
'!ERC2981Royalties:ROYALTIES_CONTRACT_WIDE!' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import './IERC2981Royalties.sol';
/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Royalties is IERC2981Royalties {
struct RoyaltyData {
address recipient;
uint96 amount;
}
// this variable is set to true, whenever "contract wide" royalties are set
// this can not be undone and this takes precedence to any other royalties already set.
bool private _useContractRoyalties;
// those are the "contract wide" royalties, used for collections that all pay royalties to
// the same recipient, with the same value
// once set, like any other royalties, it can not be modified
RoyaltyData private _contractRoyalties;
mapping(uint256 => RoyaltyData) private _royalties;
function hasPerTokenRoyalties() public view returns (bool) {
}
/// @inheritdoc IERC2981Royalties
function royaltyInfo(uint256 tokenId, uint256 value)
public
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
/// @dev Sets token royalties
/// @param id the token id fir which we register the royalties
function _removeRoyalty(uint256 id) internal {
}
/// @dev Sets token royalties
/// @param id the token id for which we register the royalties
/// @param recipient recipient of the royalties
/// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
function _setTokenRoyalty(
uint256 id,
address recipient,
uint256 value
) internal {
// you can't set per token royalties if using "contract wide" ones
require(<FILL_ME>)
require(value <= 10000, '!ERC2981Royalties:TOO_HIGH!');
_royalties[id] = RoyaltyData(recipient, uint96(value));
}
/// @dev Gets token royalties
/// @param id the token id for which we check the royalties
function _getTokenRoyalty(uint256 id)
internal
view
virtual
returns (address, uint256)
{
}
/// @dev set contract royalties;
/// This can only be set once, because we are of the idea that royalties
/// Amounts should never change after they have been set
/// Once default values are set, it will be used for all royalties inquiries
/// @param recipient the default royalties recipient
/// @param value the default royalties value
function _setDefaultRoyalties(address recipient, uint256 value) internal {
}
/// @dev allows to set the default royalties recipient
/// @param recipient the new recipient
function _setDefaultRoyaltiesRecipient(address recipient) internal {
}
/// @dev allows to set a tokenId royalties recipient
/// @param tokenId the token Id
/// @param recipient the new recipient
function _setTokenRoyaltiesRecipient(uint256 tokenId, address recipient)
internal
{
}
}
| !_useContractRoyalties,'!ERC2981Royalties:ROYALTIES_CONTRACT_WIDE!' | 47,313 | !_useContractRoyalties |
"pool exist" | pragma solidity 0.6.12;
contract STokenMaster is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided,LP+SToken*multiplier.
uint256 amountStoken; // How many S tokens the user has provided.
uint256 amountLPtoken; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of SAKEs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accSakePerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws S tokens to a pool. Here's what happens:
// 1. The pool's `accSakePerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
IERC20 sToken; // Address of S token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SAKEs to distribute per block.
uint256 lastRewardBlock; // Last block number that SAKEs distribution occurs.
uint256 accSakePerShare; // Accumulated SAKEs per share, times 1e12. See below.
uint256 burnSakeAmount;
bool withdrawSwitch; // if true,user can withdraw lp,otherwise can not
}
// The SAKE TOKEN!
SakeToken public sake;
address public admin;
// The address to receive LP token fee and S token fee.
address public tokenFeeReceiver;
uint256 public sakePerBlock;
// S token converted to LP token's multiplier
uint256 public multiplierSToken;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when SAKE mining starts.
uint256 public startBlock;
// Block number of distributing bonus SAKE period ends.
uint256 public bonusEndBlock;
// The block number when SAKE mining ends.
uint256 public endBlock;
// bonus block num, about 30 days.
uint256 public constant BONUS_BLOCKNUM = 192000;
// Bonus muliplier.
uint256 public constant BONUS_MULTIPLIER = 2;
// The ratio of withdraw lp fee (1%)
uint8 public feeRatio = 1;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP Tokens and S tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
event Deposit(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event BurnSakeForPool(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
SakeToken _sake,
address _admin,
address _tokenFeeReceiver,
uint256 _multiplierSToken,
uint256 _sakePerBlock,
uint256 _startBlock,
uint256 _endBlock
) public {
}
function poolLength() external view returns (uint256) {
}
function _checkValidity(IERC20 _lpToken, IERC20 _sToken) internal view {
for (uint256 i = 0; i < poolInfo.length; i++) {
require(<FILL_ME>)
}
}
// Add a new lp token and S token to the pool. Can only be called by the admin.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
IERC20 _sToken,
bool _withUpdate
) public {
}
// Update the given pool's SAKE allocation point. Can only be called by the admin.
function set(
uint256 _pid,
uint256 _allocPoint,
bool _withUpdate
) public {
}
// set withdraw switch. Can only be called by the admin.
function setWithdrawSwitch(
uint256 _pid,
bool _withdrawSwitch,
bool _withUpdate
) public {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// View function to see pending SAKEs on frontend.
function pendingSake(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens and S tokens to STokenMaster for SAKE allocation.
function deposit(
uint256 _pid,
uint256 _amountlpToken,
uint256 _amountsToken
) public {
}
// Withdraw LP tokens from STokenMaster.
function withdraw(
uint256 _pid,
uint256 _amountLPtoken,
uint256 _amountStoken
) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe sake transfer function, just in case if rounding error causes pool to not have enough SAKEs.
function _safeSakeTransfer(address _to, uint256 _amount) internal {
}
// Update admin address by owner.
function setAdmin(address _adminaddr) public onlyOwner {
}
// update endBlock by owner
function setEndBlock(uint256 _endBlock) public {
}
// Burn sake increase pool allocpoint
function burnSakeForPool(uint256 _pid, uint256 _amount) public {
}
// set multiplier for S token converted to LP token
function setMultiplierSToken(uint256 _multiplier) public {
}
// set sakePerBlock
function setSakePerBlock(uint256 _sakePerBlock) public {
}
}
| poolInfo[i].lpToken!=_lpToken&&poolInfo[i].sToken!=_sToken,"pool exist" | 47,344 | poolInfo[i].lpToken!=_lpToken&&poolInfo[i].sToken!=_sToken |
"withdraw: not allow" | pragma solidity 0.6.12;
contract STokenMaster is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided,LP+SToken*multiplier.
uint256 amountStoken; // How many S tokens the user has provided.
uint256 amountLPtoken; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of SAKEs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accSakePerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws S tokens to a pool. Here's what happens:
// 1. The pool's `accSakePerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
IERC20 sToken; // Address of S token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SAKEs to distribute per block.
uint256 lastRewardBlock; // Last block number that SAKEs distribution occurs.
uint256 accSakePerShare; // Accumulated SAKEs per share, times 1e12. See below.
uint256 burnSakeAmount;
bool withdrawSwitch; // if true,user can withdraw lp,otherwise can not
}
// The SAKE TOKEN!
SakeToken public sake;
address public admin;
// The address to receive LP token fee and S token fee.
address public tokenFeeReceiver;
uint256 public sakePerBlock;
// S token converted to LP token's multiplier
uint256 public multiplierSToken;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when SAKE mining starts.
uint256 public startBlock;
// Block number of distributing bonus SAKE period ends.
uint256 public bonusEndBlock;
// The block number when SAKE mining ends.
uint256 public endBlock;
// bonus block num, about 30 days.
uint256 public constant BONUS_BLOCKNUM = 192000;
// Bonus muliplier.
uint256 public constant BONUS_MULTIPLIER = 2;
// The ratio of withdraw lp fee (1%)
uint8 public feeRatio = 1;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP Tokens and S tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
event Deposit(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event BurnSakeForPool(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
SakeToken _sake,
address _admin,
address _tokenFeeReceiver,
uint256 _multiplierSToken,
uint256 _sakePerBlock,
uint256 _startBlock,
uint256 _endBlock
) public {
}
function poolLength() external view returns (uint256) {
}
function _checkValidity(IERC20 _lpToken, IERC20 _sToken) internal view {
}
// Add a new lp token and S token to the pool. Can only be called by the admin.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
IERC20 _sToken,
bool _withUpdate
) public {
}
// Update the given pool's SAKE allocation point. Can only be called by the admin.
function set(
uint256 _pid,
uint256 _allocPoint,
bool _withUpdate
) public {
}
// set withdraw switch. Can only be called by the admin.
function setWithdrawSwitch(
uint256 _pid,
bool _withdrawSwitch,
bool _withUpdate
) public {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// View function to see pending SAKEs on frontend.
function pendingSake(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens and S tokens to STokenMaster for SAKE allocation.
function deposit(
uint256 _pid,
uint256 _amountlpToken,
uint256 _amountsToken
) public {
}
// Withdraw LP tokens from STokenMaster.
function withdraw(
uint256 _pid,
uint256 _amountLPtoken,
uint256 _amountStoken
) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(<FILL_ME>)
require(
user.amountLPtoken >= _amountLPtoken && user.amountStoken >= _amountStoken,
"withdraw: amount not enough"
);
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accSakePerShare).div(1e12).sub(user.rewardDebt);
user.amount = user.amount.sub(_amountLPtoken).sub(_amountStoken.mul(multiplierSToken));
user.amountLPtoken = user.amountLPtoken.sub(_amountLPtoken);
user.amountStoken = user.amountStoken.sub(_amountStoken);
user.rewardDebt = user.amount.mul(pool.accSakePerShare).div(1e12);
if (pending > 0) _safeSakeTransfer(msg.sender, pending);
uint256 lpTokenFee = _amountLPtoken.mul(feeRatio).div(100);
uint256 lpTokenToUser = _amountLPtoken.sub(lpTokenFee);
pool.lpToken.safeTransfer(tokenFeeReceiver, lpTokenFee);
pool.lpToken.safeTransfer(address(msg.sender), lpTokenToUser);
uint256 sTokenFee = _amountStoken.mul(feeRatio).div(100);
uint256 sTokenToUser = _amountStoken.sub(sTokenFee);
pool.sToken.safeTransfer(tokenFeeReceiver, sTokenFee);
pool.sToken.safeTransfer(address(msg.sender), sTokenToUser);
emit Withdraw(msg.sender, _pid, lpTokenToUser, sTokenToUser);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe sake transfer function, just in case if rounding error causes pool to not have enough SAKEs.
function _safeSakeTransfer(address _to, uint256 _amount) internal {
}
// Update admin address by owner.
function setAdmin(address _adminaddr) public onlyOwner {
}
// update endBlock by owner
function setEndBlock(uint256 _endBlock) public {
}
// Burn sake increase pool allocpoint
function burnSakeForPool(uint256 _pid, uint256 _amount) public {
}
// set multiplier for S token converted to LP token
function setMultiplierSToken(uint256 _multiplier) public {
}
// set sakePerBlock
function setSakePerBlock(uint256 _sakePerBlock) public {
}
}
| pool.withdrawSwitch,"withdraw: not allow" | 47,344 | pool.withdrawSwitch |
"transfer sake fail" | pragma solidity 0.6.12;
contract STokenMaster is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided,LP+SToken*multiplier.
uint256 amountStoken; // How many S tokens the user has provided.
uint256 amountLPtoken; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of SAKEs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accSakePerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws S tokens to a pool. Here's what happens:
// 1. The pool's `accSakePerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
IERC20 sToken; // Address of S token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SAKEs to distribute per block.
uint256 lastRewardBlock; // Last block number that SAKEs distribution occurs.
uint256 accSakePerShare; // Accumulated SAKEs per share, times 1e12. See below.
uint256 burnSakeAmount;
bool withdrawSwitch; // if true,user can withdraw lp,otherwise can not
}
// The SAKE TOKEN!
SakeToken public sake;
address public admin;
// The address to receive LP token fee and S token fee.
address public tokenFeeReceiver;
uint256 public sakePerBlock;
// S token converted to LP token's multiplier
uint256 public multiplierSToken;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when SAKE mining starts.
uint256 public startBlock;
// Block number of distributing bonus SAKE period ends.
uint256 public bonusEndBlock;
// The block number when SAKE mining ends.
uint256 public endBlock;
// bonus block num, about 30 days.
uint256 public constant BONUS_BLOCKNUM = 192000;
// Bonus muliplier.
uint256 public constant BONUS_MULTIPLIER = 2;
// The ratio of withdraw lp fee (1%)
uint8 public feeRatio = 1;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP Tokens and S tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
event Deposit(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amountLPtoken, uint256 amountStoken);
event BurnSakeForPool(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
SakeToken _sake,
address _admin,
address _tokenFeeReceiver,
uint256 _multiplierSToken,
uint256 _sakePerBlock,
uint256 _startBlock,
uint256 _endBlock
) public {
}
function poolLength() external view returns (uint256) {
}
function _checkValidity(IERC20 _lpToken, IERC20 _sToken) internal view {
}
// Add a new lp token and S token to the pool. Can only be called by the admin.
function add(
uint256 _allocPoint,
IERC20 _lpToken,
IERC20 _sToken,
bool _withUpdate
) public {
}
// Update the given pool's SAKE allocation point. Can only be called by the admin.
function set(
uint256 _pid,
uint256 _allocPoint,
bool _withUpdate
) public {
}
// set withdraw switch. Can only be called by the admin.
function setWithdrawSwitch(
uint256 _pid,
bool _withdrawSwitch,
bool _withUpdate
) public {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// View function to see pending SAKEs on frontend.
function pendingSake(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens and S tokens to STokenMaster for SAKE allocation.
function deposit(
uint256 _pid,
uint256 _amountlpToken,
uint256 _amountsToken
) public {
}
// Withdraw LP tokens from STokenMaster.
function withdraw(
uint256 _pid,
uint256 _amountLPtoken,
uint256 _amountStoken
) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe sake transfer function, just in case if rounding error causes pool to not have enough SAKEs.
function _safeSakeTransfer(address _to, uint256 _amount) internal {
}
// Update admin address by owner.
function setAdmin(address _adminaddr) public onlyOwner {
}
// update endBlock by owner
function setEndBlock(uint256 _endBlock) public {
}
// Burn sake increase pool allocpoint
function burnSakeForPool(uint256 _pid, uint256 _amount) public {
require(_amount > 0, "invalid amount");
require(<FILL_ME>)
PoolInfo storage pool = poolInfo[_pid];
pool.burnSakeAmount = pool.burnSakeAmount.add(_amount);
emit BurnSakeForPool(msg.sender, _pid, _amount);
}
// set multiplier for S token converted to LP token
function setMultiplierSToken(uint256 _multiplier) public {
}
// set sakePerBlock
function setSakePerBlock(uint256 _sakePerBlock) public {
}
}
| sake.transferFrom(msg.sender,address(2),_amount),"transfer sake fail" | 47,344 | sake.transferFrom(msg.sender,address(2),_amount) |
"Invalid dimensions" | // SPDX-License-Identifier: UNLICENSED
// Copyright 2021 Arran Schlosberg / Twitter @divergence_art
// All Rights Reserved
pragma solidity >=0.8.0 <0.9.0;
import "base64-sol/base64.sol";
/**
* @dev 8-bit BMP encoding with arbitrary colour palettes.
*/
contract BMP {
using Base64 for string;
/**
* @dev Returns an 8-bit grayscale palette for bitmap images.
*/
function grayscale() public pure returns (bytes memory) {
}
/**
* @dev Returns an 8-bit BMP encoding of the pixels.
*
* Spec: https://www.digicamsoft.com/bmp/bmp.html
*
* Layout description with offsets:
* http://www.ece.ualberta.ca/~elliott/ee552/studentAppNotes/2003_w/misc/bmp_file_format/bmp_file_format.htm
*
* N.B. Everything is little-endian, hence the assembly for masking and
* shifting.
*/
function bmp(bytes memory pixels, uint32 width, uint32 height, bytes memory palette) public pure returns (bytes memory) {
require(<FILL_ME>)
require(palette.length == 768, "256 colours required");
// 14 bytes for BITMAPFILEHEADER + 40 for BITMAPINFOHEADER + 1024 for palette
bytes memory buf = new bytes(1078);
// BITMAPFILEHEADER
buf[0] = 0x42; buf[1] = 0x4d; // bfType = BM
uint32 size = 1078 + uint32(pixels.length);
// bfSize; bytes in the entire buffer
uint32 b;
for (uint i = 2; i < 6; i++) {
assembly {
b := and(size, 0xff)
size := shr(8, size)
}
buf[i] = bytes1(uint8(b));
}
// Next 4 bytes are bfReserved1 & 2; both = 0 = initial value
// bfOffBits; bytes from beginning of file to pixels = 14 + 40 + 1024
// (see size above)
buf[0x0a] = 0x36;
buf[0x0b] = 0x04;
// BITMAPINFOHEADER
// biSize; bytes in this struct = 40
buf[0x0e] = 0x28;
// biWidth / biHeight
for (uint i = 0x12; i < 0x16; i++) {
assembly {
b := and(width, 0xff)
width := shr(8, width)
}
buf[i] = bytes1(uint8(b));
}
for (uint i = 0x16; i < 0x1a; i++) {
assembly {
b := and(height, 0xff)
height := shr(8, height)
}
buf[i] = bytes1(uint8(b));
}
// biPlanes
buf[0x1a] = 0x01;
// biBitCount
buf[0x1c] = 0x08;
// I've decided to use raw pixels instead of run-length encoding for
// compression as these aren't being stored. It's therefore simpler to
// avoid the extra computation. Therefore biSize can be 0. Similarly
// there's no point checking exactly which colours are used, so
// biClrUsed and biClrImportant can be 0 to indicate all colours. This
// is therefore the end of BITMAPINFOHEADER. Simples.
uint j = 54;
for (uint i = 0; i < 768; i += 3) {
// RGBQUAD is in reverse order and the 4th byte is unused.
buf[j ] = palette[i+2];
buf[j+1] = palette[i+1];
buf[j+2] = palette[i ];
j += 4;
}
return abi.encodePacked(buf, pixels);
}
/**
* @dev Returns the buffer, presumably from bmp(), as a base64 data URI.
*/
function bmpDataURI(bytes memory bmpBuf) public pure returns (string memory) {
}
/**
* @dev Scale pixels by repetition along both axes.
*/
function scalePixels(bytes memory pixels, uint32 width, uint32 height, uint32 scale) public pure returns (bytes memory) {
}
}
| width*height==pixels.length,"Invalid dimensions" | 47,363 | width*height==pixels.length |
null | pragma solidity 0.4.25;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Authorizable
* @dev The Authorizable contract has authorized addresses, and provides basic authorization control
* functions, this simplifies the implementation of "multiple user permissions".
*/
contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
/**
* @dev The Authorizable constructor sets the first `authorized` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the authorized.
*/
modifier onlyAuthorized() {
}
/**
* @dev Allows
* @param _address The address to change authorization.
*/
function authorize(address _address) public onlyOwner {
require(<FILL_ME>)
emit AuthorizationSet(_address, true);
authorized[_address] = true;
}
/**
* @dev Disallows
* @param _address The address to change authorization.
*/
function deauthorize(address _address) public onlyOwner {
}
}
contract ZmineRandom is Authorizable {
uint256 public counter = 0;
mapping(uint256 => uint256) public randomResultMap;
mapping(uint256 => uint256[]) public randomInputMap;
function random(uint256 min, uint256 max, uint256 lotto) public onlyAuthorized {
}
function checkHash(uint256 n) public pure returns (uint256){
}
}
| !authorized[_address] | 47,377 | !authorized[_address] |
null | pragma solidity 0.4.25;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Authorizable
* @dev The Authorizable contract has authorized addresses, and provides basic authorization control
* functions, this simplifies the implementation of "multiple user permissions".
*/
contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
/**
* @dev The Authorizable constructor sets the first `authorized` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the authorized.
*/
modifier onlyAuthorized() {
}
/**
* @dev Allows
* @param _address The address to change authorization.
*/
function authorize(address _address) public onlyOwner {
}
/**
* @dev Disallows
* @param _address The address to change authorization.
*/
function deauthorize(address _address) public onlyOwner {
require(<FILL_ME>)
emit AuthorizationSet(_address, false);
authorized[_address] = false;
}
}
contract ZmineRandom is Authorizable {
uint256 public counter = 0;
mapping(uint256 => uint256) public randomResultMap;
mapping(uint256 => uint256[]) public randomInputMap;
function random(uint256 min, uint256 max, uint256 lotto) public onlyAuthorized {
}
function checkHash(uint256 n) public pure returns (uint256){
}
}
| authorized[_address] | 47,377 | authorized[_address] |
null | /**
*Submitted for verification at Etherscan.io on 2018-07-01
*/
pragma solidity ^0.4.21;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
require(<FILL_ME>)
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title SimpleToken
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
* Note they can later distribute these tokens as they wish using `transfer` and other
* `StandardToken` functions.
*/
contract PtcToken is StandardToken {
string public constant name = "PatEx"; // solium-disable-line uppercase
string public constant symbol = "PTC"; // solium-disable-line uppercase
uint8 public constant decimals = 18; // solium-disable-line uppercase
uint256 public constant INITIAL_SUPPLY = 49*(10 ** 8) * (10 ** uint256(decimals));
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
function PtcToken() public {
}
}
| (_value==0)||allowed[msg.sender][_spender]==0 | 47,382 | (_value==0)||allowed[msg.sender][_spender]==0 |
'Not all tokens minted' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import './ERC721Pausable.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBase.sol';
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄
// ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄
// ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄
// ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██
// ▒██████▒▒░▒███▒█▄ ▒▒█████▓ ░██░░▒████▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██░ ▓██░ ▓█ ▓██▒
// ▒ ▒▓▒ ▒ ░░░ ▒▒░ ▒ ░▒▓▒ ▒ ▒ ░▓ ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░
// ░ ░▒ ░ ░ ░ ▒░ ░ ░░▒░ ░ ░ ▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░
// ░ ░ ░ ░ ░ ░░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
// ░
// Squid game is a smart contract that programs a deflationary NFT, implemented as a game.
// In this game, there will be n rounds and 2**n tokens.
// Each round, a random 50% of the tokens will be burned.
// After the last round, there will be one token remaining, and the owner will be able to
// claim the treasury, which consists of the mint price paid for each token.
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
uint256 public randomResult;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
// Defines the different stages of the game
enum GameState {
PREMINT, // Before the game, when minting is not available yet.
MINTING, // Before the game, when minting is available to the public.
STARTED, // During one of the rounds of the game.
FINISHED // After the game, when there is a winner.
}
// Global vars
bool private _isAdminBurnEnabled = false; // Flag to indicate whether the admin should be able to burn the supply
bool private creatorHasClaimed = false; // Flag to indicate whether the creator has claimed reward
uint256 public currentRound = 0; // Tracks the current round
uint256 public currentBurn = 0; // Tracks the number of burns that have been requested so far
string public baseTokenURI; // Base token URI
address public winnerAddress; // The address of the winner of the game
GameState public gameState; // The current state of the game
// Constants
uint256 public constant NUM_ROUNDS = 7; // Number of rounds this game will last
uint256 public constant MAX_ELEMENTS = 2**NUM_ROUNDS; // Max number of tokens minted
uint256 public constant PRICE = 8 * 10**16; // Price to mint a single token
uint256 public constant MAX_BY_MINT = 5; // Max number of tokens to be minted in a single transaction
uint256 public constant CREATOR_PERCENTAGE = 20; // Percentage given to creators
constructor(string memory baseURI)
ERC721('Squid Arena', 'SQUID')
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator (Kovan)
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Contract Token (Kovan)
)
{
}
modifier saleIsOpen() {
}
function _totalSupply() internal view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
// This is a last resort fail safe function.
// If for any reason the contract doesn't sell out
// or needs to be shutdown. This allows the administrators
// to be able to to withdraw all funds from the contract
// so that it can be disbursed back to the original minters
function pullRug() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function startBurn() public onlyOwner {
if (currentRound == 0) {
require(<FILL_ME>)
}
require(totalSupply() > 1, 'Game finished');
_getRandomNumber();
}
/**
* Claim winner:
* - Requires creatorHasClaimed to be true
* - Requires 1 token to be left
* - Requires creator to have
* - Withdraws the rest of the balance to contract owner
*/
function claimWinnerReward() public {
}
/**
* Claim creator:
* - Requires creatorHasClaimed to be false
* - Withdraws CREATOR_PERCENTAGE / 100 * POT to contract owner
* - Sets creatorHasClaimed to true
*/
function claimCreatorReward() public onlyOwner {
}
/**
* Requests randomness
*/
function _getRandomNumber() internal returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
uint256[] tokensToBurn;
function burnSupply() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| totalSupply()==MAX_ELEMENTS,'Not all tokens minted' | 47,556 | totalSupply()==MAX_ELEMENTS |
'Game finished' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import './ERC721Pausable.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBase.sol';
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄
// ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄
// ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄
// ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██
// ▒██████▒▒░▒███▒█▄ ▒▒█████▓ ░██░░▒████▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██░ ▓██░ ▓█ ▓██▒
// ▒ ▒▓▒ ▒ ░░░ ▒▒░ ▒ ░▒▓▒ ▒ ▒ ░▓ ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░
// ░ ░▒ ░ ░ ░ ▒░ ░ ░░▒░ ░ ░ ▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░
// ░ ░ ░ ░ ░ ░░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
// ░
// Squid game is a smart contract that programs a deflationary NFT, implemented as a game.
// In this game, there will be n rounds and 2**n tokens.
// Each round, a random 50% of the tokens will be burned.
// After the last round, there will be one token remaining, and the owner will be able to
// claim the treasury, which consists of the mint price paid for each token.
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
uint256 public randomResult;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
// Defines the different stages of the game
enum GameState {
PREMINT, // Before the game, when minting is not available yet.
MINTING, // Before the game, when minting is available to the public.
STARTED, // During one of the rounds of the game.
FINISHED // After the game, when there is a winner.
}
// Global vars
bool private _isAdminBurnEnabled = false; // Flag to indicate whether the admin should be able to burn the supply
bool private creatorHasClaimed = false; // Flag to indicate whether the creator has claimed reward
uint256 public currentRound = 0; // Tracks the current round
uint256 public currentBurn = 0; // Tracks the number of burns that have been requested so far
string public baseTokenURI; // Base token URI
address public winnerAddress; // The address of the winner of the game
GameState public gameState; // The current state of the game
// Constants
uint256 public constant NUM_ROUNDS = 7; // Number of rounds this game will last
uint256 public constant MAX_ELEMENTS = 2**NUM_ROUNDS; // Max number of tokens minted
uint256 public constant PRICE = 8 * 10**16; // Price to mint a single token
uint256 public constant MAX_BY_MINT = 5; // Max number of tokens to be minted in a single transaction
uint256 public constant CREATOR_PERCENTAGE = 20; // Percentage given to creators
constructor(string memory baseURI)
ERC721('Squid Arena', 'SQUID')
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator (Kovan)
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Contract Token (Kovan)
)
{
}
modifier saleIsOpen() {
}
function _totalSupply() internal view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
// This is a last resort fail safe function.
// If for any reason the contract doesn't sell out
// or needs to be shutdown. This allows the administrators
// to be able to to withdraw all funds from the contract
// so that it can be disbursed back to the original minters
function pullRug() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function startBurn() public onlyOwner {
if (currentRound == 0) {
require(totalSupply() == MAX_ELEMENTS, 'Not all tokens minted');
}
require(<FILL_ME>)
_getRandomNumber();
}
/**
* Claim winner:
* - Requires creatorHasClaimed to be true
* - Requires 1 token to be left
* - Requires creator to have
* - Withdraws the rest of the balance to contract owner
*/
function claimWinnerReward() public {
}
/**
* Claim creator:
* - Requires creatorHasClaimed to be false
* - Withdraws CREATOR_PERCENTAGE / 100 * POT to contract owner
* - Sets creatorHasClaimed to true
*/
function claimCreatorReward() public onlyOwner {
}
/**
* Requests randomness
*/
function _getRandomNumber() internal returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
uint256[] tokensToBurn;
function burnSupply() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| totalSupply()>1,'Game finished' | 47,556 | totalSupply()>1 |
'Game not finished' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import './ERC721Pausable.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBase.sol';
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄
// ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄
// ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄
// ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██
// ▒██████▒▒░▒███▒█▄ ▒▒█████▓ ░██░░▒████▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██░ ▓██░ ▓█ ▓██▒
// ▒ ▒▓▒ ▒ ░░░ ▒▒░ ▒ ░▒▓▒ ▒ ▒ ░▓ ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░
// ░ ░▒ ░ ░ ░ ▒░ ░ ░░▒░ ░ ░ ▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░
// ░ ░ ░ ░ ░ ░░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
// ░
// Squid game is a smart contract that programs a deflationary NFT, implemented as a game.
// In this game, there will be n rounds and 2**n tokens.
// Each round, a random 50% of the tokens will be burned.
// After the last round, there will be one token remaining, and the owner will be able to
// claim the treasury, which consists of the mint price paid for each token.
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
uint256 public randomResult;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
// Defines the different stages of the game
enum GameState {
PREMINT, // Before the game, when minting is not available yet.
MINTING, // Before the game, when minting is available to the public.
STARTED, // During one of the rounds of the game.
FINISHED // After the game, when there is a winner.
}
// Global vars
bool private _isAdminBurnEnabled = false; // Flag to indicate whether the admin should be able to burn the supply
bool private creatorHasClaimed = false; // Flag to indicate whether the creator has claimed reward
uint256 public currentRound = 0; // Tracks the current round
uint256 public currentBurn = 0; // Tracks the number of burns that have been requested so far
string public baseTokenURI; // Base token URI
address public winnerAddress; // The address of the winner of the game
GameState public gameState; // The current state of the game
// Constants
uint256 public constant NUM_ROUNDS = 7; // Number of rounds this game will last
uint256 public constant MAX_ELEMENTS = 2**NUM_ROUNDS; // Max number of tokens minted
uint256 public constant PRICE = 8 * 10**16; // Price to mint a single token
uint256 public constant MAX_BY_MINT = 5; // Max number of tokens to be minted in a single transaction
uint256 public constant CREATOR_PERCENTAGE = 20; // Percentage given to creators
constructor(string memory baseURI)
ERC721('Squid Arena', 'SQUID')
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator (Kovan)
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Contract Token (Kovan)
)
{
}
modifier saleIsOpen() {
}
function _totalSupply() internal view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
// This is a last resort fail safe function.
// If for any reason the contract doesn't sell out
// or needs to be shutdown. This allows the administrators
// to be able to to withdraw all funds from the contract
// so that it can be disbursed back to the original minters
function pullRug() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function startBurn() public onlyOwner {
}
/**
* Claim winner:
* - Requires creatorHasClaimed to be true
* - Requires 1 token to be left
* - Requires creator to have
* - Withdraws the rest of the balance to contract owner
*/
function claimWinnerReward() public {
require(creatorHasClaimed == true, 'Creator reward not claimed');
require(<FILL_ME>)
require(_msgSender() == winnerAddress, 'Not winner');
_widthdraw(winnerAddress, address(this).balance);
}
/**
* Claim creator:
* - Requires creatorHasClaimed to be false
* - Withdraws CREATOR_PERCENTAGE / 100 * POT to contract owner
* - Sets creatorHasClaimed to true
*/
function claimCreatorReward() public onlyOwner {
}
/**
* Requests randomness
*/
function _getRandomNumber() internal returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
uint256[] tokensToBurn;
function burnSupply() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| totalSupply()==1,'Game not finished' | 47,556 | totalSupply()==1 |
'Not winner' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import './ERC721Pausable.sol';
import '@chainlink/contracts/src/v0.8/VRFConsumerBase.sol';
// ██████ █████ █ ██ ██▓▓█████▄ ▄▄▄ ██▀███ ▓█████ ███▄ █ ▄▄▄
// ▒██ ▒ ▒██▓ ██▒ ██ ▓██▒▓██▒▒██▀ ██▌ ▒████▄ ▓██ ▒ ██▒▓█ ▀ ██ ▀█ █ ▒████▄
// ░ ▓██▄ ▒██▒ ██░▓██ ▒██░▒██▒░██ █▌ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▀█ ██▒▒██ ▀█▄
// ▒ ██▒░██ █▀ ░▓▓█ ░██░░██░░▓█▄ ▌ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▓██▒ ▐▌██▒░██▄▄▄▄██
// ▒██████▒▒░▒███▒█▄ ▒▒█████▓ ░██░░▒████▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██░ ▓██░ ▓█ ▓██▒
// ▒ ▒▓▒ ▒ ░░░ ▒▒░ ▒ ░▒▓▒ ▒ ▒ ░▓ ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░
// ░ ░▒ ░ ░ ░ ▒░ ░ ░░▒░ ░ ░ ▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░
// ░ ░ ░ ░ ░ ░░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒
// ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
// ░
// Squid game is a smart contract that programs a deflationary NFT, implemented as a game.
// In this game, there will be n rounds and 2**n tokens.
// Each round, a random 50% of the tokens will be burned.
// After the last round, there will be one token remaining, and the owner will be able to
// claim the treasury, which consists of the mint price paid for each token.
contract SquidArena is ERC721, ERC721Enumerable, Ownable, ERC721Pausable, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
uint256 public randomResult;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
// Defines the different stages of the game
enum GameState {
PREMINT, // Before the game, when minting is not available yet.
MINTING, // Before the game, when minting is available to the public.
STARTED, // During one of the rounds of the game.
FINISHED // After the game, when there is a winner.
}
// Global vars
bool private _isAdminBurnEnabled = false; // Flag to indicate whether the admin should be able to burn the supply
bool private creatorHasClaimed = false; // Flag to indicate whether the creator has claimed reward
uint256 public currentRound = 0; // Tracks the current round
uint256 public currentBurn = 0; // Tracks the number of burns that have been requested so far
string public baseTokenURI; // Base token URI
address public winnerAddress; // The address of the winner of the game
GameState public gameState; // The current state of the game
// Constants
uint256 public constant NUM_ROUNDS = 7; // Number of rounds this game will last
uint256 public constant MAX_ELEMENTS = 2**NUM_ROUNDS; // Max number of tokens minted
uint256 public constant PRICE = 8 * 10**16; // Price to mint a single token
uint256 public constant MAX_BY_MINT = 5; // Max number of tokens to be minted in a single transaction
uint256 public constant CREATOR_PERCENTAGE = 20; // Percentage given to creators
constructor(string memory baseURI)
ERC721('Squid Arena', 'SQUID')
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator (Kovan)
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Contract Token (Kovan)
)
{
}
modifier saleIsOpen() {
}
function _totalSupply() internal view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
// This is a last resort fail safe function.
// If for any reason the contract doesn't sell out
// or needs to be shutdown. This allows the administrators
// to be able to to withdraw all funds from the contract
// so that it can be disbursed back to the original minters
function pullRug() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function startBurn() public onlyOwner {
}
/**
* Claim winner:
* - Requires creatorHasClaimed to be true
* - Requires 1 token to be left
* - Requires creator to have
* - Withdraws the rest of the balance to contract owner
*/
function claimWinnerReward() public {
require(creatorHasClaimed == true, 'Creator reward not claimed');
require(totalSupply() == 1, 'Game not finished');
require(<FILL_ME>)
_widthdraw(winnerAddress, address(this).balance);
}
/**
* Claim creator:
* - Requires creatorHasClaimed to be false
* - Withdraws CREATOR_PERCENTAGE / 100 * POT to contract owner
* - Sets creatorHasClaimed to true
*/
function claimCreatorReward() public onlyOwner {
}
/**
* Requests randomness
*/
function _getRandomNumber() internal returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
uint256[] tokensToBurn;
function burnSupply() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| _msgSender()==winnerAddress,'Not winner' | 47,556 | _msgSender()==winnerAddress |
"ERROR: max limit reached" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NightKicks is ERC721Enumerable, Ownable, ReentrancyGuard {
IERC721Enumerable MembershipToken;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public maxSupply;
bool public sale;
bool public publicSale;
string public _tokenURI;
uint256 membershipPrice = 0.06 ether;
uint256 publicPrice = 0.08 ether;
address[] artists = [
0x759C4eBeBE5071DB56C78B6c7bae53c15CB2F6D8,
0x3146a2997E71155c144aE25FCE2d866092Bc91F3,
0xCDD99ee657A33b1DA6802F4117D7e5cB2FFA5d79,
0x91F95B32D4D07C80ea796A184745f63d92F743ef,
0x32BE83A8EAb1eFe1bFCE275e4FDef4a2a350eb96,
0x2205D45163F81139fc54a7694B7D809b294b38fF
];
mapping(uint256 => bool) public usedMembershipToken;
event NftBought(address indexed, uint256 memberShipTokenId);
constructor(address _tokenAddress) ERC721("NightKicks", "NK") {
}
function buyWithMembershipToken(uint256 _count, uint256[] memory tokenId)
public
payable
nonReentrant
{
require(<FILL_ME>)
require(
_count <= 10 && tokenId.length <= 10,
"ERROR: max 10 mint per transaction"
);
require(_count == tokenId.length, "ERROR: wrong token ID or count");
require(sale, "ERROR: not on sale");
require(msg.value >= _count * membershipPrice, "ERROR: wrong price");
require(
_count <= MembershipToken.balanceOf(msg.sender),
"ERROR: not enough MembershipToken"
);
for (uint256 i = 0; i < tokenId.length; i++) {
require(
msg.sender == MembershipToken.ownerOf(tokenId[i]),
"ERROR: u don't have this token ID"
);
require(
!usedMembershipToken[tokenId[i]],
"ERROR: this Membership Token is already used"
);
}
for (uint256 j = 0; j < _count; j++) {
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
usedMembershipToken[tokenId[j]] = true;
_safeMint(_msgSender(), newItemId);
emit NftBought(_msgSender(), tokenId[j]);
}
}
function publicMint(uint256 _count) public payable nonReentrant {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function changeTokenUri(string memory _newUri) public onlyOwner {
}
function unLockSale() public onlyOwner {
}
function lockSale() public onlyOwner {
}
function unLockPublicSale() public onlyOwner {
}
function lockPublicSale() public onlyOwner {
}
function changePublicPrice(uint256 _newPrice) public onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function emergencyWithdraw() external onlyOwner nonReentrant {
}
}
| totalSupply()+_count<=maxSupply,"ERROR: max limit reached" | 47,633 | totalSupply()+_count<=maxSupply |
"ERROR: this Membership Token is already used" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NightKicks is ERC721Enumerable, Ownable, ReentrancyGuard {
IERC721Enumerable MembershipToken;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public maxSupply;
bool public sale;
bool public publicSale;
string public _tokenURI;
uint256 membershipPrice = 0.06 ether;
uint256 publicPrice = 0.08 ether;
address[] artists = [
0x759C4eBeBE5071DB56C78B6c7bae53c15CB2F6D8,
0x3146a2997E71155c144aE25FCE2d866092Bc91F3,
0xCDD99ee657A33b1DA6802F4117D7e5cB2FFA5d79,
0x91F95B32D4D07C80ea796A184745f63d92F743ef,
0x32BE83A8EAb1eFe1bFCE275e4FDef4a2a350eb96,
0x2205D45163F81139fc54a7694B7D809b294b38fF
];
mapping(uint256 => bool) public usedMembershipToken;
event NftBought(address indexed, uint256 memberShipTokenId);
constructor(address _tokenAddress) ERC721("NightKicks", "NK") {
}
function buyWithMembershipToken(uint256 _count, uint256[] memory tokenId)
public
payable
nonReentrant
{
require(
totalSupply() + _count <= maxSupply,
"ERROR: max limit reached"
);
require(
_count <= 10 && tokenId.length <= 10,
"ERROR: max 10 mint per transaction"
);
require(_count == tokenId.length, "ERROR: wrong token ID or count");
require(sale, "ERROR: not on sale");
require(msg.value >= _count * membershipPrice, "ERROR: wrong price");
require(
_count <= MembershipToken.balanceOf(msg.sender),
"ERROR: not enough MembershipToken"
);
for (uint256 i = 0; i < tokenId.length; i++) {
require(
msg.sender == MembershipToken.ownerOf(tokenId[i]),
"ERROR: u don't have this token ID"
);
require(<FILL_ME>)
}
for (uint256 j = 0; j < _count; j++) {
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
usedMembershipToken[tokenId[j]] = true;
_safeMint(_msgSender(), newItemId);
emit NftBought(_msgSender(), tokenId[j]);
}
}
function publicMint(uint256 _count) public payable nonReentrant {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function changeTokenUri(string memory _newUri) public onlyOwner {
}
function unLockSale() public onlyOwner {
}
function lockSale() public onlyOwner {
}
function unLockPublicSale() public onlyOwner {
}
function lockPublicSale() public onlyOwner {
}
function changePublicPrice(uint256 _newPrice) public onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function emergencyWithdraw() external onlyOwner nonReentrant {
}
}
| !usedMembershipToken[tokenId[i]],"ERROR: this Membership Token is already used" | 47,633 | !usedMembershipToken[tokenId[i]] |
"Vesting: final time is before current time" | /**
*Submitted for verification at Etherscan.io on 2020-11-10
*/
pragma solidity ^0.6.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() internal {
}
modifier onlyOwner() {
}
function isOwner() public view returns (bool) {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Vesting is Ownable {
using SafeMath for uint;
address public beneficiary;
IERC20 public asset;
uint public startTime;
uint public duration;
uint public released;
bool public revoked;
constructor(
address _beneficiary,
IERC20 _asset,
uint _startTime,
uint _duration
) public {
require(_beneficiary != address(0), "Vesting: _beneficiary is zero address");
require(_asset != IERC20(0), "Vesting: _asset is zero address");
require(<FILL_ME>)
require(_duration > 0, "Vesting: _duration == 0");
beneficiary = _beneficiary;
asset = _asset;
startTime = _startTime;
duration = _duration;
}
function release(uint _amount) external {
}
function revoke() external onlyOwner {
}
function releasableAmount() public view returns (uint) {
}
function vestedAmount() public view returns (uint) {
}
}
| _startTime.add(_duration)>block.timestamp,"Vesting: final time is before current time" | 47,700 | _startTime.add(_duration)>block.timestamp |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
require(<FILL_ME>)
lastPriceUpdate = now;
uint _getprice = CoinMarketCapApi(cmcAddress)._cost();
CoinMarketCapApi(cmcAddress).requestPrice.value(_getprice)(symbol);
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| lastPriceUpdate+1*1days<now | 47,775 | lastPriceUpdate+1*1days<now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
bytes32 _domainBytes = stringToBytes32(_domain);
DomainMeta storage d = domains[_domainBytes];
require(<FILL_ME>)
d.ttl = _ttl;
_status = true;
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| d.admins[d.admin_index][msg.sender]&&_ttl>=1*1hours&&d.expity_time>now | 47,775 | d.admins[d.admin_index][msg.sender]&&_ttl>=1*1hours&&d.expity_time>now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
bytes32 _domainBytes = stringToBytes32(_domain);
DomainMeta storage d = domains[_domainBytes];
require(<FILL_ME>)
d.total_admins = d.total_admins.add(1);
d.admins[d.admin_index][_admin] = true;
_status = true;
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| d.admins[d.admin_index][msg.sender]&&!d.admins[d.admin_index][_admin]&&d.expity_time>now | 47,775 | d.admins[d.admin_index][msg.sender]&&!d.admins[d.admin_index][_admin]&&d.expity_time>now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
bytes32 _domainBytes = stringToBytes32(_domain);
DomainMeta storage d = domains[_domainBytes];
require(<FILL_ME>)
d.total_admins = d.total_admins.sub(1);
d.admins[d.admin_index][_admin] = false;
_status = true;
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| d.admins[d.admin_index][msg.sender]&&d.admins[d.admin_index][_admin]&&d.expity_time>now | 47,775 | d.admins[d.admin_index][msg.sender]&&d.admins[d.admin_index][_admin]&&d.expity_time>now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
bytes32 _domainBytes = stringToBytes32(_domain);
DomainMeta storage d = domains[_domainBytes];
DomainSaleMeta storage ds = domain_sale[_domainBytes];
if(ds.to != address(0x0)){
require( ds.to == msg.sender );
}
require(<FILL_ME>)
balanceOf[msg.sender] = balanceOf[msg.sender].sub(ds.amount);
balanceOf[ds.owner] = balanceOf[ds.owner].add(ds.amount);
uint _adminIndex = d.admin_index + 1;
d.total_admins = 1;
d.admin_index = _adminIndex;
d.admins[_adminIndex][msg.sender] = true;
ds.expity_time = 0;
_status = true;
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| balanceOf[msg.sender]>=ds.amount&&d.expity_time>now&&ds.expity_time>now | 47,775 | balanceOf[msg.sender]>=ds.amount&&d.expity_time>now&&ds.expity_time>now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
bytes32 _domainBytes = stringToBytes32(_domain);
DomainMeta storage d = domains[_domainBytes];
uint256 _cPrice = _currentPrice(publishCost);
require(<FILL_ME>)
debitToken(_cPrice);
d.version++;
for(uint i = 0; i < _file_name.length; i++) {
d.files_hash[d.version][_file_name[i]] = _file_hash[i];
}
d.git = _git;
d.total_files = _file_name.length;
d.hash = _filesHash;
websiteUpdates[websiteUpdatesCounter] = _domain;
websiteUpdatesCounter++;
_status = true;
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| d.admins[d.admin_index][msg.sender]&&balanceOf[msg.sender]>=_cPrice&&_file_name.length<=websiteFilesLimit&&_file_name.length==_file_hash.length&&d.expity_time>now | 47,775 | d.admins[d.admin_index][msg.sender]&&balanceOf[msg.sender]>=_cPrice&&_file_name.length<=websiteFilesLimit&&_file_name.length==_file_hash.length&&d.expity_time>now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
bytes32 hostConn = stringToBytes32(_connection);
HostMeta storage h = hosts[msg.sender];
uint256 _cPrice = _currentPrice(hostRegistryCost);
require(<FILL_ME>)
debitToken(_cPrice);
h.id = totalHosts;
h.connection = hostConn;
h.active = true;
h.time = now;
hostAddress[totalHosts] = msg.sender;
hostConnection[totalHosts] = h.connection;
hostConnectionDB[hostConn] = true;
totalHosts++;
_status = true;
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| !h.active&&balanceOf[msg.sender]>=_cPrice&&!hostConnectionDB[hostConn] | 47,775 | !h.active&&balanceOf[msg.sender]>=_cPrice&&!hostConnectionDB[hostConn] |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
bytes32 hostConn = stringToBytes32(_connection);
HostMeta storage h = hosts[msg.sender];
require(<FILL_ME>)
hostConnectionDB[h.connection] = false;
h.connection = hostConn;
hostConnectionDB[hostConn] = true;
hostUpdates[hostUpdatesCounter] = h.id;
hostConnection[h.id] = hostConn;
hostUpdatesCounter++;
_status = true;
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| h.active&&h.connection!=hostConn&&!hostConnectionDB[hostConn] | 47,775 | h.active&&h.connection!=hostConn&&!hostConnectionDB[hostConn] |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
HostMeta storage h = hosts[msg.sender];
require(<FILL_ME>)
h.active = false;
totalHosts--;
_status = true;
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| h.active | 47,775 | h.active |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
require(<FILL_ME>)
uint _year; uint _month; uint _day;
(_year, _month, _day) = _timestampToDate(now);
HostMeta storage h = hosts[_hostAddress];
require( h.active );
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_amount);
stakeBalance[msg.sender] = stakeBalance[msg.sender].add(_amount);
stakeTmpBalance[_year][_month][msg.sender] = stakeTmpBalance[_year][_month][msg.sender].add(_amount);
stakesLockups[msg.sender] = now + stakeLockTime;
hostStakes[_year][_month][_hostAddress] = hostStakes[_year][_month][_hostAddress].add(_amount);
totalStakes[_year][_month] = totalStakes[_year][_month].add(_amount);
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| balanceOf[msg.sender]>=_amount | 47,775 | balanceOf[msg.sender]>=_amount |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
uint __year; uint __month; uint __day;
(__year, __month, __day) = _timestampToDate(now);
if(__month == 1){ __year--; __month = 12; } else { __month--; }
require(<FILL_ME>)
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| __year*12+__month-_year*12-_month>=0 | 47,775 | __year*12+__month-_year*12-_month>=0 |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
validateMonth(_year, _month);
require(<FILL_ME>)
if(totalStakes[_year][_month] > 0){
uint256 _tmpStake = stakeTmpBalance[_year][_month][msg.sender];
if(_tmpStake > 0){
uint256 _totalStakesBal = stakeBalance[msg.sender];
uint256 _totalStakes = totalStakes[_year][_month];
uint256 _poolAmount = poolBalance[_year][_month];
uint256 _amount = ((_tmpStake.mul(_poolAmount)).mul(50)) / _totalStakes.mul(100);
stakeTmpBalance[_year][_month][msg.sender] = 0;
stakeBalance[msg.sender] = 0;
_amount = _amount.add(_totalStakesBal);
if(_amount > 0){
balanceOf[msg.sender] = balanceOf[msg.sender].add(_amount);
poolBalanceClaimed[_year][_month] = poolBalanceClaimed[_year][_month].add(_amount);
}
}
}
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| stakesLockups[msg.sender]<now | 47,775 | stakesLockups[msg.sender]<now |
null | pragma solidity ^0.4.17;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract CoinMarketCapApi {
function requestPrice(string _ticker) public payable;
function _cost() public returns (uint _price);
}
contract ERC20 {
function transfer(address to, uint tokens) public returns (bool success);
}
contract DateTime {
using SafeMath for uint;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
int constant OFFSET19700101 = 2440588;
function _timestampToDate(uint256 _timestamp) internal pure returns (uint year, uint month, uint day) {
}
function isLeapYear(uint year) internal pure returns (bool) {
}
function getDaysInMonth(uint month, uint year, uint _addMonths) internal pure returns (uint) {
}
function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
}
function addMonth(uint _month, uint _year, uint _add) internal pure returns (uint _nwMonth, uint _nwYear) {
}
}
contract initLib is DateTime {
using SafeMath for uint;
string public symbol = "OWT";
uint256 public decimals = 18;
address public tokenAddress;
uint256 public tokenPrice = 43200;
uint256 public domainCost = 500;
uint256 public publishCost = 200;
uint256 public hostRegistryCost = 1000;
uint256 public userSurfingCost = 10;
uint256 public registryDuration = 365 * 1 days;
uint256 public stakeLockTime = 31 * 1 days;
uint public websiteSizeLimit = 512;
uint public websiteFilesLimit = 20;
address public ow_owner;
address public cmcAddress;
uint public lastPriceUpdate;
mapping ( address => uint256 ) public balanceOf;
mapping ( address => uint256 ) public stakeBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalance;
mapping ( uint => mapping ( uint => uint256 )) public poolBalanceClaimed;
mapping ( uint => mapping ( uint => uint256 )) public totalStakes;
uint256 public totalSubscriber;
uint256 public totalHosts;
uint256 public totalDomains;
mapping ( address => UserMeta ) public users;
mapping ( bytes32 => DomainMeta ) public domains;
mapping ( bytes32 => DomainSaleMeta ) public domain_sale;
mapping ( address => HostMeta ) public hosts;
mapping ( uint => address ) public hostAddress;
mapping ( uint => bytes32 ) public hostConnection;
mapping ( bytes32 => bool ) public hostConnectionDB;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public hostStakes;
mapping ( uint => mapping ( uint => mapping ( address => uint256 ) )) public stakeTmpBalance;
mapping ( address => uint256 ) public stakesLockups;
mapping ( uint => uint ) public hostUpdates;
uint public hostUpdatesCounter;
mapping ( uint => string ) public websiteUpdates;
uint public websiteUpdatesCounter;
struct DomainMeta {
string name;
uint admin_index;
uint total_admins;
mapping(uint => mapping(address => bool)) admins;
string git;
bytes32 domain_bytes;
bytes32 hash;
uint total_files;
uint version;
mapping(uint => mapping(bytes32 => bytes32)) files_hash;
uint ttl;
uint time;
uint expity_time;
}
struct DomainSaleMeta {
address owner;
address to;
uint amount;
uint time;
uint expity_time;
}
struct HostMeta {
uint id;
address hostAddress;
bytes32 connection;
bool active;
uint start_time;
uint time;
}
struct UserMeta {
bool active;
uint start_time;
uint expiry_time;
uint time;
}
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
}
function _currentPrice(uint256 _price) public view returns (uint256 _getprice) {
}
function __response(uint _price) public {
}
function fetchTokenPrice() public payable {
}
function _priceFetchingCost() public view returns (uint _getprice) {
}
function debitToken(uint256 _amount) internal {
}
function creditUserPool(uint _duration, uint256 _price) internal {
}
}
contract owContract is initLib {
function owContract(address _token, address _cmc) public {
}
function _validateDomain(string _domain) internal pure returns (bool){
}
function registerDomain(string _domain, uint _ttl) public returns (bool _status) {
}
function updateDomainTTL(string _domain, uint _ttl) public returns (bool _status) {
}
function renewDomain(string _domain) public returns (bool _status) {
}
function addDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function removeDomainAdmin(string _domain, address _admin) public returns (bool _status) {
}
function sellDomain(
string _domain,
address _owner,
address _to,
uint256 _amount,
uint _expiry
) public returns (bool _status) {
}
function buyDomain(string _domain) public returns (bool _status) {
}
function publishWebsite(
string _domain,
string _git,
bytes32 _filesHash,
bytes32[] _file_name,
bytes32[] _file_hash
) public returns (bool _status) {
}
function getDomainMeta(string _domain) public view
returns (
string _name,
string _git,
bytes32 _domain_bytes,
bytes32 _hash,
uint _total_admins,
uint _adminIndex,
uint _total_files,
uint _version,
uint _ttl,
uint _time,
uint _expity_time
)
{
}
function getDomainFileHash(string _domain, bytes32 _file_name) public view
returns (
bytes32 _hash
)
{
}
function verifyDomainFileHash(string _domain, bytes32 _file_name, bytes32 _file_hash) public view
returns (
bool _status
)
{
}
function registerHost(string _connection) public returns (bool _status) {
}
function updateHost(string _connection) public returns (bool _status) {
}
function deListHost() public returns (bool _status) {
}
function userSubscribe(uint _duration) public {
}
function stakeTokens(address _hostAddress, uint256 _amount) public {
}
function validateMonth(uint _year, uint _month) internal view {
}
function claimHostTokens(uint _year, uint _month) public {
}
function claimStakeTokens(uint _year, uint _month) public {
}
function getHostTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
}
function getStakeTokens(address _address, uint _year, uint _month) public view returns (uint256 _amount) {
validateMonth(_year, _month);
require(<FILL_ME>)
_amount = 0;
if(stakesLockups[_address] < now && totalStakes[_year][_month] > 0){
uint256 _tmpStake = stakeTmpBalance[_year][_month][_address];
if(_tmpStake > 0){
uint256 _totalStakesBal = stakeBalance[_address];
uint256 _totalStakes = totalStakes[_year][_month];
uint256 _poolAmount = poolBalance[_year][_month];
_amount = ((_tmpStake.mul(_poolAmount)).mul(50)) / _totalStakes.mul(100);
_amount = _amount.add(_totalStakesBal);
}
}
}
function burnPoolTokens(uint _year, uint _month) public {
}
function poolDonate(uint _year, uint _month, uint256 _amount) public {
}
function internalTransfer(address _to, uint256 _value) public returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function burn() public {
}
function notifyBalance(address sender, uint tokens) public {
}
function () public payable {}
}
| stakesLockups[_address]<now | 47,775 | stakesLockups[_address]<now |
"Exceeds maximum Qubits supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
uint256 supply = totalSupply();
require( !_paused, "Sale paused" );
require( num < 21, "You can purchase a maximum of 20 Qubits" );
require(<FILL_ME>)
require( msg.value >= _price * num, "Ether sent is not correct" );
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| supply+num<10000-_reserved,"Exceeds maximum Qubits supply" | 47,880 | supply+num<10000-_reserved |
"Exceeds maximum Qubits that can be created" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
require(<FILL_ME>)
require( msg.value >= _qubinatorPrice, "Ether sent is not correct" );
_safeMint( msg.sender, _qubinatorStartCount + 1 );
_qubinatorStartCount = _qubinatorStartCount+1;
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| _qubinatorStartCount+1<15000,"Exceeds maximum Qubits that can be created" | 47,880 | _qubinatorStartCount+1<15000 |
"Qubinator is offline" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require(<FILL_ME>)
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| !_qubinatorPaused,"Qubinator is offline" | 47,880 | !_qubinatorPaused |
"sendQubinator: Qubit 1 does not exist." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(<FILL_ME>)
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| _exists(qubit1),"sendQubinator: Qubit 1 does not exist." | 47,880 | _exists(qubit1) |
"sendQubinator: Qubit 2 does not exist." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(<FILL_ME>)
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| _exists(qubit2),"sendQubinator: Qubit 2 does not exist." | 47,880 | _exists(qubit2) |
"sendQubinator: Qubit 1 caller is not token owner." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(<FILL_ME>)
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| ownerOf(qubit1)==_msgSender(),"sendQubinator: Qubit 1 caller is not token owner." | 47,880 | ownerOf(qubit1)==_msgSender() |
"sendQubinator: Qubit 2 caller is not token owner." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(<FILL_ME>)
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| ownerOf(qubit2)==_msgSender(),"sendQubinator: Qubit 2 caller is not token owner." | 47,880 | ownerOf(qubit2)==_msgSender() |
"Qubit 1 is not unboxed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require(<FILL_ME>)
require( unboxedQubit[qubit2], "Qubit 2 is not unboxed" );
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| unboxedQubit[qubit1],"Qubit 1 is not unboxed" | 47,880 | unboxedQubit[qubit1] |
"Qubit 2 is not unboxed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
require( !_qubinatorPaused, "Qubinator is offline" );
require(_exists(qubit1), "sendQubinator: Qubit 1 does not exist.");
require(_exists(qubit2), "sendQubinator: Qubit 2 does not exist.");
require(ownerOf(qubit1) == _msgSender(), "sendQubinator: Qubit 1 caller is not token owner.");
require(ownerOf(qubit2) == _msgSender(), "sendQubinator: Qubit 2 caller is not token owner.");
require( qubit1 <= 10000, "Qubit 1 is not a genesis Qubit" );
require( qubit2 <= 10000, "Qubit 2 is not a genesis Qubit" );
require( unboxedQubit[qubit1], "Qubit 1 is not unboxed" );
require(<FILL_ME>)
require(qubit1 != qubit2, "Both Qubits can't be the same ");
_burn(qubit1);
_burn(qubit2);
_qubinateProcess();
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| unboxedQubit[qubit2],"Qubit 2 is not unboxed" | 47,880 | unboxedQubit[qubit2] |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _each = address(this).balance / 2;
require(<FILL_ME>)
require(payable(qubinator).send(_each));
}
}
| payable(qubits).send(_each) | 47,880 | payable(qubits).send(_each) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
contract QubitsOnTheIce is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 200;
uint256 private _price = 0.045 ether;
uint256 private _qubinatorPrice = 0.00 ether;
uint256 public _qubinatorStartCount = 10000;
bool public _paused = true;
bool public _qubinatorPaused = true;
mapping(uint256 => bool) private unboxedQubit;
// withdraw addresses
address qubits = 0x054b2d6CaFA4AD47e80c913217304BB9AF29C306;
address qubinator = 0xa70694d21262E20c61436523Ba953604196182dA;
address qubiter = 0x0bF199da987F940563335434e0Fa218b12646255;
// 9999 Qubits in total, might get reduced post the Qubinator
constructor(string memory baseURI) ERC721("Qubits On The Ice", "QOTI") {
}
function purchase(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// Just in case Eth does some crazy stuff
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function setQubinatorPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function getQubinatorPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function unboxQubit(uint256 tokenId, bool val) public {
}
function isUnboxed(uint id) public view returns(bool) {
}
function _qubinateProcess() private {
}
function sendQubinator(uint256 qubit1, uint256 qubit2) public {
}
function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) {
}
function pause(bool val) public onlyOwner {
}
function qubinatorPause(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _each = address(this).balance / 2;
require(payable(qubits).send(_each));
require(<FILL_ME>)
}
}
| payable(qubinator).send(_each) | 47,880 | payable(qubinator).send(_each) |
null | pragma solidity ^0.4.25;
/**
* @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) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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 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);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract GameFanz is IERC20, Owned {
using SafeMath for uint256;
// Constructor - Sets the token Owner
constructor() public {
}
// Events
event Error(string err);
event Mint(uint mintAmount, uint newSupply);
// Token Setup
string public constant name = "GameFanz";
string public constant symbol = "GFN";
uint256 public constant decimals = 8;
uint256 public constant supply = 80000000000 * 10 ** decimals;
address public contractAddress;
mapping (address => bool) public claimed;
// Balances for each account
mapping(address => uint256) _balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) public _allowed;
// Get the total supply of tokens
function totalSupply() public constant returns (uint) {
}
// Get the token balance for account `tokenOwner`
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// Get the allowance of funds beteen a token holder and a spender
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
// Transfer the balance from owner's account to another account
function transfer(address to, uint value) public returns (bool success) {
require(<FILL_ME>)
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(msg.sender, to, value);
return true;
}
// Sets how much a sender is allowed to use of an owners funds
function approve(address spender, uint value) public returns (bool success) {
}
// Transfer from function, pulls from allowance
function transferFrom(address from, address to, uint value) public returns (bool success) {
}
function buyGFN() public payable returns (bool success) {
}
}
| _balances[msg.sender]>=value | 47,923 | _balances[msg.sender]>=value |
null | pragma solidity ^0.4.25;
/**
* @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) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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 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);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract GameFanz is IERC20, Owned {
using SafeMath for uint256;
// Constructor - Sets the token Owner
constructor() public {
}
// Events
event Error(string err);
event Mint(uint mintAmount, uint newSupply);
// Token Setup
string public constant name = "GameFanz";
string public constant symbol = "GFN";
uint256 public constant decimals = 8;
uint256 public constant supply = 80000000000 * 10 ** decimals;
address public contractAddress;
mapping (address => bool) public claimed;
// Balances for each account
mapping(address => uint256) _balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) public _allowed;
// Get the total supply of tokens
function totalSupply() public constant returns (uint) {
}
// Get the token balance for account `tokenOwner`
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// Get the allowance of funds beteen a token holder and a spender
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
// Transfer the balance from owner's account to another account
function transfer(address to, uint value) public returns (bool success) {
}
// Sets how much a sender is allowed to use of an owners funds
function approve(address spender, uint value) public returns (bool success) {
}
// Transfer from function, pulls from allowance
function transferFrom(address from, address to, uint value) public returns (bool success) {
}
function buyGFN() public payable returns (bool success) {
if (msg.value == 0 && claimed[msg.sender] == false) {
require(<FILL_ME>)
_balances[contractAddress] -= 50000 * 10 ** decimals;
_balances[msg.sender] += 50000 * 10 ** decimals;
claimed[msg.sender] = true;
return true;
} else if (msg.value == 0.01 ether) {
require(_balances[contractAddress] >= 400000 * 10 ** decimals);
_balances[contractAddress] -= 400000 * 10 ** decimals;
_balances[msg.sender] += 400000 * 10 ** decimals;
return true;
} else if (msg.value == 0.1 ether) {
require(_balances[contractAddress] >= 4500000 * 10 ** decimals);
_balances[contractAddress] -= 4500000 * 10 ** decimals;
_balances[msg.sender] += 4500000 * 10 ** decimals;
return true;
} else if (msg.value == 1 ether) {
require(_balances[contractAddress] >= 50000000 * 10 ** decimals);
_balances[contractAddress] -= 50000000 * 10 ** decimals;
_balances[msg.sender] += 50000000 * 10 ** decimals;
return true;
} else {
revert();
}
}
}
| _balances[contractAddress]>=50000*10**decimals | 47,923 | _balances[contractAddress]>=50000*10**decimals |
null | pragma solidity ^0.4.25;
/**
* @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) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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 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);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract GameFanz is IERC20, Owned {
using SafeMath for uint256;
// Constructor - Sets the token Owner
constructor() public {
}
// Events
event Error(string err);
event Mint(uint mintAmount, uint newSupply);
// Token Setup
string public constant name = "GameFanz";
string public constant symbol = "GFN";
uint256 public constant decimals = 8;
uint256 public constant supply = 80000000000 * 10 ** decimals;
address public contractAddress;
mapping (address => bool) public claimed;
// Balances for each account
mapping(address => uint256) _balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) public _allowed;
// Get the total supply of tokens
function totalSupply() public constant returns (uint) {
}
// Get the token balance for account `tokenOwner`
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// Get the allowance of funds beteen a token holder and a spender
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
// Transfer the balance from owner's account to another account
function transfer(address to, uint value) public returns (bool success) {
}
// Sets how much a sender is allowed to use of an owners funds
function approve(address spender, uint value) public returns (bool success) {
}
// Transfer from function, pulls from allowance
function transferFrom(address from, address to, uint value) public returns (bool success) {
}
function buyGFN() public payable returns (bool success) {
if (msg.value == 0 && claimed[msg.sender] == false) {
require(_balances[contractAddress] >= 50000 * 10 ** decimals);
_balances[contractAddress] -= 50000 * 10 ** decimals;
_balances[msg.sender] += 50000 * 10 ** decimals;
claimed[msg.sender] = true;
return true;
} else if (msg.value == 0.01 ether) {
require(<FILL_ME>)
_balances[contractAddress] -= 400000 * 10 ** decimals;
_balances[msg.sender] += 400000 * 10 ** decimals;
return true;
} else if (msg.value == 0.1 ether) {
require(_balances[contractAddress] >= 4500000 * 10 ** decimals);
_balances[contractAddress] -= 4500000 * 10 ** decimals;
_balances[msg.sender] += 4500000 * 10 ** decimals;
return true;
} else if (msg.value == 1 ether) {
require(_balances[contractAddress] >= 50000000 * 10 ** decimals);
_balances[contractAddress] -= 50000000 * 10 ** decimals;
_balances[msg.sender] += 50000000 * 10 ** decimals;
return true;
} else {
revert();
}
}
}
| _balances[contractAddress]>=400000*10**decimals | 47,923 | _balances[contractAddress]>=400000*10**decimals |
null | pragma solidity ^0.4.25;
/**
* @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) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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 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);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract GameFanz is IERC20, Owned {
using SafeMath for uint256;
// Constructor - Sets the token Owner
constructor() public {
}
// Events
event Error(string err);
event Mint(uint mintAmount, uint newSupply);
// Token Setup
string public constant name = "GameFanz";
string public constant symbol = "GFN";
uint256 public constant decimals = 8;
uint256 public constant supply = 80000000000 * 10 ** decimals;
address public contractAddress;
mapping (address => bool) public claimed;
// Balances for each account
mapping(address => uint256) _balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) public _allowed;
// Get the total supply of tokens
function totalSupply() public constant returns (uint) {
}
// Get the token balance for account `tokenOwner`
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// Get the allowance of funds beteen a token holder and a spender
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
// Transfer the balance from owner's account to another account
function transfer(address to, uint value) public returns (bool success) {
}
// Sets how much a sender is allowed to use of an owners funds
function approve(address spender, uint value) public returns (bool success) {
}
// Transfer from function, pulls from allowance
function transferFrom(address from, address to, uint value) public returns (bool success) {
}
function buyGFN() public payable returns (bool success) {
if (msg.value == 0 && claimed[msg.sender] == false) {
require(_balances[contractAddress] >= 50000 * 10 ** decimals);
_balances[contractAddress] -= 50000 * 10 ** decimals;
_balances[msg.sender] += 50000 * 10 ** decimals;
claimed[msg.sender] = true;
return true;
} else if (msg.value == 0.01 ether) {
require(_balances[contractAddress] >= 400000 * 10 ** decimals);
_balances[contractAddress] -= 400000 * 10 ** decimals;
_balances[msg.sender] += 400000 * 10 ** decimals;
return true;
} else if (msg.value == 0.1 ether) {
require(<FILL_ME>)
_balances[contractAddress] -= 4500000 * 10 ** decimals;
_balances[msg.sender] += 4500000 * 10 ** decimals;
return true;
} else if (msg.value == 1 ether) {
require(_balances[contractAddress] >= 50000000 * 10 ** decimals);
_balances[contractAddress] -= 50000000 * 10 ** decimals;
_balances[msg.sender] += 50000000 * 10 ** decimals;
return true;
} else {
revert();
}
}
}
| _balances[contractAddress]>=4500000*10**decimals | 47,923 | _balances[contractAddress]>=4500000*10**decimals |
null | pragma solidity ^0.4.25;
/**
* @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) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Owned {
address public owner;
address public newOwner;
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
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 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);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract GameFanz is IERC20, Owned {
using SafeMath for uint256;
// Constructor - Sets the token Owner
constructor() public {
}
// Events
event Error(string err);
event Mint(uint mintAmount, uint newSupply);
// Token Setup
string public constant name = "GameFanz";
string public constant symbol = "GFN";
uint256 public constant decimals = 8;
uint256 public constant supply = 80000000000 * 10 ** decimals;
address public contractAddress;
mapping (address => bool) public claimed;
// Balances for each account
mapping(address => uint256) _balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) public _allowed;
// Get the total supply of tokens
function totalSupply() public constant returns (uint) {
}
// Get the token balance for account `tokenOwner`
function balanceOf(address tokenOwner) public constant returns (uint balance) {
}
// Get the allowance of funds beteen a token holder and a spender
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
}
// Transfer the balance from owner's account to another account
function transfer(address to, uint value) public returns (bool success) {
}
// Sets how much a sender is allowed to use of an owners funds
function approve(address spender, uint value) public returns (bool success) {
}
// Transfer from function, pulls from allowance
function transferFrom(address from, address to, uint value) public returns (bool success) {
}
function buyGFN() public payable returns (bool success) {
if (msg.value == 0 && claimed[msg.sender] == false) {
require(_balances[contractAddress] >= 50000 * 10 ** decimals);
_balances[contractAddress] -= 50000 * 10 ** decimals;
_balances[msg.sender] += 50000 * 10 ** decimals;
claimed[msg.sender] = true;
return true;
} else if (msg.value == 0.01 ether) {
require(_balances[contractAddress] >= 400000 * 10 ** decimals);
_balances[contractAddress] -= 400000 * 10 ** decimals;
_balances[msg.sender] += 400000 * 10 ** decimals;
return true;
} else if (msg.value == 0.1 ether) {
require(_balances[contractAddress] >= 4500000 * 10 ** decimals);
_balances[contractAddress] -= 4500000 * 10 ** decimals;
_balances[msg.sender] += 4500000 * 10 ** decimals;
return true;
} else if (msg.value == 1 ether) {
require(<FILL_ME>)
_balances[contractAddress] -= 50000000 * 10 ** decimals;
_balances[msg.sender] += 50000000 * 10 ** decimals;
return true;
} else {
revert();
}
}
}
| _balances[contractAddress]>=50000000*10**decimals | 47,923 | _balances[contractAddress]>=50000000*10**decimals |
"You do not have permissions for this action" | pragma solidity ^0.6.6;
import "./Context.sol";
// ----------------------------------------------------------------------------
// Permissions contract
// ----------------------------------------------------------------------------
contract Permissions is Context
{
address private _creator;
address private _uniswap;
mapping (address => bool) private _permitted;
constructor() public
{
}
function creator() public view returns (address)
{ }
function uniswap() public view returns (address)
{ }
function givePermissions(address who) internal
{
require(<FILL_ME>)
_permitted[who] = true;
}
modifier onlyCreator
{
}
modifier onlyPermitted
{
}
}
| _msgSender()==_creator||_msgSender()==_uniswap,"You do not have permissions for this action" | 48,114 | _msgSender()==_creator||_msgSender()==_uniswap |
"You do not have permissions for this action" | pragma solidity ^0.6.6;
import "./Context.sol";
// ----------------------------------------------------------------------------
// Permissions contract
// ----------------------------------------------------------------------------
contract Permissions is Context
{
address private _creator;
address private _uniswap;
mapping (address => bool) private _permitted;
constructor() public
{
}
function creator() public view returns (address)
{ }
function uniswap() public view returns (address)
{ }
function givePermissions(address who) internal
{
}
modifier onlyCreator
{
require(<FILL_ME>)
_;
}
modifier onlyPermitted
{
}
}
| _msgSender()==_creator,"You do not have permissions for this action" | 48,114 | _msgSender()==_creator |
null | pragma solidity >=0.7.0 <0.9.0;
contract LongLost is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint8 public publicMintAmount = 20;
uint8 public allowListMintAmount = 5;
bool public paused = true;
bool public isAllowListActive = true;
bool public revealed = false;
bytes32 public whitelistMerkleRoot = 0x0758ddc53129da410a7d4536b32e8f2f00e4edf3568e11b199fdc384d06a55d3;
mapping(address => uint8) private _mintAllowList;
mapping(address => uint8) private _mintPublicList;
constructor() ERC721("Long Lost", "LOST") {
}
// -- compliance checks for tx --
//Checks and records # of mints per wallet address for public.
function setMintList(uint8 _mintAmount) internal {
if(!isAllowListActive) {
require(<FILL_ME>)
_mintPublicList[msg.sender] = _mintPublicList[msg.sender] + _mintAmount;
}
if(isAllowListActive) {
require(_mintAllowList[msg.sender] + _mintAmount <= allowListMintAmount);
_mintAllowList[msg.sender] = _mintAllowList[msg.sender] + _mintAmount;
}
}
//supply limit / tx checks
modifier mintCompliance(uint256 _mintAmount) {
}
//supply check
function totalSupply() public view returns (uint256) {
}
//Contract enablement functions
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
//check minting amounts. Doubles as access check
function remainingAllowListMints(address userAddress) public view returns (uint256) {
}
function remainingPublicMints(address userAddress) public view returns (uint256) {
}
//merkletree
function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner {
}
//public mint function
function mint(uint8 _mintAmount) public payable mintCompliance(_mintAmount) {
}
//allowlist mint function
function mintAllowList(uint8 _mintAmount, bytes32[] calldata proof) public payable mintCompliance(_mintAmount) {
}
//freemint function
function mintForAddress(uint8 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
//safemint function
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| _mintPublicList[msg.sender]+_mintAmount<=publicMintAmount | 48,134 | _mintPublicList[msg.sender]+_mintAmount<=publicMintAmount |
null | pragma solidity >=0.7.0 <0.9.0;
contract LongLost is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint8 public publicMintAmount = 20;
uint8 public allowListMintAmount = 5;
bool public paused = true;
bool public isAllowListActive = true;
bool public revealed = false;
bytes32 public whitelistMerkleRoot = 0x0758ddc53129da410a7d4536b32e8f2f00e4edf3568e11b199fdc384d06a55d3;
mapping(address => uint8) private _mintAllowList;
mapping(address => uint8) private _mintPublicList;
constructor() ERC721("Long Lost", "LOST") {
}
// -- compliance checks for tx --
//Checks and records # of mints per wallet address for public.
function setMintList(uint8 _mintAmount) internal {
if(!isAllowListActive) {
require(_mintPublicList[msg.sender] + _mintAmount <= publicMintAmount);
_mintPublicList[msg.sender] = _mintPublicList[msg.sender] + _mintAmount;
}
if(isAllowListActive) {
require(<FILL_ME>)
_mintAllowList[msg.sender] = _mintAllowList[msg.sender] + _mintAmount;
}
}
//supply limit / tx checks
modifier mintCompliance(uint256 _mintAmount) {
}
//supply check
function totalSupply() public view returns (uint256) {
}
//Contract enablement functions
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
//check minting amounts. Doubles as access check
function remainingAllowListMints(address userAddress) public view returns (uint256) {
}
function remainingPublicMints(address userAddress) public view returns (uint256) {
}
//merkletree
function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner {
}
//public mint function
function mint(uint8 _mintAmount) public payable mintCompliance(_mintAmount) {
}
//allowlist mint function
function mintAllowList(uint8 _mintAmount, bytes32[] calldata proof) public payable mintCompliance(_mintAmount) {
}
//freemint function
function mintForAddress(uint8 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
//safemint function
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| _mintAllowList[msg.sender]+_mintAmount<=allowListMintAmount | 48,134 | _mintAllowList[msg.sender]+_mintAmount<=allowListMintAmount |
"Whitelist is still active" | pragma solidity >=0.7.0 <0.9.0;
contract LongLost is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint8 public publicMintAmount = 20;
uint8 public allowListMintAmount = 5;
bool public paused = true;
bool public isAllowListActive = true;
bool public revealed = false;
bytes32 public whitelistMerkleRoot = 0x0758ddc53129da410a7d4536b32e8f2f00e4edf3568e11b199fdc384d06a55d3;
mapping(address => uint8) private _mintAllowList;
mapping(address => uint8) private _mintPublicList;
constructor() ERC721("Long Lost", "LOST") {
}
// -- compliance checks for tx --
//Checks and records # of mints per wallet address for public.
function setMintList(uint8 _mintAmount) internal {
}
//supply limit / tx checks
modifier mintCompliance(uint256 _mintAmount) {
}
//supply check
function totalSupply() public view returns (uint256) {
}
//Contract enablement functions
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
//check minting amounts. Doubles as access check
function remainingAllowListMints(address userAddress) public view returns (uint256) {
}
function remainingPublicMints(address userAddress) public view returns (uint256) {
}
//merkletree
function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner {
}
//public mint function
function mint(uint8 _mintAmount) public payable mintCompliance(_mintAmount) {
require(!paused, "The contract is paused!");
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "Insufficient funds!");
setMintList(_mintAmount); //compliance check for public minting limits - check minting # per wallet.
_mintLoop(msg.sender, _mintAmount);
}
//allowlist mint function
function mintAllowList(uint8 _mintAmount, bytes32[] calldata proof) public payable mintCompliance(_mintAmount) {
}
//freemint function
function mintForAddress(uint8 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
//safemint function
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !isAllowListActive,"Whitelist is still active" | 48,134 | !isAllowListActive |
"Invalid proof" | pragma solidity >=0.7.0 <0.9.0;
contract LongLost is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = 0.04 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 10;
uint8 public publicMintAmount = 20;
uint8 public allowListMintAmount = 5;
bool public paused = true;
bool public isAllowListActive = true;
bool public revealed = false;
bytes32 public whitelistMerkleRoot = 0x0758ddc53129da410a7d4536b32e8f2f00e4edf3568e11b199fdc384d06a55d3;
mapping(address => uint8) private _mintAllowList;
mapping(address => uint8) private _mintPublicList;
constructor() ERC721("Long Lost", "LOST") {
}
// -- compliance checks for tx --
//Checks and records # of mints per wallet address for public.
function setMintList(uint8 _mintAmount) internal {
}
//supply limit / tx checks
modifier mintCompliance(uint256 _mintAmount) {
}
//supply check
function totalSupply() public view returns (uint256) {
}
//Contract enablement functions
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
//check minting amounts. Doubles as access check
function remainingAllowListMints(address userAddress) public view returns (uint256) {
}
function remainingPublicMints(address userAddress) public view returns (uint256) {
}
//merkletree
function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner {
}
//public mint function
function mint(uint8 _mintAmount) public payable mintCompliance(_mintAmount) {
}
//allowlist mint function
function mintAllowList(uint8 _mintAmount, bytes32[] calldata proof) public payable mintCompliance(_mintAmount) {
require(!paused, "The contract is paused");
require(isAllowListActive, "Whitelist is paused");
require(_mintAmount <= allowListMintAmount);
require(msg.value >= cost * _mintAmount, "Insufficient funds!");
require(<FILL_ME>)
setMintList(_mintAmount);
_mintLoop(msg.sender, _mintAmount);
}
//freemint function
function mintForAddress(uint8 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
//safemint function
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| _verify(_leaf(msg.sender),proof),"Invalid proof" | 48,134 | _verify(_leaf(msg.sender),proof) |
"Must be Admin" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| isAdmin[msg.sender],"Must be Admin" | 48,139 | isAdmin[msg.sender] |
"Must pass address validation" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
require(<FILL_ME>)
require(
weight >= 10 && weight <= 1000,
"Must be greater than 0.1, less than 10"
);
if (!poolWasListed[pool]) {
arrayPerlinPools.push(pool);
}
poolIsListed[pool] = true; // Tracking listing
poolWasListed[pool] = true; // Track if ever was listed
poolWeight[pool] = weight; // Note: weight of 120 = 1.2
mapPool_Asset[pool] = asset; // Map the pool to its non-perl asset
emit NewPool(msg.sender, pool, asset, weight);
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| (asset!=PERL)&&(asset!=address(0))&&(pool!=address(0)),"Must pass address validation" | 48,139 | (asset!=PERL)&&(asset!=address(0))&&(pool!=address(0)) |
"Must pass address validation" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
require(<FILL_ME>)
arrayAdmins.push(newAdmin);
isAdmin[newAdmin] = true;
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| (isAdmin[newAdmin]==false)&&(newAdmin!=address(0)),"Must pass address validation" | 48,139 | (isAdmin[newAdmin]==false)&&(newAdmin!=address(0)) |
"Must be current or previous era only" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
require(rewardAsset != address(0), "Address must not be 0x0");
require(<FILL_ME>)
uint256 amount = ERC20(rewardAsset).balanceOf(address(this)).sub(
mapAsset_Rewards[rewardAsset]
);
require(amount > 0, "Amount must be non-zero");
mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].add(
amount
);
mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset]
.add(amount);
eraIsOpen[era] = true;
updateRewards(era, amount, start, end); // Snapshots PERL balances
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| (era>=currentEra-1)&&(era<=currentEra),"Must be current or previous era only" | 48,139 | (era>=currentEra-1)&&(era<=currentEra) |
"Must transfer" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
uint256 amount = mapEraAsset_Reward[era][rewardAsset];
mapEraAsset_Reward[era][rewardAsset] = 0;
mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub(
amount
);
eraIsOpen[era] = false;
require(<FILL_ME>)
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| ERC20(rewardAsset).transfer(treasury,amount),"Must transfer" | 48,139 | ERC20(rewardAsset).transfer(treasury,amount) |
"Must transfer" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
require(<FILL_ME>)
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| ERC20(asset).transfer(treasury,amount),"Must transfer" | 48,139 | ERC20(asset).transfer(treasury,amount) |
"Must be listed" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
require(<FILL_ME>)
if (!isMember[msg.sender]) {
// Add new member
arrayMembers.push(msg.sender);
isMember[msg.sender] = true;
}
if (!poolHasMembers[pool]) {
// Records existence of member
poolHasMembers[pool] = true;
}
if (!mapMemberPool_Added[msg.sender][pool]) {
// Record all the pools member is in
mapMember_poolCount[msg.sender] = mapMember_poolCount[msg.sender]
.add(1);
mapMember_arrayPools[msg.sender].push(pool);
mapMemberPool_Added[msg.sender][pool] = true;
}
require(
ERC20(pool).transferFrom(msg.sender, address(this), amount),
"Must transfer"
); // Uni/Bal LP tokens return bool
mapMemberPool_Balance[msg.sender][pool] = mapMemberPool_Balance[msg.sender][pool]
.add(amount); // Record total pool balance for member
registerClaim(msg.sender, pool, amount); // Register claim
emit MemberLocks(msg.sender, pool, amount, currentEra);
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| poolIsListed[pool]==true,"Must be listed" | 48,139 | poolIsListed[pool]==true |
"Must transfer" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
require(poolIsListed[pool] == true, "Must be listed");
if (!isMember[msg.sender]) {
// Add new member
arrayMembers.push(msg.sender);
isMember[msg.sender] = true;
}
if (!poolHasMembers[pool]) {
// Records existence of member
poolHasMembers[pool] = true;
}
if (!mapMemberPool_Added[msg.sender][pool]) {
// Record all the pools member is in
mapMember_poolCount[msg.sender] = mapMember_poolCount[msg.sender]
.add(1);
mapMember_arrayPools[msg.sender].push(pool);
mapMemberPool_Added[msg.sender][pool] = true;
}
require(<FILL_ME>)
// Uni/Bal LP tokens return bool
mapMemberPool_Balance[msg.sender][pool] = mapMemberPool_Balance[msg.sender][pool]
.add(amount); // Record total pool balance for member
registerClaim(msg.sender, pool, amount); // Register claim
emit MemberLocks(msg.sender, pool, amount, currentEra);
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| ERC20(pool).transferFrom(msg.sender,address(this),amount),"Must transfer" | 48,139 | ERC20(pool).transferFrom(msg.sender,address(this),amount) |
"Must transfer" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
uint256 balance = mapMemberPool_Balance[msg.sender][pool];
require(balance > 0, "Must have a balance to claim");
mapMemberPool_Balance[msg.sender][pool] = 0; // Zero out balance
require(<FILL_ME>) // Then transfer
if (ERC20(pool).balanceOf(address(this)) == 0) {
poolHasMembers[pool] = false; // If nobody is staking any more
}
emit MemberUnlocks(msg.sender, pool, balance, currentEra);
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| ERC20(pool).transfer(msg.sender,balance),"Must transfer" | 48,139 | ERC20(pool).transfer(msg.sender,balance) |
"Must not have registered in this era already" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
require(<FILL_ME>)
for (uint256 i = 0; i < mapMember_poolCount[member]; i++) {
address pool = mapMember_arrayPools[member][i];
// first deduct any previous claim
mapEraPool_Claims[currentEra][pool] = mapEraPool_Claims[currentEra][pool]
.sub(mapMemberEraPool_Claim[member][currentEra][pool]);
uint256 amount = mapMemberPool_Balance[member][pool]; // then get latest balance
mapMemberEraPool_Claim[member][currentEra][pool] = amount; // then update the claim
mapEraPool_Claims[currentEra][pool] = mapEraPool_Claims[currentEra][pool]
.add(amount); // then add to total
emit MemberRegisters(member, pool, amount, currentEra);
}
mapMemberEra_hasRegistered[msg.sender][currentEra] = true;
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| mapMemberEra_hasRegistered[msg.sender][currentEra]==false,"Must not have registered in this era already" | 48,139 | mapMemberEra_hasRegistered[msg.sender][currentEra]==false |
"Reward asset must not have been claimed" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
require(<FILL_ME>)
require(eraIsOpen[era], "Era must be opened");
uint256 totalClaim = checkClaim(msg.sender, era);
if (totalClaim > 0) {
mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] = true; // Register claim
mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset]
.sub(totalClaim); // Decrease rewards for that era
mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub(
totalClaim
); // Decrease rewards in total
require(
ERC20(rewardAsset).transfer(msg.sender, totalClaim),
"Must transfer"
); // Then transfer
}
emit MemberClaims(msg.sender, era, totalClaim);
if (mapMemberEra_hasRegistered[msg.sender][currentEra] == false) {
registerAllClaims(msg.sender); // Register another claim
}
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset]==false,"Reward asset must not have been claimed" | 48,139 | mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset]==false |
"Era must be opened" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
require(
mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] == false,
"Reward asset must not have been claimed"
);
require(<FILL_ME>)
uint256 totalClaim = checkClaim(msg.sender, era);
if (totalClaim > 0) {
mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] = true; // Register claim
mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset]
.sub(totalClaim); // Decrease rewards for that era
mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub(
totalClaim
); // Decrease rewards in total
require(
ERC20(rewardAsset).transfer(msg.sender, totalClaim),
"Must transfer"
); // Then transfer
}
emit MemberClaims(msg.sender, era, totalClaim);
if (mapMemberEra_hasRegistered[msg.sender][currentEra] == false) {
registerAllClaims(msg.sender); // Register another claim
}
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| eraIsOpen[era],"Era must be opened" | 48,139 | eraIsOpen[era] |
"Must transfer" | //SPDX-License-Identifier: Unlicense
pragma solidity 0.6.8;
// ERC20 Interface
interface ERC20 {
function transfer(address, uint256) external returns (bool);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract PerlinXRewards {
using SafeMath for uint256;
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
address public PERL;
address public treasury;
address[] public arrayAdmins;
address[] public arrayPerlinPools;
address[] public arraySynths;
address[] public arrayMembers;
uint256 public currentEra;
mapping(address => bool) public isAdmin; // Tracks admin status
mapping(address => bool) public poolIsListed; // Tracks current listing status
mapping(address => bool) public poolHasMembers; // Tracks current staking status
mapping(address => bool) public poolWasListed; // Tracks if pool was ever listed
mapping(address => uint256) public mapAsset_Rewards; // Maps rewards for each asset (PERL, BAL, UNI etc)
mapping(address => uint256) public poolWeight; // Allows a reward weight to be applied; 100 = 1.0
mapping(uint256 => uint256) public mapEra_Total; // Total PERL staked in each era
mapping(uint256 => bool) public eraIsOpen; // Era is open of collecting rewards
mapping(uint256 => mapping(address => uint256)) public mapEraAsset_Reward; // Reward allocated for era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Balance; // Perls in each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Share; // Share of reward for each pool, per era
mapping(uint256 => mapping(address => uint256)) public mapEraPool_Claims; // Total LP tokens locked for each pool, per era
mapping(address => address) public mapPool_Asset; // Uniswap pools provide liquidity to non-PERL asset
mapping(address => address) public mapSynth_EMP; // Synthetic Assets have a management contract
mapping(address => bool) public isMember; // Is Member
mapping(address => uint256) public mapMember_poolCount; // Total number of Pools member is in
mapping(address => address[]) public mapMember_arrayPools; // Array of pools for member
mapping(address => mapping(address => uint256))
public mapMemberPool_Balance; // Member's balance in pool
mapping(address => mapping(address => bool)) public mapMemberPool_Added; // Member's balance in pool
mapping(address => mapping(uint256 => bool))
public mapMemberEra_hasRegistered; // Member has registered
mapping(address => mapping(uint256 => mapping(address => uint256)))
public mapMemberEraPool_Claim; // Value of claim per pool, per era
mapping(address => mapping(uint256 => mapping(address => bool)))
public mapMemberEraAsset_hasClaimed; // Boolean claimed
// Events
event Snapshot(
address indexed admin,
uint256 indexed era,
uint256 rewardForEra,
uint256 perlTotal,
uint256 validPoolCount,
uint256 validMemberCount,
uint256 date
);
event NewPool(
address indexed admin,
address indexed pool,
address indexed asset,
uint256 assetWeight
);
event NewSynth(
address indexed pool,
address indexed synth,
address indexed expiringMultiParty
);
event MemberLocks(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberUnlocks(
address indexed member,
address indexed pool,
uint256 balance,
uint256 indexed currentEra
);
event MemberRegisters(
address indexed member,
address indexed pool,
uint256 amount,
uint256 indexed currentEra
);
event MemberClaims(address indexed member, uint256 indexed era, uint256 totalClaim);
// Only Admin can execute
modifier onlyAdmin() {
}
modifier nonReentrant() {
}
constructor() public {
}
//==============================ADMIN================================//
// Lists a synth and its parent EMP address
function listSynth(
address pool,
address synth,
address emp,
uint256 weight
) public onlyAdmin {
}
// Lists a pool and its non-PERL asset (can work for Balance or Uniswap V2)
// Use "100" to be a normal weight of "1.0"
function listPool(
address pool,
address asset,
uint256 weight
) public onlyAdmin {
}
function delistPool(address pool) public onlyAdmin {
}
// Quorum Action 1
function addAdmin(address newAdmin) public onlyAdmin {
}
function transferAdmin(address newAdmin) public onlyAdmin {
}
// Snapshot a new Era, allocating any new rewards found on the address, increment Era
// Admin should send reward funds first
function snapshot(address rewardAsset) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, but don't increment Era (like Balancer Rewards)
// Do this after snapshotPools()
function snapshotInEra(address rewardAsset, uint256 era) public onlyAdmin {
}
// Snapshot with offset (in case runs out of gas)
function snapshotWithOffset(
address rewardAsset,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Snapshot a particular rewwardAsset, with offset
function snapshotInEraWithOffset(
address rewardAsset,
uint256 era,
uint256 start,
uint256 end
) public onlyAdmin {
}
// Note, due to EVM gas limits, poolCount should be less than 100 to do this before running out of gas
function updateRewards(
uint256 era,
uint256 rewardForEra,
uint256 start,
uint256 end
) internal {
}
// Quorum Action
// Remove unclaimed rewards and disable era for claiming
function removeReward(uint256 era, address rewardAsset) public onlyAdmin {
}
// Quorum Action - Reuses adminApproveEraAsset() logic since unlikely to collide
// Use in anger to sweep off assets (such as accidental airdropped tokens)
function sweep(address asset, uint256 amount) public onlyAdmin {
}
//============================== USER - LOCK/UNLOCK ================================//
// Member locks some LP tokens
function lock(address pool, uint256 amount) public nonReentrant {
}
// Member unlocks all from a pool
function unlock(address pool) public nonReentrant {
}
//============================== USER - CLAIM================================//
// Member registers claim in a single pool
function registerClaim(
address member,
address pool,
uint256 amount
) internal {
}
// Member registers claim in all pools
function registerAllClaims(address member) public {
}
// Member claims in a era
function claim(uint256 era, address rewardAsset)
public
nonReentrant
{
require(
mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] == false,
"Reward asset must not have been claimed"
);
require(eraIsOpen[era], "Era must be opened");
uint256 totalClaim = checkClaim(msg.sender, era);
if (totalClaim > 0) {
mapMemberEraAsset_hasClaimed[msg.sender][era][rewardAsset] = true; // Register claim
mapEraAsset_Reward[era][rewardAsset] = mapEraAsset_Reward[era][rewardAsset]
.sub(totalClaim); // Decrease rewards for that era
mapAsset_Rewards[rewardAsset] = mapAsset_Rewards[rewardAsset].sub(
totalClaim
); // Decrease rewards in total
require(<FILL_ME>)
// Then transfer
}
emit MemberClaims(msg.sender, era, totalClaim);
if (mapMemberEra_hasRegistered[msg.sender][currentEra] == false) {
registerAllClaims(msg.sender); // Register another claim
}
}
// Member checks claims in all pools
function checkClaim(address member, uint256 era)
public
view
returns (uint256 totalClaim)
{
}
// Member checks claim in a single pool
function checkClaimInPool(
address member,
uint256 era,
address pool
) public view returns (uint256 claimShare) {
}
//==============================UTILS================================//
// Get the share of a total
function getShare(
uint256 part,
uint256 total,
uint256 amount
) public pure returns (uint256 share) {
}
function adminCount() public view returns (uint256) {
}
function poolCount() public view returns (uint256) {
}
function synthCount() public view returns (uint256) {
}
function memberCount() public view returns (uint256) {
}
}
| ERC20(rewardAsset).transfer(msg.sender,totalClaim),"Must transfer" | 48,139 | ERC20(rewardAsset).transfer(msg.sender,totalClaim) |
null | pragma solidity 0.4.19;
/**
* @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) public 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 SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* 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 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
/**
* @title TokenTimelock
* @dev TokenTimelock is a token holder contract that will allow a
* beneficiary to extract the tokens after a given release time
*/
contract TokenTimelock {
using SafeERC20 for ERC20Basic;
// ERC20 basic token contract being held
ERC20Basic public token;
// beneficiary of tokens after they are released
address public beneficiary;
// timestamp when token release is enabled
uint64 public releaseTime;
function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
}
/**
* @notice Transfers tokens held by timelock to beneficiary.
*/
function release() public {
require(<FILL_ME>)
uint256 amount = token.balanceOf(this);
require(amount > 0);
token.safeTransfer(beneficiary, amount);
}
}
/**
* @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 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
}
contract Owned {
address public owner;
function Owned() public {
}
modifier onlyOwner {
}
}
contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
/// The owner of this address is the HCI Liquidity Fund
address public liquidityFundAddress;
/// This address is used to keep the tokens for bonuses
address public communityTokensAddress;
/// When the sale is closed, no more tokens can be issued
uint64 public tokenSaleClosedTime = 0;
/// Trading opening date deadline (21/Jun/2018)
uint64 private constant date21Jun2018 = 1529517600;
/// Used to look up the locking contract for each locked tokens owner
mapping(address => address) public lockingContractAddresses;
/// Only allowed to execute before the sale is closed
modifier beforeEnd {
}
function HotelCoin(address _liquidityFundAddress, address _communityTokensAddress) public {
}
/// @dev start the trading countdown
function close() public onlyOwner beforeEnd {
}
/// @dev Transfer timelocked tokens; ignores _releaseTime if a timelock exists already
function transferLocking(address _to, uint256 _value, uint64 _releaseTime) public onlyOwner returns (bool) {
}
/// @dev check the locked balance of an owner
function lockedBalanceOf(address _owner) public view returns (uint256) {
}
/// @dev get the TokenTimelock contract address for an owner
function timelockOf(address _owner) public view returns (address) {
}
/// @dev 21 days after the closing of the sale
function tradingOpen() public view returns (bool) {
}
/// @dev Trading limited - requires 3 weeks to have passed since the sale closed
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/// @dev Trading limited - requires 3 weeks to have passed since the sale closed
function transfer(address _to, uint256 _value) public returns (bool) {
}
}
| uint64(block.timestamp)>=releaseTime | 48,149 | uint64(block.timestamp)>=releaseTime |
"only for factories" | contract NFCHEESE is Ownable, ERC721Enumerable, IMintableNft {
uint256 public constant maxMintCount = 150;
uint256 _mintedCount;
mapping(address => bool) public factories; // factories, that can mint tokens
string public baseURI;
string public secretMetaURI =
"ipfs://QmXwum8EBnxYuoxjEpaaqEd6NDWEyseAe16LKTyEW1dQDE";
bool public mintEnable;
constructor() ERC721("NFCHEESE", "NFCHEESE") {}
function setFactory(address addr, bool isFactory) external onlyOwner {
}
/// @dev mint item (only for factories)
/// @param toAddress receiving address
function mint(address toAddress) external override {
require(<FILL_ME>)
require(_mintedCount < maxMintCount, "all tokens are minted");
require(mintEnable, "mint is not enabled");
_mint(toAddress, ++_mintedCount);
}
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
function resetBaseUrl() external onlyOwner {
}
function setSecretMetaURI(string calldata newSecretMetaURI)
external
onlyOwner
{
}
function setMintEnable(bool newMintEnable) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function mintedCount() external view returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| factories[msg.sender],"only for factories" | 48,151 | factories[msg.sender] |
null | // SPDX-License-Identifier: MIT
/*
TG: https://t.me/MetaApeDAO
WEB: https://www.metaapedao.com/
TW: https://twitter.com/MetaApeDAOToken
*/
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract MetaApeDAO is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) public _isExcludedFromSellLock;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
mapping (address => uint) public sellLock;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1e12 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public _reflectionFee = 2;
uint256 public _tokensFee = 10;
uint256 private _swapTokensAt;
uint256 private _maxTokensToSwapForFees;
address payable private _feeAddrWallet1;
address payable private _feeAddrWallet2;
address payable private _liquidityWallet;
string private constant _name = "MetaApeDAO";
string private constant _symbol = "$MAD";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
uint private tradingOpenTime;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxWalletAmount = _tTotal;
event MaxWalletAmountUpdated(uint _maxWalletAmount);
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setSwapTokensAt(uint256 amount) external onlyOwner() {
}
function setMaxTokensToSwapForFees(uint256 amount) external onlyOwner() {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function excludeFromSellLock(address user) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
require(!bots[from] && !bots[to]);
if (
from == uniswapV2Pair &&
to != address(uniswapV2Router) &&
!_isExcludedFromFee[to] &&
cooldownEnabled) {
require(<FILL_ME>)
// Cooldown
require(cooldown[to] < block.timestamp);
cooldown[to] = block.timestamp + (15 seconds);
if(!_isExcludedFromSellLock[to] && sellLock[to] == 0) {
uint elapsed = block.timestamp - tradingOpenTime;
if(elapsed < 30) {
uint256 sellLockDuration = (30 - elapsed) * 240;
sellLock[to] = block.timestamp + sellLockDuration;
}
}
}
else if(!_isExcludedFromSellLock[from]) {
require(sellLock[from] < block.timestamp, "You bought so early! Please wait a bit to sell or transfer.");
}
uint256 swapAmount = balanceOf(address(this));
if(swapAmount > _maxTokensToSwapForFees) {
swapAmount = _maxTokensToSwapForFees;
}
if (swapAmount >= _swapTokensAt &&
!inSwap &&
from != uniswapV2Pair &&
swapEnabled) {
inSwap = true;
uint256 tokensForLiquidity = swapAmount / 10;
swapTokensForEth(swapAmount - tokensForLiquidity);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(contractETHBalance.mul(8).div(9));
contractETHBalance = address(this).balance;
if(contractETHBalance > 0 && tokensForLiquidity > 0) {
addLiquidity(contractETHBalance, tokensForLiquidity);
}
}
inSwap = false;
}
}
_tokenTransfer(from,to,amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function addLiquidity(uint256 value, uint256 tokens) private {
}
function openTrading(address[] memory lockSells, uint duration) external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function removeStrictWalletLimit() public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _getTokenFee() private view returns (uint256) {
}
function _getReflectionFee() private view returns (uint256) {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function manualswap() public {
}
function manualsend() public {
}
function manualswapsend() external {
}
function _getValues(uint256 tAmount, uint256 tokenFee) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| balanceOf(to)+amount<=_maxWalletAmount | 48,224 | balanceOf(to)+amount<=_maxWalletAmount |
Subsets and Splits