comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Cannot initialize more tokens than the max_supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
contract NFT is ERC721URIStorage, Ownable, VRFConsumerBaseV2 {
ERC20 public token;
string public baseUri = "ipfs://QmNPi93oynwoi7NmHmW7ABTgpMfaQtmxKJoxmpXsJHNgGK/";
string public constant uriSuffix = '.json';
uint16 public max_supply = 5000;
uint256 public amountMintPerAccount = 0; // 0 for unlimited
uint256 public price = 1 ether; // 1 $PORK to play
uint16[] private availableTokens;
uint16 private tokensInitializedCount;
address[] private redeemedTokensUser;
uint16[] private redeemedTokensTokenId;
//VRF Chainlink **************************************************************************************
uint64 s_subscriptionId;
VRFCoordinatorV2Interface COORDINATOR;
// address vrfCoordinator = 0x2Ca8E0C643bDe4C2E08ab1fA0da3401AdAD7734D; // goerli - Change this depending current blockchain!
// bytes32 keyHash = 0x79d3d8832d904592c0bf9818b621522c988bb8b0c05cdc3b15aea1b6e8db0c15; // goerli - Change this depending current blockchain!
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; // mainnet - Change this depending current blockchain!
bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; // mainnet - Change this depending current blockchain!
uint32 callbackGasLimit = 200000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256[] public s_randomWords;
uint256 public s_requestId;
address[] private mintersQueue;
event MintRequestSent(address user);
event MintSuccessful(address user, uint256 tokenId);
event Redeem(address user, uint256 tokenId);
constructor(address tokenAddress, uint64 subscriptionId) ERC721("Old Farm Man", "OFM") VRFConsumerBaseV2(vrfCoordinator) {
}
function initializeTokens(uint16 _count) external onlyOwner {
uint16 _tokensInitializedCount = tokensInitializedCount;
require(<FILL_ME>)
uint16 _lastCount = _tokensInitializedCount + _count + 1;
for (uint16 i = _tokensInitializedCount + 1; i < _lastCount;) {
availableTokens.push(i);
unchecked { ++i; }
}
tokensInitializedCount += _count;
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function mint() external {
}
function airdrop(address user, uint256 _tokenId) public onlyOwner {
}
function airdropRandom(address user, uint256 _random) public onlyOwner {
}
function mintRandom(address minter, uint256 _random) private {
}
function redeemAndBurn(uint16 _tokenId) external {
}
function _baseURI() internal view override returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
function getPrice() view public returns(uint) {
}
function setPrice(uint _price) public onlyOwner {
}
function setBaseUri(string calldata _baseUri) public onlyOwner {
}
function setAmountMintPerAccount(uint _amountMintPerAccount) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function requestRandomNumberForTokenId(address _minter) private {
}
// Callback function when random number from Chainlink is generated
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
function getRedeemedTokensUser() public view returns (address[] memory) {
}
function getRedeemedTokensTokenId() public view returns (uint16[] memory) {
}
function getAvailableTokensCount() public view returns (uint256) {
}
function getTokensInitializedCount() public view returns (uint16) {
}
}
| _tokensInitializedCount+_count<=max_supply,"Cannot initialize more tokens than the max_supply" | 266,658 | _tokensInitializedCount+_count<=max_supply |
"Insufficient balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢦⡀⠉⠙⢦⡀⠀⠀⣀⣠⣤⣄⣀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡤⠤⠴⠶⠤⠤⢽⣦⡀⠀⢹⡴⠚⠁⠀⢀⣀⣈⣳⣄⠀⠀
⠀⠀⠀⠀⠀⢠⠞⣁⡤⠴⠶⠶⣦⡄⠀⠀⠀⠀⠀⠀⠀⠶⠿⠭⠤⣄⣈⠙⠳⠀
⠀⠀⠀⠀⢠⡿⠋⠀⠀⢀⡴⠋⠁⠀⣀⡖⠛⢳⠴⠶⡄⠀⠀⠀⠀⠀⠈⠙⢦⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡴⠋⣠⠴⠚⠉⠉⣧⣄⣷⡀⢀⣿⡀⠈⠙⠻⡍⠙⠲⢮⣧
⠀⠀⠀⠀⠀⠀⠀⡞⣠⠞⠁⠀⠀⠀⣰⠃⠀⣸⠉⠉⠀⠙⢦⡀⠀⠸⡄⠀⠈⠟
⠀⠀⠀⠀⠀⠀⢸⠟⠁⠀⠀⠀⠀⢠⠏⠉⢉⡇⠀⠀⠀⠀⠀⠉⠳⣄⢷⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⠤⠤⢼⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡇⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠉⠉⠉⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣀⣀⣀⣻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⣀⡤⠤⠤⣿⠉⠉⠉⠘⣧⠤⢤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⡤⠖⠋⠉⠀⠀⠀⠀⠀⠙⠲⠤⠤⠴⠚⠁⠀⠀⠀⠉⠉⠓⠦⣄⠀⠀⠀
⢀⡞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣄⠀
⠘⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠚⠀
____ _ _ ___
| __ ) / \ | | |_ _|
| _ \ / _ \ | | | |
| |_) / ___ \| |___ | |
|____/_/ \_\_____|___|
Twitter: https://twitter.com/fraudeth_gg
Telegram: http://t.me/fraudportal
Website: https://fraudeth.gg
Docs: https://docs.fraudeth.gg
*/
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./IFraudToken.sol";
contract Bali is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IFraudToken public fraud;
address public lpToken;
bool public emergencyMode = false;
struct UserInfo {
uint256 deposit;
uint256 lockEndedTimestamp;
}
mapping(address => UserInfo) public userInfo;
mapping(address => uint256) public lastClaim;
mapping(address => uint256) public lastDeposit;
uint256 public totalDeposits;
uint256 public totalFraudReward;
// Lock-up period (in seconds)
uint256 public lockupPeriod;
// Timestamp when the contract was deployed
uint256 public contractStartTime;
event Deposit(address indexed user, uint256 amount);
event Withdraw(address indexed user, uint256 amount, uint256 rewards);
event RewardClaimed(address indexed user, uint256 amount);
constructor(
IFraudToken _fraud,
address _lpToken
) {
}
function deposit(uint256 amount) external {
require(amount > 0, "Invalid amount");
require(<FILL_ME>)
require(emergencyMode == false, "Contract is in emergency mode, deposits not allowed");
UserInfo storage user = userInfo[msg.sender];
IERC20(lpToken).transferFrom(msg.sender, address(this), amount);
user.deposit = user.deposit.add(amount);
lastDeposit[msg.sender] = block.timestamp;
user.lockEndedTimestamp = block.timestamp.add(60 hours);
totalDeposits = totalDeposits.add(amount);
emit Deposit(msg.sender, amount);
}
// Withdraw LP tokens and earned APR tokens
function withdraw(uint256 amount) external {
}
function claimReward() public nonReentrant returns(uint256){
}
function pendingReward(address _user) public view returns (uint256) {
}
function calculateReward(address _user) public view returns (uint256) {
}
function setTotalReward(uint256 _amount) external onlyOwner {
}
function toggleEmergency() external onlyOwner {
}
receive() external payable {}
}
| IERC20(lpToken).balanceOf(msg.sender)>=amount,"Insufficient balance" | 266,767 | IERC20(lpToken).balanceOf(msg.sender)>=amount |
"Can only claim once per day" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢦⡀⠉⠙⢦⡀⠀⠀⣀⣠⣤⣄⣀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡤⠤⠴⠶⠤⠤⢽⣦⡀⠀⢹⡴⠚⠁⠀⢀⣀⣈⣳⣄⠀⠀
⠀⠀⠀⠀⠀⢠⠞⣁⡤⠴⠶⠶⣦⡄⠀⠀⠀⠀⠀⠀⠀⠶⠿⠭⠤⣄⣈⠙⠳⠀
⠀⠀⠀⠀⢠⡿⠋⠀⠀⢀⡴⠋⠁⠀⣀⡖⠛⢳⠴⠶⡄⠀⠀⠀⠀⠀⠈⠙⢦⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡴⠋⣠⠴⠚⠉⠉⣧⣄⣷⡀⢀⣿⡀⠈⠙⠻⡍⠙⠲⢮⣧
⠀⠀⠀⠀⠀⠀⠀⡞⣠⠞⠁⠀⠀⠀⣰⠃⠀⣸⠉⠉⠀⠙⢦⡀⠀⠸⡄⠀⠈⠟
⠀⠀⠀⠀⠀⠀⢸⠟⠁⠀⠀⠀⠀⢠⠏⠉⢉⡇⠀⠀⠀⠀⠀⠉⠳⣄⢷⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⠤⠤⢼⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡇⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠉⠉⠉⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣀⣀⣀⣻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⣀⡤⠤⠤⣿⠉⠉⠉⠘⣧⠤⢤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⡤⠖⠋⠉⠀⠀⠀⠀⠀⠙⠲⠤⠤⠴⠚⠁⠀⠀⠀⠉⠉⠓⠦⣄⠀⠀⠀
⢀⡞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣄⠀
⠘⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠚⠀
____ _ _ ___
| __ ) / \ | | |_ _|
| _ \ / _ \ | | | |
| |_) / ___ \| |___ | |
|____/_/ \_\_____|___|
Twitter: https://twitter.com/fraudeth_gg
Telegram: http://t.me/fraudportal
Website: https://fraudeth.gg
Docs: https://docs.fraudeth.gg
*/
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./IFraudToken.sol";
contract Bali is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IFraudToken public fraud;
address public lpToken;
bool public emergencyMode = false;
struct UserInfo {
uint256 deposit;
uint256 lockEndedTimestamp;
}
mapping(address => UserInfo) public userInfo;
mapping(address => uint256) public lastClaim;
mapping(address => uint256) public lastDeposit;
uint256 public totalDeposits;
uint256 public totalFraudReward;
// Lock-up period (in seconds)
uint256 public lockupPeriod;
// Timestamp when the contract was deployed
uint256 public contractStartTime;
event Deposit(address indexed user, uint256 amount);
event Withdraw(address indexed user, uint256 amount, uint256 rewards);
event RewardClaimed(address indexed user, uint256 amount);
constructor(
IFraudToken _fraud,
address _lpToken
) {
}
function deposit(uint256 amount) external {
}
// Withdraw LP tokens and earned APR tokens
function withdraw(uint256 amount) external {
}
function claimReward() public nonReentrant returns(uint256){
require(emergencyMode == false, "Contract is in emergency mode, reward claims not allowed");
uint256 reward = calculateReward(msg.sender);
require(reward > 0, "No reward available");
require(<FILL_ME>)
// require last deposit > 6h ago
require(block.timestamp.sub(lastDeposit[msg.sender]) > 6 hours, "Can only claim if last deposit was more than 6 hours ago");
// decrease the fraud token balance of the contract
// and increase the fraud token balance of the user
fraud.transfer(msg.sender, reward);
lastClaim[msg.sender] = block.timestamp;
totalFraudReward = totalFraudReward.sub(reward);
return reward;
}
function pendingReward(address _user) public view returns (uint256) {
}
function calculateReward(address _user) public view returns (uint256) {
}
function setTotalReward(uint256 _amount) external onlyOwner {
}
function toggleEmergency() external onlyOwner {
}
receive() external payable {}
}
| block.timestamp.sub(lastClaim[msg.sender])>1days,"Can only claim once per day" | 266,767 | block.timestamp.sub(lastClaim[msg.sender])>1days |
"Can only claim if last deposit was more than 6 hours ago" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢦⡀⠉⠙⢦⡀⠀⠀⣀⣠⣤⣄⣀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⡤⠤⠴⠶⠤⠤⢽⣦⡀⠀⢹⡴⠚⠁⠀⢀⣀⣈⣳⣄⠀⠀
⠀⠀⠀⠀⠀⢠⠞⣁⡤⠴⠶⠶⣦⡄⠀⠀⠀⠀⠀⠀⠀⠶⠿⠭⠤⣄⣈⠙⠳⠀
⠀⠀⠀⠀⢠⡿⠋⠀⠀⢀⡴⠋⠁⠀⣀⡖⠛⢳⠴⠶⡄⠀⠀⠀⠀⠀⠈⠙⢦⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡴⠋⣠⠴⠚⠉⠉⣧⣄⣷⡀⢀⣿⡀⠈⠙⠻⡍⠙⠲⢮⣧
⠀⠀⠀⠀⠀⠀⠀⡞⣠⠞⠁⠀⠀⠀⣰⠃⠀⣸⠉⠉⠀⠙⢦⡀⠀⠸⡄⠀⠈⠟
⠀⠀⠀⠀⠀⠀⢸⠟⠁⠀⠀⠀⠀⢠⠏⠉⢉⡇⠀⠀⠀⠀⠀⠉⠳⣄⢷⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⠤⠤⢼⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡇⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠉⠉⠉⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣀⣀⣀⣻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⣀⡤⠤⠤⣿⠉⠉⠉⠘⣧⠤⢤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⡤⠖⠋⠉⠀⠀⠀⠀⠀⠙⠲⠤⠤⠴⠚⠁⠀⠀⠀⠉⠉⠓⠦⣄⠀⠀⠀
⢀⡞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣄⠀
⠘⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠚⠀
____ _ _ ___
| __ ) / \ | | |_ _|
| _ \ / _ \ | | | |
| |_) / ___ \| |___ | |
|____/_/ \_\_____|___|
Twitter: https://twitter.com/fraudeth_gg
Telegram: http://t.me/fraudportal
Website: https://fraudeth.gg
Docs: https://docs.fraudeth.gg
*/
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./IFraudToken.sol";
contract Bali is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IFraudToken public fraud;
address public lpToken;
bool public emergencyMode = false;
struct UserInfo {
uint256 deposit;
uint256 lockEndedTimestamp;
}
mapping(address => UserInfo) public userInfo;
mapping(address => uint256) public lastClaim;
mapping(address => uint256) public lastDeposit;
uint256 public totalDeposits;
uint256 public totalFraudReward;
// Lock-up period (in seconds)
uint256 public lockupPeriod;
// Timestamp when the contract was deployed
uint256 public contractStartTime;
event Deposit(address indexed user, uint256 amount);
event Withdraw(address indexed user, uint256 amount, uint256 rewards);
event RewardClaimed(address indexed user, uint256 amount);
constructor(
IFraudToken _fraud,
address _lpToken
) {
}
function deposit(uint256 amount) external {
}
// Withdraw LP tokens and earned APR tokens
function withdraw(uint256 amount) external {
}
function claimReward() public nonReentrant returns(uint256){
require(emergencyMode == false, "Contract is in emergency mode, reward claims not allowed");
uint256 reward = calculateReward(msg.sender);
require(reward > 0, "No reward available");
require(block.timestamp.sub(lastClaim[msg.sender]) > 1 days, "Can only claim once per day");
// require last deposit > 6h ago
require(<FILL_ME>)
// decrease the fraud token balance of the contract
// and increase the fraud token balance of the user
fraud.transfer(msg.sender, reward);
lastClaim[msg.sender] = block.timestamp;
totalFraudReward = totalFraudReward.sub(reward);
return reward;
}
function pendingReward(address _user) public view returns (uint256) {
}
function calculateReward(address _user) public view returns (uint256) {
}
function setTotalReward(uint256 _amount) external onlyOwner {
}
function toggleEmergency() external onlyOwner {
}
receive() external payable {}
}
| block.timestamp.sub(lastDeposit[msg.sender])>6hours,"Can only claim if last deposit was more than 6 hours ago" | 266,767 | block.timestamp.sub(lastDeposit[msg.sender])>6hours |
"Quantity Exceeds Tokens Available" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SamuraiShonen is ERC721A, Ownable, DefaultOperatorFilterer {
using Strings for uint256;
// Variables
string public uri;
string public prerevealURI= "ipfs://bafkreig72wdwkvdjxbjqkeeszcruv3rewf5m2uocilgcnqztqvaro4kmti";
uint256 public supplyLimit = 1111;
bool internal publicsale = false;
string public _name = "Samurai Shonen";
string public _symbol = "SS";
bool public unreveal = false;
// Constructor
constructor(address _address, uint256 quantity
) ERC721A(_name, _symbol) {
}
// Mint Functions
function OwnerMint(address addresses, uint256 _amount ) public onlyOwner {
require(<FILL_ME>)
_safeMint(addresses, _amount);
}
function mint(address _address, string memory signature) public payable {
}
// Set Functions
function reveal() public onlyOwner{
}
// uri
function seturi(string memory _uri) public onlyOwner {
}
function setsale() public onlyOwner{
}
// Withdraw Function
function withdraw() public onlyOwner {
}
// Read Functions
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
}
| _amount+totalSupply()<=supplyLimit,"Quantity Exceeds Tokens Available" | 266,829 | _amount+totalSupply()<=supplyLimit |
"Already minted" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SamuraiShonen is ERC721A, Ownable, DefaultOperatorFilterer {
using Strings for uint256;
// Variables
string public uri;
string public prerevealURI= "ipfs://bafkreig72wdwkvdjxbjqkeeszcruv3rewf5m2uocilgcnqztqvaro4kmti";
uint256 public supplyLimit = 1111;
bool internal publicsale = false;
string public _name = "Samurai Shonen";
string public _symbol = "SS";
bool public unreveal = false;
// Constructor
constructor(address _address, uint256 quantity
) ERC721A(_name, _symbol) {
}
// Mint Functions
function OwnerMint(address addresses, uint256 _amount ) public onlyOwner {
}
function mint(address _address, string memory signature) public payable {
require(<FILL_ME>)
require(publicsale==true, "Mint hasn't begun");
require(totalSupply()+1<=supplyLimit,"Out of stock");
{
_safeMint(_address,1);
}
}
// Set Functions
function reveal() public onlyOwner{
}
// uri
function seturi(string memory _uri) public onlyOwner {
}
function setsale() public onlyOwner{
}
// Withdraw Function
function withdraw() public onlyOwner {
}
// Read Functions
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
}
}
| balanceOf(_address)==0,"Already minted" | 266,829 | balanceOf(_address)==0 |
"CCTP: Not enough fee" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IGasOracle} from "./interfaces/IGasOracle.sol";
import {ITokenMessenger} from "./interfaces/cctp/ITokenMessenger.sol";
import {IMessageTransmitter} from "./interfaces/cctp/IMessageTransmitter.sol";
import {GasUsage} from "./GasUsage.sol";
contract CctpBridge is GasUsage {
using SafeERC20 for IERC20Metadata;
uint internal constant ORACLE_PRECISION = 18;
uint internal constant BP = 1e4;
uint public immutable chainId;
// Admin fee share (in basis points)
uint public adminFeeShareBP;
IERC20Metadata private immutable token;
ITokenMessenger private immutable cctpMessenger;
IMessageTransmitter private immutable cctpTransmitter;
// precomputed value of the scaling factor required for converting the stable token to gas amount
uint private immutable stableTokensForGasScalingFactor;
// precomputed value to divide by to change the precision from the Gas Oracle precision to the stable token precision
uint private immutable fromGasOracleScalingFactor;
mapping(uint chainId => uint domainNumber) private chainIdDomainMap;
/**
* @notice Emitted when the contract receives some gas directly.
*/
event ReceivedGas(address sender, uint amount);
/**
* @notice Emitted when the contract sends some extra gas to the recipient of tokens.
*/
event ReceivedExtraGas(address recipient, uint amount);
/**
* @notice Emitted when tokens are sent on the source blockchain.
*/
event TokensSent(
uint amount,
address sender,
bytes32 recipient,
uint destinationChainId,
uint nonce,
uint receivedRelayerFeeFromGas,
uint receivedRelayerFeeFromTokens,
uint relayerFee,
uint receivedRelayerFeeTokenAmount,
uint adminFeeTokenAmount
);
constructor(
uint chainId_,
uint chainPrecision_,
address tokenAddress,
address cctpMessenger_,
address cctpTransmitter_,
IGasOracle gasOracle_
) GasUsage(gasOracle_) {
}
/**
* @notice Initiates a bridging process of the token to another blockchain.
* @dev This function is used to initiate a cross-chain transfer.
* The bridging fee required for the cross-chain transfer can be paid in two ways:
* - by sending the required amount of native gas token along with the transaction
* (See `getTransactionCost` in the `GasUsage` contract).
* - by setting the parameter `relayerFeeTokenAmount` with the amount of bridging fee in tokens
* (See the function `getBridgingCostInTokens`).
* @param amount The amount of tokens to send (including `relayerFeeTokenAmount`).
* @param recipient The recipient address.
* @param destinationChainId The ID of the destination chain.
* @param relayerFeeTokenAmount The amount of tokens to be deducted from the transferred amount as a bridging fee.
*/
function bridge(
uint amount,
bytes32 recipient,
uint destinationChainId,
uint relayerFeeTokenAmount
) external payable {
require(amount > relayerFeeTokenAmount, "CCTP: Amount <= relayer fee");
require(recipient != 0, "CCTP: Recipient must be nonzero");
token.safeTransferFrom(msg.sender, address(this), amount);
uint gasFromStables = _getStableTokensValueInGas(relayerFeeTokenAmount);
uint relayerFee = this.getTransactionCost(destinationChainId);
require(<FILL_ME>)
uint amountToSend = amount - relayerFeeTokenAmount;
uint adminFee;
if (adminFeeShareBP != 0) {
adminFee = (amountToSend * adminFeeShareBP) / BP;
if (adminFee == 0) {
adminFee = 1;
}
amountToSend -= adminFee;
}
uint32 destinationDomain = getDomainByChainId(destinationChainId);
uint64 nonce = cctpMessenger.depositForBurn(amountToSend, destinationDomain, recipient, address(token));
emit TokensSent(
amountToSend,
msg.sender,
recipient,
destinationChainId,
nonce,
msg.value,
gasFromStables,
relayerFee,
relayerFeeTokenAmount,
adminFee
);
}
/**
* @notice Completes the bridging process by sending the tokens on the destination blockchain to the recipient.
* @param recipient The recipient address.
* @param message The message information emitted by the CCTP contract `MessageTransmitter` on the source chain.
* @param signature Concatenated 65-byte signature(s) of `message`.
*/
function receiveTokens(address recipient, bytes calldata message, bytes calldata signature) external payable {
}
/**
* @notice Allows the admin to add new supported chain destination.
* @param chainId_ The chain ID of the destination to register.
* @param domain The domain of the destination to register.
*/
function registerBridgeDestination(uint chainId_, uint32 domain) external onlyOwner {
}
/**
* @notice Allows the admin to remove a chain from the map of supported destinations.
* @param chainId_ The chain ID of the destination to unregister.
*/
function unregisterBridgeDestination(uint chainId_) external onlyOwner {
}
/**
* @notice Allows the admin to withdraw the relayer fee collected in gas tokens.
*/
function withdrawGas(uint amount) external onlyOwner {
}
/**
* @notice Allows the admin to withdraw the admin fee and relayer fee collected in tokens.
*/
function withdrawFeeInTokens() external onlyOwner {
}
/**
* @notice Sets the basis points of the admin fee share from each bridge.
*/
function setAdminFeeShare(uint adminFeeShareBP_) external onlyOwner {
}
/**
* @notice Calculates the amount of bridging fee nominated in the stable token.
* @param destinationChainId The ID of the destination chain.
* @return The total price of bridging, with the precision according to the token's `decimals()` value.
*/
function getBridgingCostInTokens(uint destinationChainId) external view returns (uint) {
}
function isMessageProcessed(uint sourceChainId, uint64 nonce) external view returns (bool) {
}
function getDomainByChainId(uint chainId_) public view returns (uint32) {
}
/**
* @notice Calculates the amount of gas equivalent in value to provided amount of tokens
* according to the current exchange rate.
* @param stableTokenAmount The amount of tokens.
* @return amount of gas tokens.
*/
function _getStableTokensValueInGas(uint stableTokenAmount) internal view returns (uint) {
}
function _hashSourceAndNonce(uint32 sourceDomain, uint64 nonce) internal pure returns (bytes32) {
}
fallback() external payable {
}
receive() external payable {
}
}
| msg.value+gasFromStables>=relayerFee,"CCTP: Not enough fee" | 266,917 | msg.value+gasFromStables>=relayerFee |
"CCTP: Receive message failed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IGasOracle} from "./interfaces/IGasOracle.sol";
import {ITokenMessenger} from "./interfaces/cctp/ITokenMessenger.sol";
import {IMessageTransmitter} from "./interfaces/cctp/IMessageTransmitter.sol";
import {GasUsage} from "./GasUsage.sol";
contract CctpBridge is GasUsage {
using SafeERC20 for IERC20Metadata;
uint internal constant ORACLE_PRECISION = 18;
uint internal constant BP = 1e4;
uint public immutable chainId;
// Admin fee share (in basis points)
uint public adminFeeShareBP;
IERC20Metadata private immutable token;
ITokenMessenger private immutable cctpMessenger;
IMessageTransmitter private immutable cctpTransmitter;
// precomputed value of the scaling factor required for converting the stable token to gas amount
uint private immutable stableTokensForGasScalingFactor;
// precomputed value to divide by to change the precision from the Gas Oracle precision to the stable token precision
uint private immutable fromGasOracleScalingFactor;
mapping(uint chainId => uint domainNumber) private chainIdDomainMap;
/**
* @notice Emitted when the contract receives some gas directly.
*/
event ReceivedGas(address sender, uint amount);
/**
* @notice Emitted when the contract sends some extra gas to the recipient of tokens.
*/
event ReceivedExtraGas(address recipient, uint amount);
/**
* @notice Emitted when tokens are sent on the source blockchain.
*/
event TokensSent(
uint amount,
address sender,
bytes32 recipient,
uint destinationChainId,
uint nonce,
uint receivedRelayerFeeFromGas,
uint receivedRelayerFeeFromTokens,
uint relayerFee,
uint receivedRelayerFeeTokenAmount,
uint adminFeeTokenAmount
);
constructor(
uint chainId_,
uint chainPrecision_,
address tokenAddress,
address cctpMessenger_,
address cctpTransmitter_,
IGasOracle gasOracle_
) GasUsage(gasOracle_) {
}
/**
* @notice Initiates a bridging process of the token to another blockchain.
* @dev This function is used to initiate a cross-chain transfer.
* The bridging fee required for the cross-chain transfer can be paid in two ways:
* - by sending the required amount of native gas token along with the transaction
* (See `getTransactionCost` in the `GasUsage` contract).
* - by setting the parameter `relayerFeeTokenAmount` with the amount of bridging fee in tokens
* (See the function `getBridgingCostInTokens`).
* @param amount The amount of tokens to send (including `relayerFeeTokenAmount`).
* @param recipient The recipient address.
* @param destinationChainId The ID of the destination chain.
* @param relayerFeeTokenAmount The amount of tokens to be deducted from the transferred amount as a bridging fee.
*/
function bridge(
uint amount,
bytes32 recipient,
uint destinationChainId,
uint relayerFeeTokenAmount
) external payable {
}
/**
* @notice Completes the bridging process by sending the tokens on the destination blockchain to the recipient.
* @param recipient The recipient address.
* @param message The message information emitted by the CCTP contract `MessageTransmitter` on the source chain.
* @param signature Concatenated 65-byte signature(s) of `message`.
*/
function receiveTokens(address recipient, bytes calldata message, bytes calldata signature) external payable {
require(<FILL_ME>)
// pass extra gas to the recipient
if (msg.value > 0) {
(bool sent, ) = payable(recipient).call{value: msg.value}("");
if (sent) {
emit ReceivedExtraGas(recipient, msg.value);
}
}
}
/**
* @notice Allows the admin to add new supported chain destination.
* @param chainId_ The chain ID of the destination to register.
* @param domain The domain of the destination to register.
*/
function registerBridgeDestination(uint chainId_, uint32 domain) external onlyOwner {
}
/**
* @notice Allows the admin to remove a chain from the map of supported destinations.
* @param chainId_ The chain ID of the destination to unregister.
*/
function unregisterBridgeDestination(uint chainId_) external onlyOwner {
}
/**
* @notice Allows the admin to withdraw the relayer fee collected in gas tokens.
*/
function withdrawGas(uint amount) external onlyOwner {
}
/**
* @notice Allows the admin to withdraw the admin fee and relayer fee collected in tokens.
*/
function withdrawFeeInTokens() external onlyOwner {
}
/**
* @notice Sets the basis points of the admin fee share from each bridge.
*/
function setAdminFeeShare(uint adminFeeShareBP_) external onlyOwner {
}
/**
* @notice Calculates the amount of bridging fee nominated in the stable token.
* @param destinationChainId The ID of the destination chain.
* @return The total price of bridging, with the precision according to the token's `decimals()` value.
*/
function getBridgingCostInTokens(uint destinationChainId) external view returns (uint) {
}
function isMessageProcessed(uint sourceChainId, uint64 nonce) external view returns (bool) {
}
function getDomainByChainId(uint chainId_) public view returns (uint32) {
}
/**
* @notice Calculates the amount of gas equivalent in value to provided amount of tokens
* according to the current exchange rate.
* @param stableTokenAmount The amount of tokens.
* @return amount of gas tokens.
*/
function _getStableTokensValueInGas(uint stableTokenAmount) internal view returns (uint) {
}
function _hashSourceAndNonce(uint32 sourceDomain, uint64 nonce) internal pure returns (bytes32) {
}
fallback() external payable {
}
receive() external payable {
}
}
| cctpTransmitter.receiveMessage(message,signature),"CCTP: Receive message failed" | 266,917 | cctpTransmitter.receiveMessage(message,signature) |
"Claim time not reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract RewardContract {
address public owner;
IERC20 public tokenContract;
uint256 public totalSupply;
uint256 public claimStartHourUTC;
uint256 public claimEndHourUTC;
constructor(address _tokenContract) {
}
modifier onlyOwner() {
}
function setClaimTime(uint256 _startHourUTC, uint256 _endHourUTC) external onlyOwner {
}
function isClaimTime() public view returns (bool) {
}
function claimReward(address recipient) external {
require(<FILL_ME>)
require(recipient != address(0), "Invalid recipient address");
uint256 userBalance = tokenContract.balanceOf(msg.sender);
uint256 rewardPool = tokenContract.balanceOf(address(this));
uint256 userShare = rewardPool * userBalance / totalSupply;
require(userShare > 0, "No rewards available");
require(tokenContract.transfer(recipient, userShare), "Transfer failed");
}
function withdrawStuckTokens (address stoken, address receiver) external onlyOwner {
}
function withdrawStuckETH() external onlyOwner{
}
}
| isClaimTime(),"Claim time not reached" | 267,027 | isClaimTime() |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract RewardContract {
address public owner;
IERC20 public tokenContract;
uint256 public totalSupply;
uint256 public claimStartHourUTC;
uint256 public claimEndHourUTC;
constructor(address _tokenContract) {
}
modifier onlyOwner() {
}
function setClaimTime(uint256 _startHourUTC, uint256 _endHourUTC) external onlyOwner {
}
function isClaimTime() public view returns (bool) {
}
function claimReward(address recipient) external {
require(isClaimTime(), "Claim time not reached");
require(recipient != address(0), "Invalid recipient address");
uint256 userBalance = tokenContract.balanceOf(msg.sender);
uint256 rewardPool = tokenContract.balanceOf(address(this));
uint256 userShare = rewardPool * userBalance / totalSupply;
require(userShare > 0, "No rewards available");
require(<FILL_ME>)
}
function withdrawStuckTokens (address stoken, address receiver) external onlyOwner {
}
function withdrawStuckETH() external onlyOwner{
}
}
| tokenContract.transfer(recipient,userShare),"Transfer failed" | 267,027 | tokenContract.transfer(recipient,userShare) |
"Can't withdraw 0" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
}
contract RewardContract {
address public owner;
IERC20 public tokenContract;
uint256 public totalSupply;
uint256 public claimStartHourUTC;
uint256 public claimEndHourUTC;
constructor(address _tokenContract) {
}
modifier onlyOwner() {
}
function setClaimTime(uint256 _startHourUTC, uint256 _endHourUTC) external onlyOwner {
}
function isClaimTime() public view returns (bool) {
}
function claimReward(address recipient) external {
}
function withdrawStuckTokens (address stoken, address receiver) external onlyOwner {
require(<FILL_ME>)
IERC20(stoken).transfer(receiver, IERC20(stoken).balanceOf(address(this)));
}
function withdrawStuckETH() external onlyOwner{
}
}
| IERC20(stoken).balanceOf(address(this))>0,"Can't withdraw 0" | 267,027 | IERC20(stoken).balanceOf(address(this))>0 |
"reward pool don't have enough eth" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
///@dev uniswap Factory interface to call createPair in constructor
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
///@dev uniswap router interface to call swapTokensForETH and getting WETH, factory value
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
///@dev wrapper to handle the rewardPool
///@notice rewardFundHandler is a wrapper smartcontract to manage reward pool funds,
/// 95% of funds will be sent to winner and 5% to fee wallet to keep the
/// chainlink vrf working. (5% fee is deducted in eth, which owner can use
/// to buy LINK token and fill the Subscription).
contract rewardFundHanlder is Ownable {
uint256 public totalDistributed; //keep track of total rewards distributed till date
address wallet = address(0xa9a72d15842A239B0D2fD62009239D77abCb7857); // fee wallet
///@dev send rewards to the winner
///@param winner: address of winner, which will be set by token contract
/// itself, as per chainlink VRF outcome.
function sendRewardToWinner (address winner) external onlyOwner {
}
///@dev update the fee wallet to new one
///@param _newWallet: new wallet address to receive the fees.
function updateWallet (address _newWallet) external onlyOwner {
}
///@dev claim any stucked tokens, if accidently sent by someone.
///@param token: token which owner want to take out.
///@param amount: token amount
function claimStuckedTokens (address token, uint256 amount) external onlyOwner {
}
///@notice receive any external eth
receive() external payable {}
}
contract WojakPot is ERC20, Ownable, VRFConsumerBaseV2, ReentrancyGuard {
using SafeMath for uint256;
///dex and wallet related variables//
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0x000000000000000000000000000000000000dEaD);
bool private swapping;
address public marketingWallet;
address public TeamWallet;
rewardFundHanlder private rewardFundManager;
address public rewardHandlingWrapper;
uint256 public swapTokensAtAmount;
bool public tradingActive = false;
///fees///
uint256 public marketingAndTeamFeeBuy;
uint256 public rewardFeeBuy;
uint256 public marketingAndTeamFeeSell;
uint256 public rewardFeeSell;
uint256 private totalBuyFee;
uint256 private totalSellFee;
///reward related variables///
uint256 public lastDistributed;
uint256 public minHoldingAmount;
uint256 private requestID;
uint256 public INTERVAL = 86400 seconds; // 1 Day
/// max wallet and max Tx ///
uint256 public maxWallet;
uint256 public maxTx;
/// winners, users and recent winner variables///
address [] public winners;
address[] public _participants;
address public recentWinner;
///Chainlink vrf v2 setup///
uint64 private immutable i_subscriptionId;
uint32 private immutable i_callbackGasLimit;
uint32 private constant NUM_WORDS = 1;
uint16 private constant REQUEST_CONFIRMATIONS = 3;
VRFCoordinatorV2Interface private immutable i_vrfCoordinator;
bytes32 private immutable i_keyHash;
///mappings///
mapping(address => bool) private _isExcludedFromFees; // manage excluding of address from fee
mapping(address => bool) public _isExcludedFromRewardPool; // managing the excluding of user from reward pool
mapping(address => bool) public isEligible; // true if user is in list, false if not
mapping(address => uint256) public participantIndex; //index of user in list
mapping(address => bool) public marketMakerPairs; // pairs for token
///Events///
event ExcludeFromFees(address indexed account, bool isExcluded);
event marketingAndTeamWalletsUpdated(
address indexed marketingWallet,
address indexed TeamWallet
);
event WinnerPicked(address indexed user, uint256 ethAmount);
event newPairAdded (address indexed newPair);
constructor(uint64 _subscriptionID) ERC20("Wojakpot", "WJP") VRFConsumerBaseV2(0x271682DEB8C4E0901D1a1550aD2e64D568E69909) {
}
receive() external payable {}
function decimals() public view virtual override returns (uint8) {
}
///@dev enabled trading, once enabled can't be reversed
function enableTrading() external onlyOwner {
}
///@dev change the minimum amount of tokens to sell from fees
///@param newAmount: new amount for swapping tokens to eth
/// requirements --
/// must be greator than equal to 1000 tokens and less
/// than 0.5% of the supply
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
///@dev update the fees for sell tax
///@param marketingAndTeam: set new marketingAndTeam fees for sell
///@param rewardPool: set new reward fees for sell
///@notice As divisor is 1000 for calculation, so 5 means 0.5% and 10 means 1%
function updateSellFees(
uint256 marketingAndTeam,
uint256 rewardPool
) external onlyOwner {
}
///@dev update the fees for buy tax
///@param marketingAndTeam: set new marketingAndTeam fees for buy
///@param rewardPool: set new reward fees for buy
///@notice As divisor is 1000 for calculation, so 5 means 0.5% and 10 means 1%
function updateBuyFees(
uint256 marketingAndTeam,
uint256 rewardPool
) external onlyOwner {
}
///@dev manage the users address for having fees or not
///@param account: user address which will be excluded or included
///@param excluded: boolean value, true means excluded from fees, false means included in fees
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
///@dev update marketing wallet address
///@param newMarketingWallet: new address to receive marketing fess
///@param newMarketingWallet: new address to receive Team fees
function updateMarketingWallet(address newMarketingWallet, address newTeamWallet)
external
onlyOwner
{
}
///@dev udpate the fee wallet to cover the chainlink fee
///@param wallet: new wallet to receive 5% eth when winner is picked
function updateFeeWallet (address wallet) external onlyOwner {
}
///@dev claim any tokens from reward wrapper if someone accidently sent it.
///@param token: token address to be rescued
///@param amount: amount to take out from wrapper
function claimStuckedTokensFromRewardWrapper (address token, uint256 amount) external onlyOwner{
}
///@dev claim any tokens from token contract
///@param token: token address to be rescued.
///requirements --
/// can't take out native token
function claimStuckedERC20(address token) external onlyOwner {
}
///@dev claim any dust or external ether from the token contract
function claimETH () external onlyOwner {
}
///@dev set max wallet limit
///@param amount: new max wallet amount
///requirements --
/// new amount can't be lower han 1% percent of the supply
function setMaxWalletLimit (uint256 amount) external onlyOwner {
}
///@dev set max Tx limit
///@param amount: new tx amount
///requirements --
/// new amount can't be lower han 1% percent of the supply
function setMaxTxLimit (uint256 amount) external onlyOwner {
}
///@notice Returns if an account is excluded from fees/limits or not
function isExcludedFromFees(address account) public view returns (bool) {
}
///@dev add or remove new pairs for token
///@param newPair: new pair address to be added or removed
///@param value: true to add, false to remove.
/// Requirements --
/// can't remove the main pair.
function manageMarketMakerPair (address newPair, bool value) external onlyOwner {
}
///@notice transfer function to determine if it's a buy or sell
/// or just a transfer. and implements maxWallet, maxTx accordingly.
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
///@dev pick winner, can be called by anyone, chainlink automation
/// for more info see, https://automation.chain.link
/// requirements --
/// rewardPool balance should be greator than 0.
///check if time b/w last reward distribution and now is more than INTERVAL, pickWinner
function pickWinner () public nonReentrant{
require(<FILL_ME>)
require (block.timestamp - lastDistributed > INTERVAL, "Enough time has not been passed yet");
_pickWinner();
lastDistributed = block.timestamp;
}
/// ///
/// INTERNAL FUNCTIONS ///
/// ///
///@notice request chainlink coordinator for randomness
function _pickWinner () internal {
}
///@notice value returned by chainlink coordinator is used to decided the winner
/// and winner got paid.
function fulfillRandomWords(
uint256, /*request_id */
uint256[] memory randomWords
) internal override {
}
function addHolderToList(address holder) internal {
}
function removeholderFromList(address holder) internal {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
/// manage the swap the tax tokens for eth and send to marketing wallet, rewardPool
/// as per there share.
function swapBack() private {
}
///@notice returns total eth distributed till date (it includes fees as well)
function totalDistributedTillDate () public view returns (uint256) {
}
///@dev set minimum time interval b/w picking winner again
///@param newInterval: input in days, 1 means 1 days
///requirements --
/// value should be b/w 1 and 30.
function setInterval (uint256 newInterval) external onlyOwner {
}
}
| address(rewardFundManager).balance>0,"reward pool don't have enough eth" | 267,109 | address(rewardFundManager).balance>0 |
"Enough time has not been passed yet" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
///@dev uniswap Factory interface to call createPair in constructor
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
///@dev uniswap router interface to call swapTokensForETH and getting WETH, factory value
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
///@dev wrapper to handle the rewardPool
///@notice rewardFundHandler is a wrapper smartcontract to manage reward pool funds,
/// 95% of funds will be sent to winner and 5% to fee wallet to keep the
/// chainlink vrf working. (5% fee is deducted in eth, which owner can use
/// to buy LINK token and fill the Subscription).
contract rewardFundHanlder is Ownable {
uint256 public totalDistributed; //keep track of total rewards distributed till date
address wallet = address(0xa9a72d15842A239B0D2fD62009239D77abCb7857); // fee wallet
///@dev send rewards to the winner
///@param winner: address of winner, which will be set by token contract
/// itself, as per chainlink VRF outcome.
function sendRewardToWinner (address winner) external onlyOwner {
}
///@dev update the fee wallet to new one
///@param _newWallet: new wallet address to receive the fees.
function updateWallet (address _newWallet) external onlyOwner {
}
///@dev claim any stucked tokens, if accidently sent by someone.
///@param token: token which owner want to take out.
///@param amount: token amount
function claimStuckedTokens (address token, uint256 amount) external onlyOwner {
}
///@notice receive any external eth
receive() external payable {}
}
contract WojakPot is ERC20, Ownable, VRFConsumerBaseV2, ReentrancyGuard {
using SafeMath for uint256;
///dex and wallet related variables//
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0x000000000000000000000000000000000000dEaD);
bool private swapping;
address public marketingWallet;
address public TeamWallet;
rewardFundHanlder private rewardFundManager;
address public rewardHandlingWrapper;
uint256 public swapTokensAtAmount;
bool public tradingActive = false;
///fees///
uint256 public marketingAndTeamFeeBuy;
uint256 public rewardFeeBuy;
uint256 public marketingAndTeamFeeSell;
uint256 public rewardFeeSell;
uint256 private totalBuyFee;
uint256 private totalSellFee;
///reward related variables///
uint256 public lastDistributed;
uint256 public minHoldingAmount;
uint256 private requestID;
uint256 public INTERVAL = 86400 seconds; // 1 Day
/// max wallet and max Tx ///
uint256 public maxWallet;
uint256 public maxTx;
/// winners, users and recent winner variables///
address [] public winners;
address[] public _participants;
address public recentWinner;
///Chainlink vrf v2 setup///
uint64 private immutable i_subscriptionId;
uint32 private immutable i_callbackGasLimit;
uint32 private constant NUM_WORDS = 1;
uint16 private constant REQUEST_CONFIRMATIONS = 3;
VRFCoordinatorV2Interface private immutable i_vrfCoordinator;
bytes32 private immutable i_keyHash;
///mappings///
mapping(address => bool) private _isExcludedFromFees; // manage excluding of address from fee
mapping(address => bool) public _isExcludedFromRewardPool; // managing the excluding of user from reward pool
mapping(address => bool) public isEligible; // true if user is in list, false if not
mapping(address => uint256) public participantIndex; //index of user in list
mapping(address => bool) public marketMakerPairs; // pairs for token
///Events///
event ExcludeFromFees(address indexed account, bool isExcluded);
event marketingAndTeamWalletsUpdated(
address indexed marketingWallet,
address indexed TeamWallet
);
event WinnerPicked(address indexed user, uint256 ethAmount);
event newPairAdded (address indexed newPair);
constructor(uint64 _subscriptionID) ERC20("Wojakpot", "WJP") VRFConsumerBaseV2(0x271682DEB8C4E0901D1a1550aD2e64D568E69909) {
}
receive() external payable {}
function decimals() public view virtual override returns (uint8) {
}
///@dev enabled trading, once enabled can't be reversed
function enableTrading() external onlyOwner {
}
///@dev change the minimum amount of tokens to sell from fees
///@param newAmount: new amount for swapping tokens to eth
/// requirements --
/// must be greator than equal to 1000 tokens and less
/// than 0.5% of the supply
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
}
///@dev update the fees for sell tax
///@param marketingAndTeam: set new marketingAndTeam fees for sell
///@param rewardPool: set new reward fees for sell
///@notice As divisor is 1000 for calculation, so 5 means 0.5% and 10 means 1%
function updateSellFees(
uint256 marketingAndTeam,
uint256 rewardPool
) external onlyOwner {
}
///@dev update the fees for buy tax
///@param marketingAndTeam: set new marketingAndTeam fees for buy
///@param rewardPool: set new reward fees for buy
///@notice As divisor is 1000 for calculation, so 5 means 0.5% and 10 means 1%
function updateBuyFees(
uint256 marketingAndTeam,
uint256 rewardPool
) external onlyOwner {
}
///@dev manage the users address for having fees or not
///@param account: user address which will be excluded or included
///@param excluded: boolean value, true means excluded from fees, false means included in fees
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
///@dev update marketing wallet address
///@param newMarketingWallet: new address to receive marketing fess
///@param newMarketingWallet: new address to receive Team fees
function updateMarketingWallet(address newMarketingWallet, address newTeamWallet)
external
onlyOwner
{
}
///@dev udpate the fee wallet to cover the chainlink fee
///@param wallet: new wallet to receive 5% eth when winner is picked
function updateFeeWallet (address wallet) external onlyOwner {
}
///@dev claim any tokens from reward wrapper if someone accidently sent it.
///@param token: token address to be rescued
///@param amount: amount to take out from wrapper
function claimStuckedTokensFromRewardWrapper (address token, uint256 amount) external onlyOwner{
}
///@dev claim any tokens from token contract
///@param token: token address to be rescued.
///requirements --
/// can't take out native token
function claimStuckedERC20(address token) external onlyOwner {
}
///@dev claim any dust or external ether from the token contract
function claimETH () external onlyOwner {
}
///@dev set max wallet limit
///@param amount: new max wallet amount
///requirements --
/// new amount can't be lower han 1% percent of the supply
function setMaxWalletLimit (uint256 amount) external onlyOwner {
}
///@dev set max Tx limit
///@param amount: new tx amount
///requirements --
/// new amount can't be lower han 1% percent of the supply
function setMaxTxLimit (uint256 amount) external onlyOwner {
}
///@notice Returns if an account is excluded from fees/limits or not
function isExcludedFromFees(address account) public view returns (bool) {
}
///@dev add or remove new pairs for token
///@param newPair: new pair address to be added or removed
///@param value: true to add, false to remove.
/// Requirements --
/// can't remove the main pair.
function manageMarketMakerPair (address newPair, bool value) external onlyOwner {
}
///@notice transfer function to determine if it's a buy or sell
/// or just a transfer. and implements maxWallet, maxTx accordingly.
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
///@dev pick winner, can be called by anyone, chainlink automation
/// for more info see, https://automation.chain.link
/// requirements --
/// rewardPool balance should be greator than 0.
///check if time b/w last reward distribution and now is more than INTERVAL, pickWinner
function pickWinner () public nonReentrant{
require (address(rewardFundManager).balance > 0, "reward pool don't have enough eth");
require(<FILL_ME>)
_pickWinner();
lastDistributed = block.timestamp;
}
/// ///
/// INTERNAL FUNCTIONS ///
/// ///
///@notice request chainlink coordinator for randomness
function _pickWinner () internal {
}
///@notice value returned by chainlink coordinator is used to decided the winner
/// and winner got paid.
function fulfillRandomWords(
uint256, /*request_id */
uint256[] memory randomWords
) internal override {
}
function addHolderToList(address holder) internal {
}
function removeholderFromList(address holder) internal {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
/// manage the swap the tax tokens for eth and send to marketing wallet, rewardPool
/// as per there share.
function swapBack() private {
}
///@notice returns total eth distributed till date (it includes fees as well)
function totalDistributedTillDate () public view returns (uint256) {
}
///@dev set minimum time interval b/w picking winner again
///@param newInterval: input in days, 1 means 1 days
///requirements --
/// value should be b/w 1 and 30.
function setInterval (uint256 newInterval) external onlyOwner {
}
}
| block.timestamp-lastDistributed>INTERVAL,"Enough time has not been passed yet" | 267,109 | block.timestamp-lastDistributed>INTERVAL |
"nonDuplicated: duplicated" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IUniRouter02.sol";
import "./interfaces/IWETH.sol";
// ZipFarm is the master of zipfi protocol. He can make zip and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once zips is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract ZipFarm is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reflectionDebt; // Reflection debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of zipsa
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accTokenPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accTokenPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. zipss to distribute per block.
uint256 duration;
uint256 startBlock;
uint256 bonusEndBlock;
uint256 lastRewardBlock; // Last block number that zips distribution occurs.
uint256 accTokenPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 accReflectionPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 lastReflectionPerPoint;
uint16 depositFee; // Deposit fee in basis points
uint16 withdrawFee; // Deposit fee in basis points
}
struct SwapSetting {
IERC20 lpToken;
address swapRouter;
address[] earnedToToken0;
address[] earnedToToken1;
address[] reflectionToToken0;
address[] reflectionToToken1;
bool enabled;
}
// The zip TOKEN!
IERC20 public brews;
// Reflection Token
address public reflectionToken;
uint256 public accReflectionPerPoint;
bool public hasDividend;
// zip tokens created per block.
uint256 public rewardPerBlock;
// Bonus muliplier for early zip makers.
uint256 public constant BONUS_MULTIPLIER = 1;
// Deposit Fee address
address public feeAddress;
address public buyBackWallet = 0x008B3B7EC7aF8c7A61F322a2e95e21609209613D;
uint256 public performanceFee = 0.00089 ether;
// Info of each pool.
PoolInfo[] public poolInfo;
SwapSetting[] public swapSettings;
uint256[] public totalStaked;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when zip mining starts.
uint256 public startBlock;
uint256 private totalEarned;
uint256 private totalRewardStaked;
uint256 private totalReflectionStaked;
uint256 private totalReflections;
uint256 private reflectionDebt;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event SetFeeAddress(address indexed user, address indexed newAddress);
event SetBuyBackWallet(address indexed user, address newAddress);
event SetPerformanceFee(uint256 fee);
event UpdateEmissionRate(address indexed user, uint256 rewardPerBlock);
constructor(IERC20 _brews, address _reflectionToken, uint256 _rewardPerBlock, bool _hasDividend) {
}
mapping(IERC20 => bool) public poolExistence;
modifier nonDuplicated(IERC20 _lpToken) {
require(<FILL_ME>)
_;
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) {
}
// Update the given pool's zip allocation point and deposit fee. Can only be called by the owner.
function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner {
}
// Update the given pool's compound parameters. Can only be called by the owner.
function setSwapSetting(
uint256 _pid,
address _uniRouter,
address[] memory _earnedToToken0,
address[] memory _earnedToToken1,
address[] memory _reflectionToToken0,
address[] memory _reflectionToToken1,
bool _enabled
) external onlyOwner {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to, uint256 _endBlock) public pure returns (uint256) {
}
// View function to see pending zip on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
function pendingReflections(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to ZipFarm
function deposit(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
// Withdraw LP tokens from Zipfarm.
function withdraw(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
function claimReward(uint256 _pid) external payable nonReentrant {
}
function compoundReward(uint256 _pid) external payable nonReentrant {
}
function claimDividend(uint256 _pid) external payable nonReentrant {
}
function compoundDividend(uint256 _pid) external payable nonReentrant {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) external nonReentrant {
}
function _transferPerformanceFee() internal {
}
function _calculateTotalStaked(uint256 _pid, IERC20 _lpToken, uint256 _amount, bool _deposit) internal {
}
function _estimateDividendAmount(uint256 amount) internal view returns(uint256) {
}
/**
* @notice Available amount of reward token
*/
function availableRewardTokens() public view returns (uint256) {
}
/**
* @notice Available amount of reflection token
*/
function availableDividendTokens() public view returns (uint256) {
}
// Safe zip transfer function, just in case if rounding error causes pool to not have enough brewss.
function safeTokenTransfer(address _to, uint256 _amount) internal {
}
function setFeeAddress(address _feeAddress) external onlyOwner {
}
function setPerformanceFee(uint256 _fee) external {
}
function setBuyBackWallet(address _addr) external {
}
//Brews has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all.
function updateEmissionRate(uint256 _rewardPerBlock) external onlyOwner {
}
function updateStartBlock(uint256 _startBlock) external onlyOwner {
}
/*
* @notice Deposit reward token
* @dev Only call by owner. Needs to be for deposit of reward token when reflection token is same with reward token.
*/
function depositRewards(uint _amount) external nonReentrant {
}
function emergencyWithdrawRewards(uint256 _amount) external onlyOwner {
}
function emergencyWithdrawReflections() external onlyOwner {
}
function recoverWrongToken(address _token) external onlyOwner {
}
function _safeSwap(
address _uniRouter,
uint256 _amountIn,
address[] memory _path,
address _to
) internal returns (uint256) {
}
function _addLiquidity(
address _uniRouter,
address _token0,
address _token1,
uint256 _tokenAmt0,
uint256 _tokenAmt1,
address _to
) internal returns(uint256 amountA, uint256 amountB, uint256 liquidity) {
}
receive() external payable {}
}
| poolExistence[_lpToken]==false,"nonDuplicated: duplicated" | 267,154 | poolExistence[_lpToken]==false |
"set: invalid duration" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IUniRouter02.sol";
import "./interfaces/IWETH.sol";
// ZipFarm is the master of zipfi protocol. He can make zip and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once zips is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract ZipFarm is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reflectionDebt; // Reflection debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of zipsa
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accTokenPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accTokenPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. zipss to distribute per block.
uint256 duration;
uint256 startBlock;
uint256 bonusEndBlock;
uint256 lastRewardBlock; // Last block number that zips distribution occurs.
uint256 accTokenPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 accReflectionPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 lastReflectionPerPoint;
uint16 depositFee; // Deposit fee in basis points
uint16 withdrawFee; // Deposit fee in basis points
}
struct SwapSetting {
IERC20 lpToken;
address swapRouter;
address[] earnedToToken0;
address[] earnedToToken1;
address[] reflectionToToken0;
address[] reflectionToToken1;
bool enabled;
}
// The zip TOKEN!
IERC20 public brews;
// Reflection Token
address public reflectionToken;
uint256 public accReflectionPerPoint;
bool public hasDividend;
// zip tokens created per block.
uint256 public rewardPerBlock;
// Bonus muliplier for early zip makers.
uint256 public constant BONUS_MULTIPLIER = 1;
// Deposit Fee address
address public feeAddress;
address public buyBackWallet = 0x008B3B7EC7aF8c7A61F322a2e95e21609209613D;
uint256 public performanceFee = 0.00089 ether;
// Info of each pool.
PoolInfo[] public poolInfo;
SwapSetting[] public swapSettings;
uint256[] public totalStaked;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when zip mining starts.
uint256 public startBlock;
uint256 private totalEarned;
uint256 private totalRewardStaked;
uint256 private totalReflectionStaked;
uint256 private totalReflections;
uint256 private reflectionDebt;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event SetFeeAddress(address indexed user, address indexed newAddress);
event SetBuyBackWallet(address indexed user, address newAddress);
event SetPerformanceFee(uint256 fee);
event UpdateEmissionRate(address indexed user, uint256 rewardPerBlock);
constructor(IERC20 _brews, address _reflectionToken, uint256 _rewardPerBlock, bool _hasDividend) {
}
mapping(IERC20 => bool) public poolExistence;
modifier nonDuplicated(IERC20 _lpToken) {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) {
}
// Update the given pool's zip allocation point and deposit fee. Can only be called by the owner.
function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner {
require(_depositFee <= 10000, "set: invalid deposit fee basis points");
require(_withdrawFee <= 10000, "set: invalid deposit fee basis points");
if(poolInfo[_pid].bonusEndBlock > block.number) {
require(<FILL_ME>)
}
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
poolInfo[_pid].depositFee = _depositFee;
poolInfo[_pid].withdrawFee = _withdrawFee;
poolInfo[_pid].duration = _duration;
if(poolInfo[_pid].bonusEndBlock < block.number) {
if (!_withUpdate) updatePool(_pid);
poolInfo[_pid].startBlock = block.number;
poolInfo[_pid].bonusEndBlock = block.number.add(_duration.mul(6219));
} else {
poolInfo[_pid].bonusEndBlock = poolInfo[_pid].startBlock.add(_duration.mul(6219));
}
}
// Update the given pool's compound parameters. Can only be called by the owner.
function setSwapSetting(
uint256 _pid,
address _uniRouter,
address[] memory _earnedToToken0,
address[] memory _earnedToToken1,
address[] memory _reflectionToToken0,
address[] memory _reflectionToToken1,
bool _enabled
) external onlyOwner {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to, uint256 _endBlock) public pure returns (uint256) {
}
// View function to see pending zip on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
function pendingReflections(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to ZipFarm
function deposit(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
// Withdraw LP tokens from Zipfarm.
function withdraw(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
function claimReward(uint256 _pid) external payable nonReentrant {
}
function compoundReward(uint256 _pid) external payable nonReentrant {
}
function claimDividend(uint256 _pid) external payable nonReentrant {
}
function compoundDividend(uint256 _pid) external payable nonReentrant {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) external nonReentrant {
}
function _transferPerformanceFee() internal {
}
function _calculateTotalStaked(uint256 _pid, IERC20 _lpToken, uint256 _amount, bool _deposit) internal {
}
function _estimateDividendAmount(uint256 amount) internal view returns(uint256) {
}
/**
* @notice Available amount of reward token
*/
function availableRewardTokens() public view returns (uint256) {
}
/**
* @notice Available amount of reflection token
*/
function availableDividendTokens() public view returns (uint256) {
}
// Safe zip transfer function, just in case if rounding error causes pool to not have enough brewss.
function safeTokenTransfer(address _to, uint256 _amount) internal {
}
function setFeeAddress(address _feeAddress) external onlyOwner {
}
function setPerformanceFee(uint256 _fee) external {
}
function setBuyBackWallet(address _addr) external {
}
//Brews has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all.
function updateEmissionRate(uint256 _rewardPerBlock) external onlyOwner {
}
function updateStartBlock(uint256 _startBlock) external onlyOwner {
}
/*
* @notice Deposit reward token
* @dev Only call by owner. Needs to be for deposit of reward token when reflection token is same with reward token.
*/
function depositRewards(uint _amount) external nonReentrant {
}
function emergencyWithdrawRewards(uint256 _amount) external onlyOwner {
}
function emergencyWithdrawReflections() external onlyOwner {
}
function recoverWrongToken(address _token) external onlyOwner {
}
function _safeSwap(
address _uniRouter,
uint256 _amountIn,
address[] memory _path,
address _to
) internal returns (uint256) {
}
function _addLiquidity(
address _uniRouter,
address _token0,
address _token1,
uint256 _tokenAmt0,
uint256 _tokenAmt1,
address _to
) internal returns(uint256 amountA, uint256 amountB, uint256 liquidity) {
}
receive() external payable {}
}
| poolInfo[_pid].startBlock.add(_duration.mul(6219))>block.number,"set: invalid duration" | 267,154 | poolInfo[_pid].startBlock.add(_duration.mul(6219))>block.number |
"token is using on pool" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IUniRouter02.sol";
import "./interfaces/IWETH.sol";
// ZipFarm is the master of zipfi protocol. He can make zip and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once zips is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract ZipFarm is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 reflectionDebt; // Reflection debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of zipsa
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accTokenPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accTokenPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. zipss to distribute per block.
uint256 duration;
uint256 startBlock;
uint256 bonusEndBlock;
uint256 lastRewardBlock; // Last block number that zips distribution occurs.
uint256 accTokenPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 accReflectionPerShare; // Accumulated zips per share, times 1e12. See below.
uint256 lastReflectionPerPoint;
uint16 depositFee; // Deposit fee in basis points
uint16 withdrawFee; // Deposit fee in basis points
}
struct SwapSetting {
IERC20 lpToken;
address swapRouter;
address[] earnedToToken0;
address[] earnedToToken1;
address[] reflectionToToken0;
address[] reflectionToToken1;
bool enabled;
}
// The zip TOKEN!
IERC20 public brews;
// Reflection Token
address public reflectionToken;
uint256 public accReflectionPerPoint;
bool public hasDividend;
// zip tokens created per block.
uint256 public rewardPerBlock;
// Bonus muliplier for early zip makers.
uint256 public constant BONUS_MULTIPLIER = 1;
// Deposit Fee address
address public feeAddress;
address public buyBackWallet = 0x008B3B7EC7aF8c7A61F322a2e95e21609209613D;
uint256 public performanceFee = 0.00089 ether;
// Info of each pool.
PoolInfo[] public poolInfo;
SwapSetting[] public swapSettings;
uint256[] public totalStaked;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when zip mining starts.
uint256 public startBlock;
uint256 private totalEarned;
uint256 private totalRewardStaked;
uint256 private totalReflectionStaked;
uint256 private totalReflections;
uint256 private reflectionDebt;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
event SetFeeAddress(address indexed user, address indexed newAddress);
event SetBuyBackWallet(address indexed user, address newAddress);
event SetPerformanceFee(uint256 fee);
event UpdateEmissionRate(address indexed user, uint256 rewardPerBlock);
constructor(IERC20 _brews, address _reflectionToken, uint256 _rewardPerBlock, bool _hasDividend) {
}
mapping(IERC20 => bool) public poolExistence;
modifier nonDuplicated(IERC20 _lpToken) {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) {
}
// Update the given pool's zip allocation point and deposit fee. Can only be called by the owner.
function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFee, uint16 _withdrawFee, uint256 _duration, bool _withUpdate) external onlyOwner {
}
// Update the given pool's compound parameters. Can only be called by the owner.
function setSwapSetting(
uint256 _pid,
address _uniRouter,
address[] memory _earnedToToken0,
address[] memory _earnedToToken1,
address[] memory _reflectionToToken0,
address[] memory _reflectionToToken1,
bool _enabled
) external onlyOwner {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to, uint256 _endBlock) public pure returns (uint256) {
}
// View function to see pending zip on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
function pendingReflections(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
}
// Deposit LP tokens to ZipFarm
function deposit(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
// Withdraw LP tokens from Zipfarm.
function withdraw(uint256 _pid, uint256 _amount) external payable nonReentrant {
}
function claimReward(uint256 _pid) external payable nonReentrant {
}
function compoundReward(uint256 _pid) external payable nonReentrant {
}
function claimDividend(uint256 _pid) external payable nonReentrant {
}
function compoundDividend(uint256 _pid) external payable nonReentrant {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) external nonReentrant {
}
function _transferPerformanceFee() internal {
}
function _calculateTotalStaked(uint256 _pid, IERC20 _lpToken, uint256 _amount, bool _deposit) internal {
}
function _estimateDividendAmount(uint256 amount) internal view returns(uint256) {
}
/**
* @notice Available amount of reward token
*/
function availableRewardTokens() public view returns (uint256) {
}
/**
* @notice Available amount of reflection token
*/
function availableDividendTokens() public view returns (uint256) {
}
// Safe zip transfer function, just in case if rounding error causes pool to not have enough brewss.
function safeTokenTransfer(address _to, uint256 _amount) internal {
}
function setFeeAddress(address _feeAddress) external onlyOwner {
}
function setPerformanceFee(uint256 _fee) external {
}
function setBuyBackWallet(address _addr) external {
}
//Brews has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all.
function updateEmissionRate(uint256 _rewardPerBlock) external onlyOwner {
}
function updateStartBlock(uint256 _startBlock) external onlyOwner {
}
/*
* @notice Deposit reward token
* @dev Only call by owner. Needs to be for deposit of reward token when reflection token is same with reward token.
*/
function depositRewards(uint _amount) external nonReentrant {
}
function emergencyWithdrawRewards(uint256 _amount) external onlyOwner {
}
function emergencyWithdrawReflections() external onlyOwner {
}
function recoverWrongToken(address _token) external onlyOwner {
require(_token != address(brews) && _token != reflectionToken, "cannot recover reward token or reflection token");
require(<FILL_ME>)
if(_token == address(0x0)) {
uint256 amount = address(this).balance;
payable(address(this)).transfer(amount);
} else {
uint256 amount = IERC20(_token).balanceOf(address(this));
if(amount > 0) {
IERC20(_token).transfer(msg.sender, amount);
}
}
}
function _safeSwap(
address _uniRouter,
uint256 _amountIn,
address[] memory _path,
address _to
) internal returns (uint256) {
}
function _addLiquidity(
address _uniRouter,
address _token0,
address _token1,
uint256 _tokenAmt0,
uint256 _tokenAmt1,
address _to
) internal returns(uint256 amountA, uint256 amountB, uint256 liquidity) {
}
receive() external payable {}
}
| poolExistence[IERC20(_token)]==false,"token is using on pool" | 267,154 | poolExistence[IERC20(_token)]==false |
"Insufficient funds" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
error HadClaimed();
error OutofMaxSupply();
contract mooners is ERC721A, Ownable {
using Strings for uint256;
mapping(address => bool) public claimed;
bool freeMintActive = false;
uint256 public constant MAX_SUPPLY = 5000;
uint256 public cost = 0.009 ether;
string public baseUrl = "ipfs://QmebyvK9dRNDqn7EwTWQQ36ghYLeQhWTk5Gs77tNfuQwp6";
constructor() ERC721A("mooners", "moon") {}
function freeMint(uint256 _amount) external payable {
require(freeMintActive, "Free mint closed");
if(totalSupply() + _amount > MAX_SUPPLY) revert OutofMaxSupply();
if(claimed[msg.sender]) {
require(msg.value >= _amount * cost, "Insufficient funds");
} else {
require(<FILL_ME>)
}
claimed[msg.sender] = true;
_safeMint(msg.sender, _amount);
}
function revive() external payable {
}
function ownerBatchMint(uint256 amount) external onlyOwner {
}
function batchBurn(uint256[] memory tokenids) external onlyOwner {
}
function toggleFreeMint(bool _state) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setBaseURI(string memory url) external onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
}
| msg.value>=(_amount-1)*cost,"Insufficient funds" | 267,341 | msg.value>=(_amount-1)*cost |
"Free mint is open" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
error HadClaimed();
error OutofMaxSupply();
contract mooners is ERC721A, Ownable {
using Strings for uint256;
mapping(address => bool) public claimed;
bool freeMintActive = false;
uint256 public constant MAX_SUPPLY = 5000;
uint256 public cost = 0.009 ether;
string public baseUrl = "ipfs://QmebyvK9dRNDqn7EwTWQQ36ghYLeQhWTk5Gs77tNfuQwp6";
constructor() ERC721A("mooners", "moon") {}
function freeMint(uint256 _amount) external payable {
}
function revive() external payable {
require(<FILL_ME>)
require(msg.value >= cost, "Insufficient funds");
if(totalSupply() + 1 > MAX_SUPPLY) revert OutofMaxSupply();
_safeMint(msg.sender, 1);
}
function ownerBatchMint(uint256 amount) external onlyOwner {
}
function batchBurn(uint256[] memory tokenids) external onlyOwner {
}
function toggleFreeMint(bool _state) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setBaseURI(string memory url) external onlyOwner {
}
function setCost(uint256 _cost) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
}
| !freeMintActive,"Free mint is open" | 267,341 | !freeMintActive |
"You have mint the maximum of nft" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "ERC721A.sol";
contract Othersiderz is ERC721A, Ownable {
using Strings for uint;
string private baseTokenURI;
string private notRevealedUri;
bytes32 private whitelistRoot;
uint256 public cost = 0.1 ether;
uint256 public maxSupply = 600;
uint256 public maxByWallet = 5;
mapping(address => uint) public mintedAddressData;
uint256 public step = 1;
bool public revealed = false;
// 1 = closed
// 2 = Whitelist
// 3 = Opensale
constructor() ERC721A("Othersiderz", "OS") {}
function mint(uint256 amount) public payable {
require(step == 3, "Mint is closed");
require(totalSupply() + amount <= maxSupply, "Sold out !");
require(<FILL_ME>)
require(msg.value >= cost * amount, "Not enough ether sended");
mintedAddressData[msg.sender] += amount;
_safeMint(msg.sender, amount);
}
function crossmint(uint256 amount, address _to) public payable {
}
function mintWl(uint256 amount, bytes32[] calldata proof) public payable {
}
function gift(uint256 amount, address to) public onlyOwner {
}
function isWhitelisted(address account, bytes32[] calldata proof)
internal
view
returns (bool)
{
}
function setWhitelistRoot(bytes32 newWhitelistroot) public onlyOwner {
}
function switchStep(uint256 newStep) public onlyOwner {
}
function setCost(uint256 newCost) public onlyOwner {
}
function setMaxByWallet(uint256 newMaxByWallet) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function _baseUri() internal view virtual returns (string memory) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function _verify(
bytes32 leaf,
bytes32[] memory proof,
bytes32 root
) internal pure returns (bool) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal() public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function withdraw() external onlyOwner {
}
}
| mintedAddressData[msg.sender]+amount<=maxByWallet,"You have mint the maximum of nft" | 267,481 | mintedAddressData[msg.sender]+amount<=maxByWallet |
"You have mint the maximum of nft" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "ERC721A.sol";
contract Othersiderz is ERC721A, Ownable {
using Strings for uint;
string private baseTokenURI;
string private notRevealedUri;
bytes32 private whitelistRoot;
uint256 public cost = 0.1 ether;
uint256 public maxSupply = 600;
uint256 public maxByWallet = 5;
mapping(address => uint) public mintedAddressData;
uint256 public step = 1;
bool public revealed = false;
// 1 = closed
// 2 = Whitelist
// 3 = Opensale
constructor() ERC721A("Othersiderz", "OS") {}
function mint(uint256 amount) public payable {
}
function crossmint(uint256 amount, address _to) public payable {
}
function mintWl(uint256 amount, bytes32[] calldata proof) public payable {
require(step == 2, "WL Mint is closed");
require(isWhitelisted(msg.sender, proof), "You are not in the Whitelist");
require(totalSupply() + amount <= maxSupply, "Sold out !");
uint256 walletBalance = _numberMinted(msg.sender);
require(<FILL_ME>)
require(msg.value >= cost * amount, "Not enough ether sended");
_safeMint(msg.sender, amount);
}
function gift(uint256 amount, address to) public onlyOwner {
}
function isWhitelisted(address account, bytes32[] calldata proof)
internal
view
returns (bool)
{
}
function setWhitelistRoot(bytes32 newWhitelistroot) public onlyOwner {
}
function switchStep(uint256 newStep) public onlyOwner {
}
function setCost(uint256 newCost) public onlyOwner {
}
function setMaxByWallet(uint256 newMaxByWallet) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function _baseUri() internal view virtual returns (string memory) {
}
function _leaf(address account) internal pure returns (bytes32) {
}
function _verify(
bytes32 leaf,
bytes32[] memory proof,
bytes32 root
) internal pure returns (bool) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function reveal() public onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function withdraw() external onlyOwner {
}
}
| walletBalance+amount<=maxByWallet,"You have mint the maximum of nft" | 267,481 | walletBalance+amount<=maxByWallet |
"mint not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./dmc.sol";
contract GWTToken is ERC20Burnable, Ownable {
mapping (address => bool) allow_transfer;
mapping (address => bool) allow_minter;
constructor() ERC20("Gb storage per Week Token", "GWT") Ownable(msg.sender) {
}
modifier onlyMinter() {
require(<FILL_ME>)
_;
}
modifier canTransfer(address sender, address to) {
}
function enableMinter(address[] calldata addresses) public onlyOwner {
}
function disableMinter(address[] calldata addresses) public onlyOwner {
}
function enableTransfer(address[] calldata addresses) public onlyOwner {
}
function disableTransfer(address[] calldata addresses) public onlyOwner {
}
function mint(address to, uint256 amount) public onlyMinter {
}
function _update(address sender, address to, uint256 amount) internal override canTransfer(sender, to) {
}
}
| allow_minter[msg.sender],"mint not allowed" | 267,711 | allow_minter[msg.sender] |
"transfer not allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./dmc.sol";
contract GWTToken is ERC20Burnable, Ownable {
mapping (address => bool) allow_transfer;
mapping (address => bool) allow_minter;
constructor() ERC20("Gb storage per Week Token", "GWT") Ownable(msg.sender) {
}
modifier onlyMinter() {
}
modifier canTransfer(address sender, address to) {
require(<FILL_ME>)
_;
}
function enableMinter(address[] calldata addresses) public onlyOwner {
}
function disableMinter(address[] calldata addresses) public onlyOwner {
}
function enableTransfer(address[] calldata addresses) public onlyOwner {
}
function disableTransfer(address[] calldata addresses) public onlyOwner {
}
function mint(address to, uint256 amount) public onlyMinter {
}
function _update(address sender, address to, uint256 amount) internal override canTransfer(sender, to) {
}
}
| allow_transfer[sender]||allow_transfer[to],"transfer not allowed" | 267,711 | allow_transfer[sender]||allow_transfer[to] |
"Invalid merkle proof" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(<FILL_ME>)
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_wl_max_per_txn, "Quantity exceeds max per transaction");
require(pk_wl_minted_amounts[msg.sender] + quantity <= pk_wl_max_per_wallet,"Quantity exceeds max mints per wallet");
//time check
require(pk_wl_start_timestamp > 0 && block.timestamp - pk_wl_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_wl_mint_price * quantity, "Not enough ethers sent");
pk_wl_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| wlVerify(proof,getLeaf(msg.sender)),"Invalid merkle proof" | 267,787 | wlVerify(proof,getLeaf(msg.sender)) |
"Sold out" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(wlVerify(proof, getLeaf(msg.sender)), "Invalid merkle proof");
//quantity check
require(<FILL_ME>)
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_wl_max_per_txn, "Quantity exceeds max per transaction");
require(pk_wl_minted_amounts[msg.sender] + quantity <= pk_wl_max_per_wallet,"Quantity exceeds max mints per wallet");
//time check
require(pk_wl_start_timestamp > 0 && block.timestamp - pk_wl_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_wl_mint_price * quantity, "Not enough ethers sent");
pk_wl_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| totalSupply()<pk_max_supply,"Sold out" | 267,787 | totalSupply()<pk_max_supply |
"Quantity exceeds max supply" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(wlVerify(proof, getLeaf(msg.sender)), "Invalid merkle proof");
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(<FILL_ME>)
require(quantity <= pk_wl_max_per_txn, "Quantity exceeds max per transaction");
require(pk_wl_minted_amounts[msg.sender] + quantity <= pk_wl_max_per_wallet,"Quantity exceeds max mints per wallet");
//time check
require(pk_wl_start_timestamp > 0 && block.timestamp - pk_wl_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_wl_mint_price * quantity, "Not enough ethers sent");
pk_wl_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| totalSupply()+quantity<=pk_max_supply,"Quantity exceeds max supply" | 267,787 | totalSupply()+quantity<=pk_max_supply |
"Quantity exceeds max mints per wallet" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(wlVerify(proof, getLeaf(msg.sender)), "Invalid merkle proof");
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_wl_max_per_txn, "Quantity exceeds max per transaction");
require(<FILL_ME>)
//time check
require(pk_wl_start_timestamp > 0 && block.timestamp - pk_wl_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_wl_mint_price * quantity, "Not enough ethers sent");
pk_wl_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| pk_wl_minted_amounts[msg.sender]+quantity<=pk_wl_max_per_wallet,"Quantity exceeds max mints per wallet" | 267,787 | pk_wl_minted_amounts[msg.sender]+quantity<=pk_wl_max_per_wallet |
"Invalid merkle proof" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(<FILL_ME>)
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_og_max_per_txn, "Quantity exceeds max per transaction");
require(pk_og_minted_amounts[msg.sender] + quantity <= pk_og_max_per_wallet,"Quantity exceeds max mints per wallet");
//time check
require(pk_og_start_timestamp > 0 && block.timestamp - pk_og_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_og_mint_price * quantity, "Not enough ethers sent");
pk_og_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| ogVerify(proof,getLeaf(msg.sender)),"Invalid merkle proof" | 267,787 | ogVerify(proof,getLeaf(msg.sender)) |
"Quantity exceeds max mints per wallet" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(ogVerify(proof, getLeaf(msg.sender)), "Invalid merkle proof");
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_og_max_per_txn, "Quantity exceeds max per transaction");
require(<FILL_ME>)
//time check
require(pk_og_start_timestamp > 0 && block.timestamp - pk_og_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_og_mint_price * quantity, "Not enough ethers sent");
pk_og_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| pk_og_minted_amounts[msg.sender]+quantity<=pk_og_max_per_wallet,"Quantity exceeds max mints per wallet" | 267,787 | pk_og_minted_amounts[msg.sender]+quantity<=pk_og_max_per_wallet |
"Invalid merkle proof" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(<FILL_ME>)
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_ep_max_per_txn, "Quantity exceeds max per transaction");
require(pk_ep_minted_amounts[msg.sender] + quantity <= pk_ep_max_per_wallet,"Quantity exceeds max mints per wallet");
//time check
require(pk_ep_start_timestamp > 0 && block.timestamp - pk_ep_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_ep_mint_price * quantity, "Not enough ethers sent");
pk_ep_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| epVerify(proof,getLeaf(msg.sender)),"Invalid merkle proof" | 267,787 | epVerify(proof,getLeaf(msg.sender)) |
"Quantity exceeds max mints per wallet" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//whitelisting check
require(epVerify(proof, getLeaf(msg.sender)), "Invalid merkle proof");
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_ep_max_per_txn, "Quantity exceeds max per transaction");
require(<FILL_ME>)
//time check
require(pk_ep_start_timestamp > 0 && block.timestamp - pk_ep_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_ep_mint_price * quantity, "Not enough ethers sent");
pk_ep_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| pk_ep_minted_amounts[msg.sender]+quantity<=pk_ep_max_per_wallet,"Quantity exceeds max mints per wallet" | 267,787 | pk_ep_minted_amounts[msg.sender]+quantity<=pk_ep_max_per_wallet |
"Quantity exceeds max mints per wallet" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
//contract check
require(isContract(msg.sender) == false, "Cannot mint from a contract");
//quantity check
require(totalSupply() < pk_max_supply, "Sold out");
require(totalSupply() + quantity <= pk_max_supply, "Quantity exceeds max supply");
require(quantity <= pk_public_max_per_txn, "Quantity exceeds max per transaction");
require(<FILL_ME>)
//time check
require(pk_public_start_timestamp > 0 && block.timestamp - pk_public_start_timestamp > 0, "Minting is not yet started");
//price check
require(msg.value == pk_public_mint_price * quantity, "Not enough ethers sent");
pk_public_minted_amounts[msg.sender] += quantity;
mintMany(msg.sender, quantity);
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| pk_public_minted_amounts[msg.sender]+quantity<=pk_public_max_per_wallet,"Quantity exceeds max mints per wallet" | 267,787 | pk_public_minted_amounts[msg.sender]+quantity<=pk_public_max_per_wallet |
"Quantity exceeds max supply" | pragma solidity ^0.8.4;
contract PenguinKnight is ERC721A, Ownable {
//static variables
uint256 public pk_max_supply;
uint256 public pk_wl_mint_price;
uint256 public pk_og_mint_price;
uint256 public pk_ep_mint_price;
uint256 public pk_public_mint_price;
uint256 public pk_wl_max_per_wallet;
uint256 public pk_og_max_per_wallet;
uint256 public pk_ep_max_per_wallet;
uint256 public pk_public_max_per_wallet;
uint256 public pk_wl_max_per_txn;
uint256 public pk_og_max_per_txn;
uint256 public pk_ep_max_per_txn;
uint256 public pk_public_max_per_txn;
//state variables
uint256 public pk_wl_start_timestamp;
uint256 public pk_og_start_timestamp;
uint256 public pk_ep_start_timestamp;
uint256 public pk_public_start_timestamp;
mapping(address => uint256) public pk_wl_minted_amounts;
mapping(address => uint256) public pk_og_minted_amounts;
mapping(address => uint256) public pk_ep_minted_amounts;
mapping(address => uint256) public pk_public_minted_amounts;
//whitelisting variables
bytes32 public pk_wl_merkle_root;
bytes32 public pk_og_merkle_root;
bytes32 public pk_ep_merkle_root;
//owner variables
address payable public pk_withdraw_to;
//contract variables
string public pk_base_token_uri;
constructor() ERC721A("PenguinKnight", "PK") {
}
//set contract vars
function setMaxSupply(uint256 value) onlyOwner public { }
function setWLMaxPerWallet(uint256 value) onlyOwner public { }
function setOGMaxPerWallet(uint256 value) onlyOwner public { }
function setEPMaxPerWallet(uint256 value) onlyOwner public { }
function setPublicMaxPerWallet(uint256 value) onlyOwner public { }
function setWLMaxPerTransaction(uint256 value) onlyOwner public { }
function setOGMaxPerTransaction(uint256 value) onlyOwner public { }
function setEPMaxPerTransaction(uint256 value) onlyOwner public { }
function setPublicMaxPerTransaction(uint256 value) onlyOwner public { }
function setWLStartTimestamp(uint256 value) onlyOwner public { }
function setOGStartTimestamp(uint256 value) onlyOwner public { }
function setEPStartTimestamp(uint256 value) onlyOwner public { }
function setPublicStartTimestamp(uint256 value) onlyOwner public { }
function setWLMerkleRoot(bytes32 value) onlyOwner public { }
function setOGMerkleRoot(bytes32 value) onlyOwner public { }
function setEPMerkleRoot(bytes32 value) onlyOwner public { }
function setWLMintPrice(uint256 value) onlyOwner public { }
function setOGMintPrice(uint256 value) onlyOwner public { }
function setEPMintPrice(uint256 value) onlyOwner public { }
function setPublicMintPrice(uint256 value) onlyOwner public { }
function setWithdrawTo(address _address) onlyOwner public { }
function setBaseTokenURI(string memory uri) onlyOwner public { }
function baseTokenURI() public view returns (string memory) { }
function _baseURI() override internal view virtual returns (string memory) { }
//helpers
function isContract(address _address) private view returns (bool){
}
//minting
function mintMany(address _address, uint256 quantity) private {
}
function wlMint(uint quantity, bytes32[] memory proof) public payable
{
}
function ogMint(uint quantity, bytes32[] memory proof) public payable
{
}
function epMint(uint quantity, bytes32[] memory proof) public payable
{
}
function publicMint(uint quantity) public payable
{
}
function ownerMint(address _address, uint quantity) public payable onlyOwner
{
require(totalSupply() < pk_max_supply, "Sold out");
require(<FILL_ME>)
mintMany(_address, quantity);
}
function wlVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function ogVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function epVerify(bytes32[] memory proof, bytes32 leaf) public view returns (bool){ }
function getLeaf(address _address) private pure returns (bytes32){ }
//owner functions
function withdraw() onlyOwner public {
}
}
| (totalSupply()+quantity)<=pk_max_supply,"Quantity exceeds max supply" | 267,787 | (totalSupply()+quantity)<=pk_max_supply |
"only game contracts allowed" | // SPDX-License-Identifier: MIT
// An example of a consumer contract that also owns and manages the subscription
pragma solidity ^0.8.7;
pragma abicoder v2;
// import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
// import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
// import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "./interfaces/IWETH.sol";
contract SwapTest {
// VRFCoordinatorV2Interface COORDINATOR;
// LinkTokenInterface LINKTOKEN;
// Goerli coordinator. For other networks,
// see https://docs.chain.link/docs/vrf-contracts/#configurations
// address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
// Goerli LINK token contract. For other networks, see
// https://docs.chain.link/docs/vrf-contracts/#configurations
// address link_token_contract = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
// The gas lane to use, which specifies the maximum gas price to bump to.
// For a list of available gas lanes on each network,
// see https://docs.chain.link/docs/vrf-contracts/#configurations
// bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
// A reasonable default is 100000, but this value could be different
// on other networks.
// uint32 callbackGasLimit = 2500000;
// The default is 3, but you can set this higher.
// uint16 requestConfirmations = 3;
// For this example, retrieve 2 random values in one request.
// Cannot exceed VRFCoordinatorV2.MAX_NUM_WORDS.
// uint32 numWords = 500;
// Storage parameters
// uint256[] private s_randomWords;
// uint256 public s_requestId;
// uint64 public s_subscriptionId;
address s_owner;
mapping(address => bool) gameContracts;
// uint256 wordsThreshold = 75;
// bool requestPending;
ISwapRouter public constant swapRouter = ISwapRouter(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45);
address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public constant LINK = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
uint24 public constant poolFee = 3000;
uint256 public swapThreshold = 10000000000000000;
address public constant LINKTOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
// constructor() VRFConsumerBaseV2(vrfCoordinator) {
// COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
// LINKTOKEN = LinkTokenInterface(link_token_contract);
// s_owner = msg.sender;
// //Create a new subscription when you deploy the contract.
// createNewSubscription();
// gameContracts[address(this)] = true;
// }
constructor() {
}
receive() external payable {}
modifier onlyGames() {
require(<FILL_ME>)
_;
}
// Assumes the subscription is funded sufficiently.
// function requestRandomWords() public onlyGames {
// // Will revert if subscription is not set and funded.
// s_requestId = COORDINATOR.requestRandomWords(
// keyHash,
// s_subscriptionId,
// requestConfirmations,
// callbackGasLimit,
// numWords
// );
// }
// function fulfillRandomWords(
// uint256, /* requestId */
// uint256[] memory randomWords
// ) internal override {
// s_randomWords = randomWords;
// requestPending = false;
// }
// function getRandomWords(uint256 number) external onlyGames returns (uint256[] memory ranWords) {
// ranWords = new uint256[](number);
// for (uint i = 0; i < number; i++) {
// uint256 curIndex = s_randomWords.length-1;
// ranWords[i] = s_randomWords[curIndex];
// s_randomWords.pop();
// }
// uint256 remainingWords = s_randomWords.length;
// if(remainingWords < wordsThreshold && !requestPending) {
// swapAndTopLink();
// requestRandomWords();
// requestPending = true;
// }
// }
// function getRemainingWords() external view onlyGames returns (uint256) {
// return s_randomWords.length;
// }
// // Create a new subscription when the contract is initially deployed.
// function createNewSubscription() private onlyOwner {
// s_subscriptionId = COORDINATOR.createSubscription();
// // Add this contract as a consumer of its own subscription.
// COORDINATOR.addConsumer(s_subscriptionId, address(this));
// }
function swapAndTopLink(address _to) public onlyGames {
}
/// @notice swapExactInputSingle swaps a fixed amount of DAI for a maximum possible amount of WETH9
/// using the DAI/WETH9 0.3% pool by calling `exactInputSingle` in the swap router.
/// @dev The calling address must approve this contract to spend at least `amountIn` worth of its DAI for this function to succeed.
/// @param amountIn The exact amount of DAI that will be swapped for WETH9.
/// @return amountOut The amount of WETH9 received.
function swapExactInputSingle(uint256 amountIn) internal returns (uint256 amountOut) {
}
// Assumes this contract owns link.
// 1000000000000000000 = 1 LINK
// function topUpSubscription(uint256 amount) external onlyOwner {
// LINKTOKEN.transferAndCall(address(COORDINATOR), amount, abi.encode(s_subscriptionId));
// }
// function addConsumer(address consumerAddress) external onlyOwner {
// // Add a consumer contract to the subscription.
// COORDINATOR.addConsumer(s_subscriptionId, consumerAddress);
// }
// function removeConsumer(address consumerAddress) external onlyOwner {
// // Remove a consumer contract from the subscription.
// COORDINATOR.removeConsumer(s_subscriptionId, consumerAddress);
// }
// function cancelSubscription(address receivingWallet) external onlyOwner {
// // Cancel the subscription and send the remaining LINK to a wallet address.
// COORDINATOR.cancelSubscription(s_subscriptionId, receivingWallet);
// s_subscriptionId = 0;
// }
// Transfer this contract's funds to an address.
// 1000000000000000000 = 1 LINK
function withdraw(uint256 amount, address to) external onlyOwner {
}
function setGameContract(address _contract, bool flag)external onlyOwner {
}
// function setCallbackGas(uint32 _gas) external onlyOwner {
// callbackGasLimit = _gas;
// }
// function setNumWords(uint32 _numWords) external onlyOwner {
// numWords = _numWords;
// }
// function setSwapThreshold(uint256 _threshold) external onlyOwner {
// swapThreshold = _threshold;
// }
// function setWordsThreshold(uint256 _threshold) external onlyOwner {
// wordsThreshold = _threshold;
// }
modifier onlyOwner() {
}
function rescueETH() external onlyOwner {
}
function rescueToken(address _token) external onlyOwner {
}
}
| gameContracts[msg.sender],"only game contracts allowed" | 267,920 | gameContracts[msg.sender] |
"URI getter is frozen" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import {ITokenRenderer} from "./ITokenRenderer.sol";
import {SignedAllowlist} from "../SignedAllowlist.sol";
contract NFTPass is ERC721, ERC721Enumerable, ERC721Burnable, ReentrancyGuard, Pausable, Ownable, SignedAllowlist {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
uint256 private _maxSupply = 0;
uint256 private _mintPrice = 0 ether;
uint256 private _maxPerWallet = 1;
address private _tokenRendererAddress;
bool private _isTokenRendererFrozen;
bool private _isPublicMintEnabled;
string private _contractUriJSON;
constructor(address tokenRendererAddress, address whitelistSigningKey, string memory contractUriJSON, string memory name, string memory symbol) public ERC721(name, symbol) SignedAllowlist(name, whitelistSigningKey) {
}
// Contract URI
function setContractUriJSON(string memory contractUriJSON) public onlyOwner {
}
function contractURI() public view returns (string memory) {
}
// Max per wallet
function setMaxPerWallet(uint256 maxPerWallet) public onlyOwner {
}
function maxPerWallet() public view returns (uint256) {
}
// Max supply
function setMaxSupply(uint256 maxSupply) public onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
// Price
function setMintPrice(uint256 mintPrice) public onlyOwner {
}
function mintPrice() public view returns (uint256){
}
// Public mint
function setPublicMintEnabled(bool enabled) public onlyOwner {
}
function publicMintEnabled() public view returns (bool) {
}
// Token renderer
modifier whenTokenRendererNotFrozen() {
require(<FILL_ME>)
_;
}
function freezeTokenRenderer() public onlyOwner {
}
function setTokenRendererAddress(address tokenRenderer) public onlyOwner whenTokenRendererNotFrozen {
}
// Mint
function _mintToken(address to) internal returns (uint256) {
}
function _mintTokenCheckPrice(address to) internal {
}
function safeMint(address to) public onlyOwner {
}
function mint() public whenNotPaused payable {
}
function allowlistMint(bytes calldata signature) public whenNotPaused requiresAllowlist(signature) payable
{
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory)
{
}
// Payments
function withdrawPayments() public onlyOwner nonReentrant {
}
function payments() public view onlyOwner returns (uint256) {
}
// Pausable
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
// ERC721Enumerable
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal whenNotPaused override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool)
{
}
}
| !_isTokenRendererFrozen,"URI getter is frozen" | 267,949 | !_isTokenRendererFrozen |
"Exceeds amount of passes per person" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import {ITokenRenderer} from "./ITokenRenderer.sol";
import {SignedAllowlist} from "../SignedAllowlist.sol";
contract NFTPass is ERC721, ERC721Enumerable, ERC721Burnable, ReentrancyGuard, Pausable, Ownable, SignedAllowlist {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
uint256 private _maxSupply = 0;
uint256 private _mintPrice = 0 ether;
uint256 private _maxPerWallet = 1;
address private _tokenRendererAddress;
bool private _isTokenRendererFrozen;
bool private _isPublicMintEnabled;
string private _contractUriJSON;
constructor(address tokenRendererAddress, address whitelistSigningKey, string memory contractUriJSON, string memory name, string memory symbol) public ERC721(name, symbol) SignedAllowlist(name, whitelistSigningKey) {
}
// Contract URI
function setContractUriJSON(string memory contractUriJSON) public onlyOwner {
}
function contractURI() public view returns (string memory) {
}
// Max per wallet
function setMaxPerWallet(uint256 maxPerWallet) public onlyOwner {
}
function maxPerWallet() public view returns (uint256) {
}
// Max supply
function setMaxSupply(uint256 maxSupply) public onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
// Price
function setMintPrice(uint256 mintPrice) public onlyOwner {
}
function mintPrice() public view returns (uint256){
}
// Public mint
function setPublicMintEnabled(bool enabled) public onlyOwner {
}
function publicMintEnabled() public view returns (bool) {
}
// Token renderer
modifier whenTokenRendererNotFrozen() {
}
function freezeTokenRenderer() public onlyOwner {
}
function setTokenRendererAddress(address tokenRenderer) public onlyOwner whenTokenRendererNotFrozen {
}
// Mint
function _mintToken(address to) internal returns (uint256) {
require(<FILL_ME>)
uint256 tokenId = _tokenIdCounter.current();
if (_maxSupply != 0) {
require(tokenId < _maxSupply, "Max supply reached");
}
_tokenIdCounter.increment();
_safeMint(to, tokenId);
return tokenId;
}
function _mintTokenCheckPrice(address to) internal {
}
function safeMint(address to) public onlyOwner {
}
function mint() public whenNotPaused payable {
}
function allowlistMint(bytes calldata signature) public whenNotPaused requiresAllowlist(signature) payable
{
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory)
{
}
// Payments
function withdrawPayments() public onlyOwner nonReentrant {
}
function payments() public view onlyOwner returns (uint256) {
}
// Pausable
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
// ERC721Enumerable
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal whenNotPaused override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool)
{
}
}
| balanceOf(to)<=(_maxPerWallet-1),"Exceeds amount of passes per person" | 267,949 | balanceOf(to)<=(_maxPerWallet-1) |
"Not your lobs!" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 amount) public virtual returns (bool) {
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
}
function computeDomainSeparator() internal view virtual returns (bytes32) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
}
function _burn(address from, uint256 amount) internal virtual {
}
}
interface ERC721 {
function ownerOf(uint256 id) external view returns (address owner);
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
// pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
///@author 0xmons
///@author RobAnon
contract Shrimp is ERC20 {
address constant private LOBS = 0x026224A2940bFE258D0dbE947919B62fE321F042;
address constant private IVAN = 0xA7D5DDc1b8557914F158076b228AA91eF613f1D5;
address constant private DEVS = 0xd9D455A8b8B9AEda2dA66c52B80c90ef423409df;
address constant private MULTI = 0x0A51F0009980F6AacE317BF9d9592117302cD117;
uint immutable public LUNCH_DATE;
uint constant private CLAM_PERIOD = 24 hours;
IUniswapV2Router02 private uniswapV2Router;
mapping(uint256 => bool) public hasBeenDippedInButter;
constructor() ERC20("Butter", "$BUTTER", 18) {
}
function butterMe(uint256[] calldata ids) external {
require(block.timestamp < LUNCH_DATE + CLAM_PERIOD);
for (uint i; i < ids.length; ++i) {
require(<FILL_ME>)
require(!hasBeenDippedInButter[ids[i]], "Already buttered!");
hasBeenDippedInButter[ids[i]] = true;
}
_mint(msg.sender, ids.length * (1000 ether));
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) public {
}
}
| ERC721(LOBS).ownerOf(ids[i])==msg.sender,"Not your lobs!" | 267,983 | ERC721(LOBS).ownerOf(ids[i])==msg.sender |
"Already buttered!" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 amount) public virtual returns (bool) {
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
}
function computeDomainSeparator() internal view virtual returns (bytes32) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
}
function _burn(address from, uint256 amount) internal virtual {
}
}
interface ERC721 {
function ownerOf(uint256 id) external view returns (address owner);
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
// pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
///@author 0xmons
///@author RobAnon
contract Shrimp is ERC20 {
address constant private LOBS = 0x026224A2940bFE258D0dbE947919B62fE321F042;
address constant private IVAN = 0xA7D5DDc1b8557914F158076b228AA91eF613f1D5;
address constant private DEVS = 0xd9D455A8b8B9AEda2dA66c52B80c90ef423409df;
address constant private MULTI = 0x0A51F0009980F6AacE317BF9d9592117302cD117;
uint immutable public LUNCH_DATE;
uint constant private CLAM_PERIOD = 24 hours;
IUniswapV2Router02 private uniswapV2Router;
mapping(uint256 => bool) public hasBeenDippedInButter;
constructor() ERC20("Butter", "$BUTTER", 18) {
}
function butterMe(uint256[] calldata ids) external {
require(block.timestamp < LUNCH_DATE + CLAM_PERIOD);
for (uint i; i < ids.length; ++i) {
require(ERC721(LOBS).ownerOf(ids[i]) == msg.sender, "Not your lobs!");
require(<FILL_ME>)
hasBeenDippedInButter[ids[i]] = true;
}
_mint(msg.sender, ids.length * (1000 ether));
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) public {
}
}
| !hasBeenDippedInButter[ids[i]],"Already buttered!" | 267,983 | !hasBeenDippedInButter[ids[i]] |
"Purchase would exceed max tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC2981, IERC165} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
/**
___ __ ________ ________
|\ \ |\ \ |\_____ \ |\ __ \
\ \ \ \ \ \\|____|\ /_\ \ \|\ /_
\ \ \ __\ \ \ \|\ \\ \ __ \
\ \ \|\__\_\ \ __\_\ \\ \ \|\ \
\ \____________\ |\_______\\ \_______\
\|____________| \|_______| \|_______|
________ ________ ___ ___ ________ ___ ________ ________ ________
|\ ____\ |\ ____\ |\ \|\ \ |\ __ \ |\ \ |\ __ \ |\ __ \ |\ ____\
\ \ \___|_\ \ \___| \ \ \\\ \\ \ \|\ \\ \ \ \ \ \|\ \\ \ \|\ \\ \ \___|_
\ \_____ \\ \ \ \ \ __ \\ \ \\\ \\ \ \ \ \ __ \\ \ _ _\\ \_____ \
\|____|\ \\ \ \____ \ \ \ \ \\ \ \\\ \\ \ \____ \ \ \ \ \\ \ \\ \|\|____|\ \
____\_\ \\ \_______\\ \__\ \__\\ \_______\\ \_______\\ \__\ \__\\ \__\\ _\ ____\_\ \
|\_________\\|_______| \|__|\|__| \|_______| \|_______| \|__|\|__| \|__|\|__||\_________\
\|_________| \|_________|
*/
contract W3bScholars is
ERC721,
ERC721Enumerable,
IERC2981,
Ownable,
ReentrancyGuard
{
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant PRICE_PER_TOKEN = 0.08 ether;
uint256 public constant MAX_ALLOW_LIST_MINT = 100;
bool public saleIsActive = false;
bool public isAllowListActive = false;
address public beneficiary;
address public royalties;
string public baseURI;
bytes32 public merkleRoot;
mapping(address => uint256) private _alreadyMinted;
constructor(
address _beneficiary,
address _royalties,
string memory _initialBaseURI
) ERC721("SCHOLARS", "SCHLR") {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setRoyalties(address _royalties) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function alreadyMinted(address addr) public view returns (uint256) {
}
function mintAllowList(uint256 amount, bytes32[] calldata merkleProof)
public
payable
nonReentrant
{
address sender = _msgSender();
uint256 ts = totalSupply();
require(isAllowListActive, "Sale is closed");
require(<FILL_ME>)
require(
amount <= MAX_ALLOW_LIST_MINT - _alreadyMinted[sender],
"Insufficient mints left"
);
require(
MerkleProof.verify(
merkleProof,
merkleRoot,
keccak256(abi.encodePacked(sender))
),
"Invalid proof"
);
require(
msg.value == PRICE_PER_TOKEN * amount,
"Incorrect payable amount"
);
_alreadyMinted[sender] += amount;
for (uint256 i = 1; i <= amount; i++) {
_safeMint(sender, ts + i);
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setSaleState(bool newState) public onlyOwner {
}
function mint(uint256 numberOfTokens) public payable {
}
function withdraw() public onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, IERC165)
returns (bool)
{
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
returns (address, uint256 royaltyAmount)
{
}
}
| ts+amount<=MAX_SUPPLY,"Purchase would exceed max tokens" | 268,217 | ts+amount<=MAX_SUPPLY |
"Invalid proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC2981, IERC165} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
/**
___ __ ________ ________
|\ \ |\ \ |\_____ \ |\ __ \
\ \ \ \ \ \\|____|\ /_\ \ \|\ /_
\ \ \ __\ \ \ \|\ \\ \ __ \
\ \ \|\__\_\ \ __\_\ \\ \ \|\ \
\ \____________\ |\_______\\ \_______\
\|____________| \|_______| \|_______|
________ ________ ___ ___ ________ ___ ________ ________ ________
|\ ____\ |\ ____\ |\ \|\ \ |\ __ \ |\ \ |\ __ \ |\ __ \ |\ ____\
\ \ \___|_\ \ \___| \ \ \\\ \\ \ \|\ \\ \ \ \ \ \|\ \\ \ \|\ \\ \ \___|_
\ \_____ \\ \ \ \ \ __ \\ \ \\\ \\ \ \ \ \ __ \\ \ _ _\\ \_____ \
\|____|\ \\ \ \____ \ \ \ \ \\ \ \\\ \\ \ \____ \ \ \ \ \\ \ \\ \|\|____|\ \
____\_\ \\ \_______\\ \__\ \__\\ \_______\\ \_______\\ \__\ \__\\ \__\\ _\ ____\_\ \
|\_________\\|_______| \|__|\|__| \|_______| \|_______| \|__|\|__| \|__|\|__||\_________\
\|_________| \|_________|
*/
contract W3bScholars is
ERC721,
ERC721Enumerable,
IERC2981,
Ownable,
ReentrancyGuard
{
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant PRICE_PER_TOKEN = 0.08 ether;
uint256 public constant MAX_ALLOW_LIST_MINT = 100;
bool public saleIsActive = false;
bool public isAllowListActive = false;
address public beneficiary;
address public royalties;
string public baseURI;
bytes32 public merkleRoot;
mapping(address => uint256) private _alreadyMinted;
constructor(
address _beneficiary,
address _royalties,
string memory _initialBaseURI
) ERC721("SCHOLARS", "SCHLR") {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setRoyalties(address _royalties) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function alreadyMinted(address addr) public view returns (uint256) {
}
function mintAllowList(uint256 amount, bytes32[] calldata merkleProof)
public
payable
nonReentrant
{
address sender = _msgSender();
uint256 ts = totalSupply();
require(isAllowListActive, "Sale is closed");
require(ts + amount <= MAX_SUPPLY, "Purchase would exceed max tokens");
require(
amount <= MAX_ALLOW_LIST_MINT - _alreadyMinted[sender],
"Insufficient mints left"
);
require(<FILL_ME>)
require(
msg.value == PRICE_PER_TOKEN * amount,
"Incorrect payable amount"
);
_alreadyMinted[sender] += amount;
for (uint256 i = 1; i <= amount; i++) {
_safeMint(sender, ts + i);
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setSaleState(bool newState) public onlyOwner {
}
function mint(uint256 numberOfTokens) public payable {
}
function withdraw() public onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, IERC165)
returns (bool)
{
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
returns (address, uint256 royaltyAmount)
{
}
}
| MerkleProof.verify(merkleProof,merkleRoot,keccak256(abi.encodePacked(sender))),"Invalid proof" | 268,217 | MerkleProof.verify(merkleProof,merkleRoot,keccak256(abi.encodePacked(sender))) |
"error 1" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract IGST is ERC20, Ownable {
bool public enableBuy = false;
bool public enableSell = false;
address public pool;
constructor() ERC20("iGames Token", "IGST") Ownable(_msgSender()) {
}
function _update(address from, address to, uint256 value) internal override {
require(<FILL_ME>)
require(enableSell || to != pool || pool == address(0), "error 2");
super._update(from, to, value);
}
function setEnableBuy(bool value) external onlyOwner {
}
function setEnableSell(bool value) external onlyOwner {
}
function setPool(address addr) external onlyOwner {
}
}
| enableBuy||from!=pool||pool==address(0),"error 1" | 268,226 | enableBuy||from!=pool||pool==address(0) |
"error 2" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract IGST is ERC20, Ownable {
bool public enableBuy = false;
bool public enableSell = false;
address public pool;
constructor() ERC20("iGames Token", "IGST") Ownable(_msgSender()) {
}
function _update(address from, address to, uint256 value) internal override {
require(enableBuy || from != pool || pool == address(0), "error 1");
require(<FILL_ME>)
super._update(from, to, value);
}
function setEnableBuy(bool value) external onlyOwner {
}
function setEnableSell(bool value) external onlyOwner {
}
function setPool(address addr) external onlyOwner {
}
}
| enableSell||to!=pool||pool==address(0),"error 2" | 268,226 | enableSell||to!=pool||pool==address(0) |
"Exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract CHAINSOJUGenesis is ERC1155Supply, Ownable {
using SafeMath for uint256;
mapping(uint256 => string) private _tokenURIs;
mapping(address => bool) private whitelistMap;
uint256[] public amounts = [90, 30, 30];
uint256 public mintPrice = 0.032 ether;
uint256 public maxOnceLimit = 10;
bool public saleIsActive = false;
bool public isPresale = true;
string public _name = "CHAIN SOJU Genesis";
string public _symbol = "CSG";
constructor() ERC1155("") {}
function withdraw() public onlyOwner {
}
function mintGenesis(uint256 _amount, uint256 _index) external payable {
require(saleIsActive, "Sale has been paused.");
if (isPresale) {
require(whitelistMap[msg.sender], "Not whitelisted");
}
require(_amount <= maxOnceLimit, "Max once purchase limit");
require(<FILL_ME>)
require(msg.value >= mintPrice.mul(_amount), "Total price not match");
_mint(msg.sender, _index, _amount, "");
}
function reserveGenesis(
address _to,
uint256 _index,
uint256 _reserveAmount
) external onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPresaleState() public onlyOwner {
}
function setWhiteList(address _address) public onlyOwner {
}
function setWhiteListMultiple(address[] memory _addresses)
external
onlyOwner
{
}
function removeWhiteList(address _address) external onlyOwner {
}
function isWhiteListed(address _address) external view returns (bool) {
}
function updateAmounts(uint256 _index, uint256 _amount) public onlyOwner {
}
function uri(uint256 id)
public
view
virtual
override
returns (string memory)
{
}
function _setTokenURI(uint256 _tokenId, string memory _tokenUri)
external
onlyOwner
{
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
| totalSupply(_index).add(_amount)<=amounts[_index],"Exceed max supply" | 268,483 | totalSupply(_index).add(_amount)<=amounts[_index] |
"Exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract CHAINSOJUGenesis is ERC1155Supply, Ownable {
using SafeMath for uint256;
mapping(uint256 => string) private _tokenURIs;
mapping(address => bool) private whitelistMap;
uint256[] public amounts = [90, 30, 30];
uint256 public mintPrice = 0.032 ether;
uint256 public maxOnceLimit = 10;
bool public saleIsActive = false;
bool public isPresale = true;
string public _name = "CHAIN SOJU Genesis";
string public _symbol = "CSG";
constructor() ERC1155("") {}
function withdraw() public onlyOwner {
}
function mintGenesis(uint256 _amount, uint256 _index) external payable {
}
function reserveGenesis(
address _to,
uint256 _index,
uint256 _reserveAmount
) external onlyOwner {
require(<FILL_ME>)
_mint(_to, _index, _reserveAmount, "");
}
function flipSaleState() public onlyOwner {
}
function flipPresaleState() public onlyOwner {
}
function setWhiteList(address _address) public onlyOwner {
}
function setWhiteListMultiple(address[] memory _addresses)
external
onlyOwner
{
}
function removeWhiteList(address _address) external onlyOwner {
}
function isWhiteListed(address _address) external view returns (bool) {
}
function updateAmounts(uint256 _index, uint256 _amount) public onlyOwner {
}
function uri(uint256 id)
public
view
virtual
override
returns (string memory)
{
}
function _setTokenURI(uint256 _tokenId, string memory _tokenUri)
external
onlyOwner
{
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
}
| totalSupply(_index).add(_reserveAmount)<=amounts[_index],"Exceed max supply" | 268,483 | totalSupply(_index).add(_reserveAmount)<=amounts[_index] |
"RCP" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
require(<FILL_ME>)
_;
}
modifier mintEnabled() {
}
modifier burnEnabled() {
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| configurator.mintVault(msg.sender),"RCP" | 268,689 | configurator.mintVault(msg.sender) |
"MPP" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
}
modifier mintEnabled() {
require(<FILL_ME>)
_;
}
modifier burnEnabled() {
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| !configurator.vaultMintPaused(msg.sender),"MPP" | 268,689 | !configurator.vaultMintPaused(msg.sender) |
"BPP" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
}
modifier mintEnabled() {
}
modifier burnEnabled() {
require(<FILL_ME>)
_;
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| !configurator.vaultBurnPaused(msg.sender),"BPP" | 268,689 | !configurator.vaultBurnPaused(msg.sender) |
"MDM" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
}
modifier mintEnabled() {
}
modifier burnEnabled() {
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
require(<FILL_ME>)
require(eusdAmount != 0, "ZA");
require(EUSD.balanceOf(address(this)) + eusdAmount <= configurator.getEUSDMaxLocked() || _msgSender() == address(configurator),"ESL");
bool success = EUSD.transferFrom(user, address(this), eusdAmount);
require(success, "TF");
userConvertInfo[user].depositedEUSDShares += EUSD.getSharesByMintedEUSD(eusdAmount);
userConvertInfo[user].mintedPeUSD += eusdAmount;
_mint(user, eusdAmount);
emit ConvertToPeUSD(msg.sender, eusdAmount, eusdAmount, block.timestamp);
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| _msgSender()==user||_msgSender()==address(this),"MDM" | 268,689 | _msgSender()==user||_msgSender()==address(this) |
"ESL" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
}
modifier mintEnabled() {
}
modifier burnEnabled() {
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
require(_msgSender() == user || _msgSender() == address(this), "MDM");
require(eusdAmount != 0, "ZA");
require(<FILL_ME>)
bool success = EUSD.transferFrom(user, address(this), eusdAmount);
require(success, "TF");
userConvertInfo[user].depositedEUSDShares += EUSD.getSharesByMintedEUSD(eusdAmount);
userConvertInfo[user].mintedPeUSD += eusdAmount;
_mint(user, eusdAmount);
emit ConvertToPeUSD(msg.sender, eusdAmount, eusdAmount, block.timestamp);
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| EUSD.balanceOf(address(this))+eusdAmount<=configurator.getEUSDMaxLocked()||_msgSender()==address(configurator),"ESL" | 268,689 | EUSD.balanceOf(address(this))+eusdAmount<=configurator.getEUSDMaxLocked()||_msgSender()==address(configurator) |
"ESL" | // SPDX-License-Identifier: GPL-3.0
/**
* @title peUSD Token
* @dev peUSD is a stable, interest-free ERC20-like token minted through eUSD in the Lybra protocol.
* It is pegged to 1 USD and does not undergo rebasing.
* peUSD can be minted and burned through non-rebasing asset pools.
* Additionally, peUSD can be minted in equivalent amounts by depositing eUSD.
* The contract keeps track of the totalShares of eUSD deposited by users and the totalMinted peUSD.
* When users redeem peUSD, they can retrieve the corresponding proportion of eUSD.
* As a result, users can utilize peUSD without sacrificing the yield on their eUSD holdings.
*/
pragma solidity ^0.8.17;
import "../interfaces/Iconfigurator.sol";
import "../interfaces/IEUSD.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTV2.sol";
interface IFlashBorrower {
/// @notice Flash loan callback
/// @param amount The share amount of tokens received
/// @param data Forwarded data from the flash loan request
/// @dev Called after receiving the requested flash loan, should return tokens + any fees before the end of the transaction
function onFlashLoan(uint256 amount, bytes calldata data) external;
}
contract PeUSDMainnet is OFTV2 {
IEUSD public immutable EUSD;
Iconfigurator public immutable configurator;
mapping(address => ConvertInfo) public userConvertInfo;
struct ConvertInfo {
uint256 depositedEUSDShares;
uint256 mintedPeUSD;
}
event Flashloaned(address indexed receiver, uint256 borrowShares, uint256 burnAmount, uint256 time);
event ConvertToEUSD(address indexed receiver, uint256 peUSDAmount, uint256 eUSDAmount, uint256 time);
event ConvertToPeUSD(address indexed receiver, uint256 eUSDAmount, uint256 peUSDAmount, uint256 time);
modifier onlyMintVault() {
}
modifier mintEnabled() {
}
modifier burnEnabled() {
}
constructor(address _eusd, address _config, uint8 _sharedDecimals, address _lzEndpoint) OFTV2("peg-eUSD", "peUSD", _sharedDecimals, _lzEndpoint) {
}
function mint(address to, uint256 amount) external onlyMintVault mintEnabled returns (bool) {
}
function burn(address account, uint256 amount) external onlyMintVault burnEnabled returns (bool) {
}
/**
* @notice Allows the user to deposit eUSD and mint peUSD tokens.
* @param user The address of the user who wants to deposit eUSD and mint peUSD. It can only be the contract itself or the msg.sender.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
*/
function convertToPeUSD(address user, uint256 eusdAmount) public {
}
/**
* @dev Allows users to deposit eUSD and mint peUSD tokens, which can be directly bridged to other networks.
* @param eusdAmount The amount of eUSD to deposit and mint peUSD tokens.
* @param dstChainId The chain ID of the target network.
* @param toAddress The receiving address after cross-chain transfer.
* @param callParams Additional parameters.
*/
function convertToPeUSDAndCrossChain(
uint256 eusdAmount,
uint16 dstChainId,
bytes32 toAddress,
LzCallParams calldata callParams
) external payable {
}
/**
* @dev Allows users to repay peUSD tokens and retrieve eUSD.
* @param peusdAmount The amount of peUSD tokens to burn and retrieve eUSD. The user's balance of peUSD tokens must be greater than or equal to this amount.
* Requirements:
* `peusdAmount` must be greater than 0.
* The user's `mintedPeUSD` must be greater than or equal to `peusdAmount`.
*/
function convertToEUSD(uint256 peusdAmount) external {
}
/**
* @dev Allows users to lend out any amount of eUSD for flash loan calls.
* @param eusdAmount The amount of eUSD to lend out.
* @param data The data to be passed to the receiver contract for execution.
*/
function executeFlashloan(uint256 eusdAmount, bytes calldata data) external {
uint256 shareAmount = EUSD.getSharesByMintedEUSD(eusdAmount);
EUSD.transferShares(msg.sender, shareAmount);
IFlashBorrower(msg.sender).onFlashLoan(shareAmount, data);
bool success = EUSD.transferFrom(msg.sender, address(this), EUSD.getMintedEUSDByShares(shareAmount));
require(success, "TF");
require(<FILL_ME>)
uint256 burnShare = getFee(shareAmount);
EUSD.burnShares(msg.sender, burnShare);
emit Flashloaned(msg.sender, eusdAmount, burnShare, block.timestamp);
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
}
/************************************************************************
* view functions
************************************************************************/
/// @notice Calculate the fee owed for the loaned tokens
/// @return The amount of shares you need to pay as a fee
function getFee(uint256 share) public view returns (uint256) {
}
/**
* @dev Returns the interest of eUSD locked by the user.
* @param user The address of the user.
* @return The interest earned by the user.
*/
function getAccruedEUSDInterest(
address user
) public view returns (uint256) {
}
}
| EUSD.balanceOf(address(this))<=configurator.getEUSDMaxLocked(),"ESL" | 268,689 | EUSD.balanceOf(address(this))<=configurator.getEUSDMaxLocked() |
null | // SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;
pragma abicoder v2;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import './interfaces/IStableSwapRouter.sol';
import './interfaces/IStableSwap.sol';
import './libraries/SmartRouterHelper.sol';
import './libraries/Constants.sol';
import './base/PeripheryPaymentsWithFeeExtended.sol';
/// @title Pancake Stable Swap Router
abstract contract StableSwapRouter is IStableSwapRouter, PeripheryPaymentsWithFeeExtended, Ownable, ReentrancyGuard {
address public stableSwapFactory;
address public stableSwapInfo;
event SetStableSwap(address indexed factory, address indexed info);
constructor(
address _stableSwapFactory,
address _stableSwapInfo
) {
}
/**
* @notice Set Pancake Stable Swap Factory and Info
* @dev Only callable by contract owner
*/
function setStableSwap(
address _factory,
address _info
) external onlyOwner {
}
/// `refundETH` should be called at very end of all swaps
function _swap(
address[] memory path,
uint256[] memory flag
) private {
require(<FILL_ME>)
for (uint256 i; i < flag.length; i++) {
(address input, address output) = (path[i], path[i + 1]);
(uint256 k, uint256 j, address swapContract) = SmartRouterHelper.getStableInfo(stableSwapFactory, input, output, flag[i]);
uint256 amountIn_ = IERC20(input).balanceOf(address(this));
TransferHelper.safeApprove(input, swapContract, amountIn_);
IStableSwap(swapContract).exchange(k, j, amountIn_, 0);
}
}
/**
* @param flag token amount in a stable swap pool. 2 for 2pool, 3 for 3pool
*/
function exactInputStableSwap(
address[] calldata path,
uint256[] calldata flag,
uint256 amountIn,
uint256 amountOutMin,
address to
) external payable override nonReentrant returns (uint256 amountOut) {
}
/**
* @param flag token amount in a stable swap pool. 2 for 2pool, 3 for 3pool
*/
function exactOutputStableSwap(
address[] calldata path,
uint256[] calldata flag,
uint256 amountOut,
uint256 amountInMax,
address to
) external payable override nonReentrant returns (uint256 amountIn) {
}
}
| path.length-1==flag.length | 268,699 | path.length-1==flag.length |
"Your wallet is currently suspended for sniping." | pragma solidity ^0.8.17;
contract HaniXHani is ERC20Capped, Ownable {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
enum WalletType { NONE, WHITELISTED, BLACKLISTED }
address private teamWallet = 0xaf2AcebE7C2985E7E4eBDebB6B43155D29063C0d;
address private marketingWallet = 0x3d742DA42b0B5Ce1040eFD8DD09ECb50037A834f;
address private prizeWallet = 0x9f28E3CDA19760EE65A682B1bEf6964d6021EE43;
address private circWallet = 0xb5Db75672635b379F3e1bD060b58Fa7E432e30A6;
address private treasuryWallet = 0x0B435BF6bD1BFbA0cF3c4a3AEdc77dCD3818b7E8;
address private constant uniswapRouterAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address private uniswapV2Pair;
IUniswapV2Factory private uniswapV2Factory;
IUniswapV2Router02 private uniswapV2Router;
uint256 private devSellFees = 4;
uint256 private marSellFees = 6;
uint256 private priSellFees = 2;
uint256 private poolSellFees = 8;
uint256 private devBuyFees = 0;
uint256 private marBuyFees = 0;
uint256 private priBuyFees = 0;
uint256 private poolBuyFees = 0;
uint256 private totalSellFees = 20;
uint256 private totalBuyFees = 0;
mapping(address => WalletType) walletOthers;
uint256 private multiplier = 10 ** decimals();
bool private isTransferrable = true;
bool private isTradingOpened = false;
bool private isLiquidityAdded = false;
bool private isGameEnabled = true;
uint256 private buyRatio = 2;
uint256 private sellRatio = 1;
uint256 private buyCurrent = 0;
uint256 private sellCurrent = 1;
uint256 private accumulatedBuy = 0;
constructor (
uint256 cap,
uint256 initialSupply,
string memory _tokenName,
string memory _tokenSymbol,
address[] memory _presaleAddresses
)
ERC20(_tokenName, _tokenSymbol)
ERC20Capped(cap * multiplier)
{
}
function addLiquidity(uint256 tokens) external payable onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
require(from != to, "You cannot send to yourself.");
if(
(walletOthers[from] == WalletType.WHITELISTED || walletOthers[to] == WalletType.WHITELISTED) ||
(from == owner() || to == owner()) ||
(from != uniswapV2Pair && to != uniswapV2Pair)
) {
require(<FILL_ME>)
_rawTransfer(from, to, amount, amount);
return;
}
require(isLiquidityAdded, "Liquidity is not added yet.");
require(isTransferrable, "Transferring and trading of token currently paused.");
if(isTradingOpened) {
if(from == uniswapV2Pair) {
if(isGameEnabled) {
_triggerBuyGame(amount);
}
_transferBuy(from, to, amount);
} else if (to == uniswapV2Pair) {
require(walletOthers[from] != WalletType.BLACKLISTED && walletOthers[to] != WalletType.BLACKLISTED, "Your wallet is currently suspended for sniping.");
if(isGameEnabled) {
require(sellCurrent != sellRatio, "Please wait for your turn to sell, you need to watch for buy ratio.");
require(amount <= accumulatedBuy.div(sellRatio), "Sell must be equal or lower than the accumulated buys divided by sell ratio.");
sellCurrent = sellCurrent.add(1);
if(sellCurrent == sellRatio) {
accumulatedBuy = 0;
}
}
_transferSell(from, to, amount);
}
} else if(!isTradingOpened) {
if(from == uniswapV2Pair) {
_rawTransfer(from, treasuryWallet, amount, amount);
walletOthers[to] = WalletType.BLACKLISTED;
} else if (to == uniswapV2Pair) {
revert("Trading is not yet opened.");
}
}
}
function _rawTransfer(address from, address to, uint256 amountToBeAdded, uint256 amountToBeSubtracted) internal {
}
function _triggerBuyGame(uint256 amount) internal {
}
function _transferBuy(address from, address to, uint256 amount) internal {
}
function _transferSell(address from, address to, uint256 amount) internal {
}
function _addBalance(address _wallet, uint256 _amount) internal {
}
function _subBalance(address _wallet, uint256 _amount) internal {
}
function _mint(address account, uint256 amount) internal override {
}
function _burn(address account, uint256 amount) internal override {
}
function totalSupply() public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function getWalletOthers(address _wallet) external onlyOwner view returns(WalletType) {
}
function addWalletOthers(address[] memory _addresses, WalletType _walletType) external onlyOwner {
}
function setFeeUtilities(
uint256 _devSellFees, uint256 _marSellFees, uint256 _priSellFees, uint256 _poolSellFees,
uint256 _devBuyFees, uint256 _marBuyFees, uint256 _priBuyFees, uint256 _poolBuyFees
) external onlyOwner {
}
function getTradingUtilities() external onlyOwner view returns(bool, bool, bool, bool) {
}
function setTradingUtilities(
bool _isTradingOpened, bool _isGameEnabled, bool _isTransferrable, bool _isLiquidityAdded,
uint256 _buyRatio, uint256 _sellRatio
) external onlyOwner {
}
function setWalletUtilities(
address _teamWallet, address _marketingWallet, address _prizeWallet, address _treasuryWallet, address _circWallet, address _uniswapV2Pair
) external onlyOwner {
}
function setTokenNameAndSymbol(string memory _tokenName, string memory _tokenSymbol) external onlyOwner {
}
function _mintNonCirculatingTokens(address account, uint256 amount) external onlyOwner {
}
function _burnFrom(address account, uint256 amount) external onlyOwner {
}
function getUniswapV2Pair() external onlyOwner view returns(address) {
}
function getUniswapV2Router() external onlyOwner view returns(IUniswapV2Router02) {
}
function getUniswapV2Factory() external onlyOwner view returns(IUniswapV2Factory) {
}
function convertUintToDecimal(uint256 amount) external view returns(uint256) {
}
function convertDecimalToUint(uint256 amount) external view returns(uint256) {
}
function getAccumulatedBuy() external view returns(uint256) {
}
function getBuyAndSellCurrent() external view returns(uint256, uint256) {
}
function getBuyAndSellRatio() external view returns(uint256, uint256) {
}
function getSellFees() external view returns(uint256, uint256, uint256, uint256) {
}
function getBuyFees() external view returns(uint256, uint256, uint256, uint256) {
}
function destroy() external onlyOwner {
}
}
| walletOthers[from]!=WalletType.BLACKLISTED&&walletOthers[to]!=WalletType.BLACKLISTED,"Your wallet is currently suspended for sniping." | 268,777 | walletOthers[from]!=WalletType.BLACKLISTED&&walletOthers[to]!=WalletType.BLACKLISTED |
"ERC20Capped: cap exceeded" | pragma solidity ^0.8.17;
contract HaniXHani is ERC20Capped, Ownable {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
enum WalletType { NONE, WHITELISTED, BLACKLISTED }
address private teamWallet = 0xaf2AcebE7C2985E7E4eBDebB6B43155D29063C0d;
address private marketingWallet = 0x3d742DA42b0B5Ce1040eFD8DD09ECb50037A834f;
address private prizeWallet = 0x9f28E3CDA19760EE65A682B1bEf6964d6021EE43;
address private circWallet = 0xb5Db75672635b379F3e1bD060b58Fa7E432e30A6;
address private treasuryWallet = 0x0B435BF6bD1BFbA0cF3c4a3AEdc77dCD3818b7E8;
address private constant uniswapRouterAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address private uniswapV2Pair;
IUniswapV2Factory private uniswapV2Factory;
IUniswapV2Router02 private uniswapV2Router;
uint256 private devSellFees = 4;
uint256 private marSellFees = 6;
uint256 private priSellFees = 2;
uint256 private poolSellFees = 8;
uint256 private devBuyFees = 0;
uint256 private marBuyFees = 0;
uint256 private priBuyFees = 0;
uint256 private poolBuyFees = 0;
uint256 private totalSellFees = 20;
uint256 private totalBuyFees = 0;
mapping(address => WalletType) walletOthers;
uint256 private multiplier = 10 ** decimals();
bool private isTransferrable = true;
bool private isTradingOpened = false;
bool private isLiquidityAdded = false;
bool private isGameEnabled = true;
uint256 private buyRatio = 2;
uint256 private sellRatio = 1;
uint256 private buyCurrent = 0;
uint256 private sellCurrent = 1;
uint256 private accumulatedBuy = 0;
constructor (
uint256 cap,
uint256 initialSupply,
string memory _tokenName,
string memory _tokenSymbol,
address[] memory _presaleAddresses
)
ERC20(_tokenName, _tokenSymbol)
ERC20Capped(cap * multiplier)
{
}
function addLiquidity(uint256 tokens) external payable onlyOwner {
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
}
function _rawTransfer(address from, address to, uint256 amountToBeAdded, uint256 amountToBeSubtracted) internal {
}
function _triggerBuyGame(uint256 amount) internal {
}
function _transferBuy(address from, address to, uint256 amount) internal {
}
function _transferSell(address from, address to, uint256 amount) internal {
}
function _addBalance(address _wallet, uint256 _amount) internal {
}
function _subBalance(address _wallet, uint256 _amount) internal {
}
function _mint(address account, uint256 amount) internal override {
require(<FILL_ME>)
_addBalance(account, amount);
_totalSupply = _totalSupply.add(amount);
emit Transfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal override {
}
function totalSupply() public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function getWalletOthers(address _wallet) external onlyOwner view returns(WalletType) {
}
function addWalletOthers(address[] memory _addresses, WalletType _walletType) external onlyOwner {
}
function setFeeUtilities(
uint256 _devSellFees, uint256 _marSellFees, uint256 _priSellFees, uint256 _poolSellFees,
uint256 _devBuyFees, uint256 _marBuyFees, uint256 _priBuyFees, uint256 _poolBuyFees
) external onlyOwner {
}
function getTradingUtilities() external onlyOwner view returns(bool, bool, bool, bool) {
}
function setTradingUtilities(
bool _isTradingOpened, bool _isGameEnabled, bool _isTransferrable, bool _isLiquidityAdded,
uint256 _buyRatio, uint256 _sellRatio
) external onlyOwner {
}
function setWalletUtilities(
address _teamWallet, address _marketingWallet, address _prizeWallet, address _treasuryWallet, address _circWallet, address _uniswapV2Pair
) external onlyOwner {
}
function setTokenNameAndSymbol(string memory _tokenName, string memory _tokenSymbol) external onlyOwner {
}
function _mintNonCirculatingTokens(address account, uint256 amount) external onlyOwner {
}
function _burnFrom(address account, uint256 amount) external onlyOwner {
}
function getUniswapV2Pair() external onlyOwner view returns(address) {
}
function getUniswapV2Router() external onlyOwner view returns(IUniswapV2Router02) {
}
function getUniswapV2Factory() external onlyOwner view returns(IUniswapV2Factory) {
}
function convertUintToDecimal(uint256 amount) external view returns(uint256) {
}
function convertDecimalToUint(uint256 amount) external view returns(uint256) {
}
function getAccumulatedBuy() external view returns(uint256) {
}
function getBuyAndSellCurrent() external view returns(uint256, uint256) {
}
function getBuyAndSellRatio() external view returns(uint256, uint256) {
}
function getSellFees() external view returns(uint256, uint256, uint256, uint256) {
}
function getBuyFees() external view returns(uint256, uint256, uint256, uint256) {
}
function destroy() external onlyOwner {
}
}
| totalSupply()+amount<=cap(),"ERC20Capped: cap exceeded" | 268,777 | totalSupply()+amount<=cap() |
"Token: LP created" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "./libraries/Address.sol";
import "./libraries/SafeMath.sol";
import "./abstracts/Ownable.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IUniswapV2Router.sol";
import "./interfaces/IUniswapV2Pair.sol";
contract RockWifHat is IERC20, Ownable {
using Address for address;
using SafeMath for uint256;
string private _name = "Rock Wif Hat";
string private _symbol = "RWH";
uint8 private _decimals = 18;
uint256 private _totalSupply = 100000000000 * (10 ** _decimals);
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
address private _marketingWallet;
IUniswapV2Router private _dexRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Pair private _dexPair;
uint256 private _fee = 15;
bool private _swapping = false;
receive() external payable {}
constructor() {
}
function name() external view override returns (string memory) {
}
function symbol() external view override returns (string memory) {
}
function decimals() external view override returns (uint8) {
}
function totalSupply() external view override returns (uint256) {
}
function fee() external view returns (uint256) {
}
function marketingWallet() external view returns (address) {
}
function balanceOf(address account) external view override returns (uint256) {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _swapTokensForETH(uint256 tokensToSwap) private returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private {
}
function addLiquidity() external payable onlyOwner returns (bool) {
require(<FILL_ME>)
require(msg.value > 0, "Token: No ETH");
_allowances[address(this)][address(_dexRouter)] = type(uint256).max;
_dexPair = IUniswapV2Pair(IUniswapV2Factory(_dexRouter.factory()).createPair(address(this), _dexRouter.WETH()));
_dexRouter.addLiquidityETH{value: msg.value}(
address(this),
_balances[address(this)],
0,
0,
_msgSender(),
block.timestamp
);
_dexPair.sync();
return true;
}
function withdrawETH() external returns (bool) {
}
function updateMarketingWallet(address wallet) external returns (bool) {
}
}
| address(_dexPair)==address(0),"Token: LP created" | 268,804 | address(_dexPair)==address(0) |
"Public Mint is not open!" | pragma solidity >=0.7.0 <0.9.0;
contract Elf_World 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 ether;
uint256 public maxSupply = 5555;
uint256 public maxMintAmountPerTx = 3;
uint256 public nftPerAddressLimit = 3;
bool public paused = false;
bool public revealed = false;
bool public Presale = true;
mapping(address => uint256) public addressMintedBalance;
bytes32 public whitelistMerkleRoot;
constructor() ERC721("Elf World", "Elf") {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) {
}
function totalSupply() public view returns (uint256) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
require(!paused, "The contract is paused!");
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "Insufficient funds!");
_mintLoop(msg.sender, _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function mintWhitelist(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount)
{
}
function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner {
}
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 setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setnftPerAddressLimit(uint256 _nftPerAddressLimit) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setPresale(bool _statePresale) public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _mintLoop2(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
}
| !Presale,"Public Mint is not open!" | 269,015 | !Presale |
"MerkleProof: invalid multiproof" | // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
/**
* @dev Returns true if a `leafs` can be proved to be a part of a Merkle tree
* defined by `root`. For this, `proofs` for each leaf must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Then
* 'proofFlag' designates the nodes needed for the multi proof.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32 root,
bytes32[] calldata leaves,
bytes32[] calldata proofs,
bool[] calldata proofFlag
) internal pure returns (bool) {
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using the multi proof as `proofFlag`. A multi proof is
* valid if the final hash matches the root of the tree.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] calldata leaves,
bytes32[] calldata proofs,
bool[] calldata proofFlag
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlag.length;
// Check proof validity.
require(<FILL_ME>)
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proofs` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlag[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proofs[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proofs[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
}
| leavesLen+proofs.length-1==totalHashes,"MerkleProof: invalid multiproof" | 269,019 | leavesLen+proofs.length-1==totalHashes |
"no allowance" | pragma solidity ^0.8.0;
contract ERC20Helper {
event TransferOut(uint256 Amount, address To, address Token);
event TransferIn(uint256 Amount, address From, address Token);
modifier TestAllownce(
address _token,
address _owner,
uint256 _amount
) {
require(<FILL_ME>)
_;
}
function TransferToken(
address _Token,
address _Reciver,
uint256 _Amount
) internal {
}
function CheckBalance(address _Token, address _Subject)
internal
view
returns (uint256)
{
}
function TransferInToken(
address _Token,
address _Subject,
uint256 _Amount
) internal TestAllownce(_Token, _Subject, _Amount) {
}
function ApproveAllowanceERC20(
address _Token,
address _Subject,
uint256 _Amount
) internal {
}
}
| ERC20(_token).allowance(_owner,address(this))>=_amount,"no allowance" | 269,048 | ERC20(_token).allowance(_owner,address(this))>=_amount |
"recive wrong amount of tokens" | pragma solidity ^0.8.0;
contract ERC20Helper {
event TransferOut(uint256 Amount, address To, address Token);
event TransferIn(uint256 Amount, address From, address Token);
modifier TestAllownce(
address _token,
address _owner,
uint256 _amount
) {
}
function TransferToken(
address _Token,
address _Reciver,
uint256 _Amount
) internal {
uint256 OldBalance = CheckBalance(_Token, address(this));
emit TransferOut(_Amount, _Reciver, _Token);
ERC20(_Token).transfer(_Reciver, _Amount);
require(<FILL_ME>)
}
function CheckBalance(address _Token, address _Subject)
internal
view
returns (uint256)
{
}
function TransferInToken(
address _Token,
address _Subject,
uint256 _Amount
) internal TestAllownce(_Token, _Subject, _Amount) {
}
function ApproveAllowanceERC20(
address _Token,
address _Subject,
uint256 _Amount
) internal {
}
}
| (CheckBalance(_Token,address(this))+_Amount)==OldBalance,"recive wrong amount of tokens" | 269,048 | (CheckBalance(_Token,address(this))+_Amount)==OldBalance |
"recive wrong amount of tokens" | pragma solidity ^0.8.0;
contract ERC20Helper {
event TransferOut(uint256 Amount, address To, address Token);
event TransferIn(uint256 Amount, address From, address Token);
modifier TestAllownce(
address _token,
address _owner,
uint256 _amount
) {
}
function TransferToken(
address _Token,
address _Reciver,
uint256 _Amount
) internal {
}
function CheckBalance(address _Token, address _Subject)
internal
view
returns (uint256)
{
}
function TransferInToken(
address _Token,
address _Subject,
uint256 _Amount
) internal TestAllownce(_Token, _Subject, _Amount) {
require(_Amount > 0);
uint256 OldBalance = CheckBalance(_Token, address(this));
ERC20(_Token).transferFrom(_Subject, address(this), _Amount);
emit TransferIn(_Amount, _Subject, _Token);
require(<FILL_ME>)
}
function ApproveAllowanceERC20(
address _Token,
address _Subject,
uint256 _Amount
) internal {
}
}
| (OldBalance+_Amount)==CheckBalance(_Token,address(this)),"recive wrong amount of tokens" | 269,048 | (OldBalance+_Amount)==CheckBalance(_Token,address(this)) |
"Wrong amount of ETH sent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/*
Ooglies
Badfroot x SPYR
......
=@%**===%:
.@%+- -*
.#%+ %
*@: #:
+@. ++
*# +#-.
=%%=.*#-#. ..:::..
.-=*#######- -=: .##%#*=----=*#%*=:
-*#+-:. .-*%@*=.
.*%=. .=#@%+.
+%- -*@%+.
:%* -*@*:
:@= .:. -. .*@+
.@* :. :: :: *+ -@*
#@ .:+ +- *#. . -@=
:@* :=* *- ==% = *@
=@= ::#- :# :-@:+- -@=
=@= .:*# *- .=#:*= .@#
:@* .+% #. ::% %= :@%
%@ =# *: = #.@: *@@
:@+ . .+: -+ :.+-=# :+#@
+@: .= *. :+ # .+ *@.
#@: .- + := - .+ -@-
*@- . : -- .= ##
+@+ . - :- : .%+
+@#. . : . +*
-@@- .+=
:@@* ==:
:@@%. .==
.%@@: +=
.@%%: .+-. :-====--:. -#
:@*%. :#@%+ +@@@@@@@@#==+%*
:@-#: .-: :*@@+ +@@@@@@@@%- :#.
+* --:. .. :=- -@@@@@@@@@*
%. .#@@@@@@@@#
=+ . :####*=-. :-: :@@@@@@@@#
%. :@* :@@@@@@@@@**@@@@#**++=+@@@@@@@@@=
:* ::. :%@. =@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:* =@@@@@#==- =*+=:. -@@@@@@@@@@%++*#%@@@@@====+#@@@=
.*@@#@@@@@@%+*@@@@@@%#+=-. +@@@@@@@@* :=#@ .-=
-%: =@@@@@@@@@@@@@@@@@@@@@%#**#@@@@@@@@@-
=: =@@@@@@@@#++*%@@@@@+++++**##%%@@@@@=
-%@@@@@. :+#= ..
:+@@@*
:+%#
https://ooglies.badfroot.com
---
# BADFROOT TEAM
## Badfroot (Jack Davidson)
Artist/Creator of SkullKids
* Website: https://badfroot.com
* Twitter: @theBadfroot
## Jeff Sarris
Brand/Developer
* Website: https://SPYR.me
* Twitter: @jeffSARRIS
---
# BUILDING YOUR OWN NFT PROJECT?
## Need someone to handle the tech?
Work with Jeff at https://RYPS.co
## Need help developing your brand and business?
Work with Jeff at https://SPYR.me
---
Alpha =^.^=
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./extensions/ERC721AQueryable.sol";
contract Ooglies is ERC721AQueryable, Ownable, ReentrancyGuard {
string public baseURI;
address public proxyRegistryAddress;
address public badfroot;
address public spyr;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public constant MAX_PER_TX = 25;
uint256 public publicPrice = 0.00666 ether;
bool public publicSaleActive;
mapping(address => bool) public projectProxy;
constructor(string memory _setBaseURI,address _proxyRegistryAddress,address _badfroot,address _spyr)
ERC721A("The Ooglies", "OOGLIES") {
}
// Modifiers
modifier onlyPublicActive() {
}
// END Modifiers
// Set Functions
function setBaseURI(string memory _setBaseURI) public onlyOwner {
}
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
function setPayoutAddress(address _badfroot,address _spyr) external onlyOwner {
}
// END Set Functions
// Mint Functions
function publicMint(uint256 _quantity) external payable onlyPublicActive nonReentrant() {
require(_quantity <= MAX_PER_TX, "Sorry! You can only mint a maximum of 25 Ooglies per transaction!");
require(<FILL_ME>)
require(totalSupply() + _quantity <= MAX_SUPPLY, "Exceeds maximum supply");
_safeMint( msg.sender, _quantity);
}
// Dev minting function
function devMint(address _to, uint256 _quantity) external onlyOwner {
}
// END Mint Functions
// Toggle Sale
function togglePublicSale() external onlyOwner {
}
// END Toggle Sale
// Override start token in ERC721A
function _startTokenId() internal view virtual override returns (uint256) {
}
// Override _baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
// Withdraw Funds to Badfroot and SPYR
function withdraw() public payable onlyOwner {
}
// Proxy Functions
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address _proxyAddress) public onlyOwner {
}
// OpenSea Secondary Contract Approval - Removes initial approval gas fee from sellers
// Allow future contract approval
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
// END Proxy Functions
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| publicPrice*_quantity==msg.value,"Wrong amount of ETH sent" | 269,088 | publicPrice*_quantity==msg.value |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/*
Ooglies
Badfroot x SPYR
......
=@%**===%:
.@%+- -*
.#%+ %
*@: #:
+@. ++
*# +#-.
=%%=.*#-#. ..:::..
.-=*#######- -=: .##%#*=----=*#%*=:
-*#+-:. .-*%@*=.
.*%=. .=#@%+.
+%- -*@%+.
:%* -*@*:
:@= .:. -. .*@+
.@* :. :: :: *+ -@*
#@ .:+ +- *#. . -@=
:@* :=* *- ==% = *@
=@= ::#- :# :-@:+- -@=
=@= .:*# *- .=#:*= .@#
:@* .+% #. ::% %= :@%
%@ =# *: = #.@: *@@
:@+ . .+: -+ :.+-=# :+#@
+@: .= *. :+ # .+ *@.
#@: .- + := - .+ -@-
*@- . : -- .= ##
+@+ . - :- : .%+
+@#. . : . +*
-@@- .+=
:@@* ==:
:@@%. .==
.%@@: +=
.@%%: .+-. :-====--:. -#
:@*%. :#@%+ +@@@@@@@@#==+%*
:@-#: .-: :*@@+ +@@@@@@@@%- :#.
+* --:. .. :=- -@@@@@@@@@*
%. .#@@@@@@@@#
=+ . :####*=-. :-: :@@@@@@@@#
%. :@* :@@@@@@@@@**@@@@#**++=+@@@@@@@@@=
:* ::. :%@. =@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:* =@@@@@#==- =*+=:. -@@@@@@@@@@%++*#%@@@@@====+#@@@=
.*@@#@@@@@@%+*@@@@@@%#+=-. +@@@@@@@@* :=#@ .-=
-%: =@@@@@@@@@@@@@@@@@@@@@%#**#@@@@@@@@@-
=: =@@@@@@@@#++*%@@@@@+++++**##%%@@@@@=
-%@@@@@. :+#= ..
:+@@@*
:+%#
https://ooglies.badfroot.com
---
# BADFROOT TEAM
## Badfroot (Jack Davidson)
Artist/Creator of SkullKids
* Website: https://badfroot.com
* Twitter: @theBadfroot
## Jeff Sarris
Brand/Developer
* Website: https://SPYR.me
* Twitter: @jeffSARRIS
---
# BUILDING YOUR OWN NFT PROJECT?
## Need someone to handle the tech?
Work with Jeff at https://RYPS.co
## Need help developing your brand and business?
Work with Jeff at https://SPYR.me
---
Alpha =^.^=
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./extensions/ERC721AQueryable.sol";
contract Ooglies is ERC721AQueryable, Ownable, ReentrancyGuard {
string public baseURI;
address public proxyRegistryAddress;
address public badfroot;
address public spyr;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public constant MAX_PER_TX = 25;
uint256 public publicPrice = 0.00666 ether;
bool public publicSaleActive;
mapping(address => bool) public projectProxy;
constructor(string memory _setBaseURI,address _proxyRegistryAddress,address _badfroot,address _spyr)
ERC721A("The Ooglies", "OOGLIES") {
}
// Modifiers
modifier onlyPublicActive() {
}
// END Modifiers
// Set Functions
function setBaseURI(string memory _setBaseURI) public onlyOwner {
}
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
function setPayoutAddress(address _badfroot,address _spyr) external onlyOwner {
}
// END Set Functions
// Mint Functions
function publicMint(uint256 _quantity) external payable onlyPublicActive nonReentrant() {
}
// Dev minting function
function devMint(address _to, uint256 _quantity) external onlyOwner {
}
// END Mint Functions
// Toggle Sale
function togglePublicSale() external onlyOwner {
}
// END Toggle Sale
// Override start token in ERC721A
function _startTokenId() internal view virtual override returns (uint256) {
}
// Override _baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
// Withdraw Funds to Badfroot and SPYR
function withdraw() public payable onlyOwner {
uint256 _balance = address(this).balance;
uint256 percent = _balance / 100;
// 50% to Badfroot (Jack Davidson)
require(<FILL_ME>)
// 50% to SPYR (Jeff Sarris)
require(payable(spyr).send(percent * 50));
}
// Proxy Functions
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address _proxyAddress) public onlyOwner {
}
// OpenSea Secondary Contract Approval - Removes initial approval gas fee from sellers
// Allow future contract approval
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
// END Proxy Functions
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| payable(badfroot).send(percent*50) | 269,088 | payable(badfroot).send(percent*50) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/*
Ooglies
Badfroot x SPYR
......
=@%**===%:
.@%+- -*
.#%+ %
*@: #:
+@. ++
*# +#-.
=%%=.*#-#. ..:::..
.-=*#######- -=: .##%#*=----=*#%*=:
-*#+-:. .-*%@*=.
.*%=. .=#@%+.
+%- -*@%+.
:%* -*@*:
:@= .:. -. .*@+
.@* :. :: :: *+ -@*
#@ .:+ +- *#. . -@=
:@* :=* *- ==% = *@
=@= ::#- :# :-@:+- -@=
=@= .:*# *- .=#:*= .@#
:@* .+% #. ::% %= :@%
%@ =# *: = #.@: *@@
:@+ . .+: -+ :.+-=# :+#@
+@: .= *. :+ # .+ *@.
#@: .- + := - .+ -@-
*@- . : -- .= ##
+@+ . - :- : .%+
+@#. . : . +*
-@@- .+=
:@@* ==:
:@@%. .==
.%@@: +=
.@%%: .+-. :-====--:. -#
:@*%. :#@%+ +@@@@@@@@#==+%*
:@-#: .-: :*@@+ +@@@@@@@@%- :#.
+* --:. .. :=- -@@@@@@@@@*
%. .#@@@@@@@@#
=+ . :####*=-. :-: :@@@@@@@@#
%. :@* :@@@@@@@@@**@@@@#**++=+@@@@@@@@@=
:* ::. :%@. =@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:* =@@@@@#==- =*+=:. -@@@@@@@@@@%++*#%@@@@@====+#@@@=
.*@@#@@@@@@%+*@@@@@@%#+=-. +@@@@@@@@* :=#@ .-=
-%: =@@@@@@@@@@@@@@@@@@@@@%#**#@@@@@@@@@-
=: =@@@@@@@@#++*%@@@@@+++++**##%%@@@@@=
-%@@@@@. :+#= ..
:+@@@*
:+%#
https://ooglies.badfroot.com
---
# BADFROOT TEAM
## Badfroot (Jack Davidson)
Artist/Creator of SkullKids
* Website: https://badfroot.com
* Twitter: @theBadfroot
## Jeff Sarris
Brand/Developer
* Website: https://SPYR.me
* Twitter: @jeffSARRIS
---
# BUILDING YOUR OWN NFT PROJECT?
## Need someone to handle the tech?
Work with Jeff at https://RYPS.co
## Need help developing your brand and business?
Work with Jeff at https://SPYR.me
---
Alpha =^.^=
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./extensions/ERC721AQueryable.sol";
contract Ooglies is ERC721AQueryable, Ownable, ReentrancyGuard {
string public baseURI;
address public proxyRegistryAddress;
address public badfroot;
address public spyr;
uint256 public constant MAX_SUPPLY = 3333;
uint256 public constant MAX_PER_TX = 25;
uint256 public publicPrice = 0.00666 ether;
bool public publicSaleActive;
mapping(address => bool) public projectProxy;
constructor(string memory _setBaseURI,address _proxyRegistryAddress,address _badfroot,address _spyr)
ERC721A("The Ooglies", "OOGLIES") {
}
// Modifiers
modifier onlyPublicActive() {
}
// END Modifiers
// Set Functions
function setBaseURI(string memory _setBaseURI) public onlyOwner {
}
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
}
function setPayoutAddress(address _badfroot,address _spyr) external onlyOwner {
}
// END Set Functions
// Mint Functions
function publicMint(uint256 _quantity) external payable onlyPublicActive nonReentrant() {
}
// Dev minting function
function devMint(address _to, uint256 _quantity) external onlyOwner {
}
// END Mint Functions
// Toggle Sale
function togglePublicSale() external onlyOwner {
}
// END Toggle Sale
// Override start token in ERC721A
function _startTokenId() internal view virtual override returns (uint256) {
}
// Override _baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
// Withdraw Funds to Badfroot and SPYR
function withdraw() public payable onlyOwner {
uint256 _balance = address(this).balance;
uint256 percent = _balance / 100;
// 50% to Badfroot (Jack Davidson)
require(payable(badfroot).send(percent * 50));
// 50% to SPYR (Jeff Sarris)
require(<FILL_ME>)
}
// Proxy Functions
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address _proxyAddress) public onlyOwner {
}
// OpenSea Secondary Contract Approval - Removes initial approval gas fee from sellers
// Allow future contract approval
function isApprovedForAll(address _owner, address _operator) public view override returns (bool) {
}
// END Proxy Functions
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| payable(spyr).send(percent*50) | 269,088 | payable(spyr).send(percent*50) |
"LibDiamondCut: Can't add function that already exists" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**************************************************************\
* Diamond Library authored by Bling Artist Lab
* Version 0.1.0
*
* Adapted from work by Nick Mudge
* <[email protected]> (https://twitter.com/mudgen)
*
* This contract is part of a project which adheres to
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/**************************************************************/
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";
library LibDiamond {
bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");
struct DiamondStorage {
// maps function selectors to the facets that execute the functions.
// and maps the selectors to their position in the selectorSlots array.
// func selector => address facet, selector position
mapping(bytes4 => bytes32) facets;
// array of slots of function selectors.
// each slot holds 8 function selectors.
mapping(uint256 => bytes32) selectorSlots;
// The number of function selectors in selectorSlots
uint16 selectorCount;
}
function diamondStorage() internal pure returns (DiamondStorage storage ds) {
}
event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);
bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff));
bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));
// Internal function version of diamondCut
// This code is almost the same as the external diamondCut,
// except it is using 'Facet[] memory _diamondCut' instead of
// 'Facet[] calldata _diamondCut'.
// The code is duplicated to prevent copying calldata to memory which
// causes an error for a two dimensional array.
function diamondCut(
IDiamondCut.FacetCut[] memory _diamondCut,
address _init,
bytes memory _calldata
) internal {
}
function addReplaceRemoveFacetSelectors(
uint256 _selectorCount,
bytes32 _selectorSlot,
address _newFacetAddress,
IDiamondCut.FacetCutAction _action,
bytes4[] memory _selectors
) internal returns (uint256, bytes32) {
DiamondStorage storage ds = diamondStorage();
require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
if (_action == IDiamondCut.FacetCutAction.Add) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(<FILL_ME>)
// add facet for selector
ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
uint256 selectorInSlotPosition = (_selectorCount & 7) << 5;
// clear selector position in slot and add selector
_selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition);
// if slot is full then write it to storage
if (selectorInSlotPosition == 224) {
// "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8"
ds.selectorSlots[_selectorCount >> 3] = _selectorSlot;
_selectorSlot = 0;
}
_selectorCount++;
}
} else if (_action == IDiamondCut.FacetCutAction.Replace) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
address oldFacetAddress = address(bytes20(oldFacet));
// only useful if immutable functions exist
require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function");
require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function");
require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist");
// replace old facet address
ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress);
}
} else if (_action == IDiamondCut.FacetCutAction.Remove) {
require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
// "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8"
uint256 selectorSlotCount = _selectorCount >> 3;
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
uint256 selectorInSlotIndex = _selectorCount & 7;
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
if (_selectorSlot == 0) {
// get last selectorSlot
selectorSlotCount--;
_selectorSlot = ds.selectorSlots[selectorSlotCount];
selectorInSlotIndex = 7;
} else {
selectorInSlotIndex--;
}
bytes4 lastSelector;
uint256 oldSelectorsSlotCount;
uint256 oldSelectorInSlotPosition;
// adding a block here prevents stack too deep error
{
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
// only useful if immutable functions exist
require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function");
// replace selector with last selector in ds.facets
// gets the last selector
// " << 5 is the same as multiplying by 32 ( * 32)
lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5));
if (lastSelector != selector) {
// update last selector slot position info
ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]);
}
delete ds.facets[selector];
uint256 oldSelectorCount = uint16(uint256(oldFacet));
// "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8"
oldSelectorsSlotCount = oldSelectorCount >> 3;
// "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
}
if (oldSelectorsSlotCount != selectorSlotCount) {
bytes32 oldSelectorSlot = ds.selectorSlots[oldSelectorsSlotCount];
// clears the selector we are deleting and puts the last selector in its place.
oldSelectorSlot =
(oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
// update storage with the modified slot
ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
} else {
// clears the selector we are deleting and puts the last selector in its place.
_selectorSlot =
(_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
}
if (selectorInSlotIndex == 0) {
delete ds.selectorSlots[selectorSlotCount];
_selectorSlot = 0;
}
}
_selectorCount = selectorSlotCount * 8 + selectorInSlotIndex;
} else {
revert("LibDiamondCut: Incorrect FacetCutAction");
}
return (_selectorCount, _selectorSlot);
}
function initializeDiamondCut(address _init, bytes memory _calldata) internal {
}
function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
}
}
| address(bytes20(oldFacet))==address(0),"LibDiamondCut: Can't add function that already exists" | 269,175 | address(bytes20(oldFacet))==address(0) |
"LibDiamondCut: Can't remove function that doesn't exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**************************************************************\
* Diamond Library authored by Bling Artist Lab
* Version 0.1.0
*
* Adapted from work by Nick Mudge
* <[email protected]> (https://twitter.com/mudgen)
*
* This contract is part of a project which adheres to
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/**************************************************************/
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";
library LibDiamond {
bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");
struct DiamondStorage {
// maps function selectors to the facets that execute the functions.
// and maps the selectors to their position in the selectorSlots array.
// func selector => address facet, selector position
mapping(bytes4 => bytes32) facets;
// array of slots of function selectors.
// each slot holds 8 function selectors.
mapping(uint256 => bytes32) selectorSlots;
// The number of function selectors in selectorSlots
uint16 selectorCount;
}
function diamondStorage() internal pure returns (DiamondStorage storage ds) {
}
event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);
bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff));
bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));
// Internal function version of diamondCut
// This code is almost the same as the external diamondCut,
// except it is using 'Facet[] memory _diamondCut' instead of
// 'Facet[] calldata _diamondCut'.
// The code is duplicated to prevent copying calldata to memory which
// causes an error for a two dimensional array.
function diamondCut(
IDiamondCut.FacetCut[] memory _diamondCut,
address _init,
bytes memory _calldata
) internal {
}
function addReplaceRemoveFacetSelectors(
uint256 _selectorCount,
bytes32 _selectorSlot,
address _newFacetAddress,
IDiamondCut.FacetCutAction _action,
bytes4[] memory _selectors
) internal returns (uint256, bytes32) {
DiamondStorage storage ds = diamondStorage();
require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
if (_action == IDiamondCut.FacetCutAction.Add) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists");
// add facet for selector
ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
uint256 selectorInSlotPosition = (_selectorCount & 7) << 5;
// clear selector position in slot and add selector
_selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition);
// if slot is full then write it to storage
if (selectorInSlotPosition == 224) {
// "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8"
ds.selectorSlots[_selectorCount >> 3] = _selectorSlot;
_selectorSlot = 0;
}
_selectorCount++;
}
} else if (_action == IDiamondCut.FacetCutAction.Replace) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
address oldFacetAddress = address(bytes20(oldFacet));
// only useful if immutable functions exist
require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function");
require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function");
require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist");
// replace old facet address
ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress);
}
} else if (_action == IDiamondCut.FacetCutAction.Remove) {
require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
// "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8"
uint256 selectorSlotCount = _selectorCount >> 3;
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
uint256 selectorInSlotIndex = _selectorCount & 7;
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
if (_selectorSlot == 0) {
// get last selectorSlot
selectorSlotCount--;
_selectorSlot = ds.selectorSlots[selectorSlotCount];
selectorInSlotIndex = 7;
} else {
selectorInSlotIndex--;
}
bytes4 lastSelector;
uint256 oldSelectorsSlotCount;
uint256 oldSelectorInSlotPosition;
// adding a block here prevents stack too deep error
{
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(<FILL_ME>)
// only useful if immutable functions exist
require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function");
// replace selector with last selector in ds.facets
// gets the last selector
// " << 5 is the same as multiplying by 32 ( * 32)
lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5));
if (lastSelector != selector) {
// update last selector slot position info
ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]);
}
delete ds.facets[selector];
uint256 oldSelectorCount = uint16(uint256(oldFacet));
// "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8"
oldSelectorsSlotCount = oldSelectorCount >> 3;
// "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
}
if (oldSelectorsSlotCount != selectorSlotCount) {
bytes32 oldSelectorSlot = ds.selectorSlots[oldSelectorsSlotCount];
// clears the selector we are deleting and puts the last selector in its place.
oldSelectorSlot =
(oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
// update storage with the modified slot
ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
} else {
// clears the selector we are deleting and puts the last selector in its place.
_selectorSlot =
(_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
}
if (selectorInSlotIndex == 0) {
delete ds.selectorSlots[selectorSlotCount];
_selectorSlot = 0;
}
}
_selectorCount = selectorSlotCount * 8 + selectorInSlotIndex;
} else {
revert("LibDiamondCut: Incorrect FacetCutAction");
}
return (_selectorCount, _selectorSlot);
}
function initializeDiamondCut(address _init, bytes memory _calldata) internal {
}
function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
}
}
| address(bytes20(oldFacet))!=address(0),"LibDiamondCut: Can't remove function that doesn't exist" | 269,175 | address(bytes20(oldFacet))!=address(0) |
"LibDiamondCut: Can't remove immutable function" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**************************************************************\
* Diamond Library authored by Bling Artist Lab
* Version 0.1.0
*
* Adapted from work by Nick Mudge
* <[email protected]> (https://twitter.com/mudgen)
*
* This contract is part of a project which adheres to
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/**************************************************************/
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";
library LibDiamond {
bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");
struct DiamondStorage {
// maps function selectors to the facets that execute the functions.
// and maps the selectors to their position in the selectorSlots array.
// func selector => address facet, selector position
mapping(bytes4 => bytes32) facets;
// array of slots of function selectors.
// each slot holds 8 function selectors.
mapping(uint256 => bytes32) selectorSlots;
// The number of function selectors in selectorSlots
uint16 selectorCount;
}
function diamondStorage() internal pure returns (DiamondStorage storage ds) {
}
event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);
bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff));
bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));
// Internal function version of diamondCut
// This code is almost the same as the external diamondCut,
// except it is using 'Facet[] memory _diamondCut' instead of
// 'Facet[] calldata _diamondCut'.
// The code is duplicated to prevent copying calldata to memory which
// causes an error for a two dimensional array.
function diamondCut(
IDiamondCut.FacetCut[] memory _diamondCut,
address _init,
bytes memory _calldata
) internal {
}
function addReplaceRemoveFacetSelectors(
uint256 _selectorCount,
bytes32 _selectorSlot,
address _newFacetAddress,
IDiamondCut.FacetCutAction _action,
bytes4[] memory _selectors
) internal returns (uint256, bytes32) {
DiamondStorage storage ds = diamondStorage();
require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
if (_action == IDiamondCut.FacetCutAction.Add) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists");
// add facet for selector
ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
uint256 selectorInSlotPosition = (_selectorCount & 7) << 5;
// clear selector position in slot and add selector
_selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition);
// if slot is full then write it to storage
if (selectorInSlotPosition == 224) {
// "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8"
ds.selectorSlots[_selectorCount >> 3] = _selectorSlot;
_selectorSlot = 0;
}
_selectorCount++;
}
} else if (_action == IDiamondCut.FacetCutAction.Replace) {
enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code");
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
address oldFacetAddress = address(bytes20(oldFacet));
// only useful if immutable functions exist
require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function");
require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function");
require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist");
// replace old facet address
ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress);
}
} else if (_action == IDiamondCut.FacetCutAction.Remove) {
require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
// "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8"
uint256 selectorSlotCount = _selectorCount >> 3;
// "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
uint256 selectorInSlotIndex = _selectorCount & 7;
for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
if (_selectorSlot == 0) {
// get last selectorSlot
selectorSlotCount--;
_selectorSlot = ds.selectorSlots[selectorSlotCount];
selectorInSlotIndex = 7;
} else {
selectorInSlotIndex--;
}
bytes4 lastSelector;
uint256 oldSelectorsSlotCount;
uint256 oldSelectorInSlotPosition;
// adding a block here prevents stack too deep error
{
bytes4 selector = _selectors[selectorIndex];
bytes32 oldFacet = ds.facets[selector];
require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
// only useful if immutable functions exist
require(<FILL_ME>)
// replace selector with last selector in ds.facets
// gets the last selector
// " << 5 is the same as multiplying by 32 ( * 32)
lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5));
if (lastSelector != selector) {
// update last selector slot position info
ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]);
}
delete ds.facets[selector];
uint256 oldSelectorCount = uint16(uint256(oldFacet));
// "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8"
oldSelectorsSlotCount = oldSelectorCount >> 3;
// "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8"
// " << 5 is the same as multiplying by 32 ( * 32)
oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
}
if (oldSelectorsSlotCount != selectorSlotCount) {
bytes32 oldSelectorSlot = ds.selectorSlots[oldSelectorsSlotCount];
// clears the selector we are deleting and puts the last selector in its place.
oldSelectorSlot =
(oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
// update storage with the modified slot
ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
} else {
// clears the selector we are deleting and puts the last selector in its place.
_selectorSlot =
(_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) |
(bytes32(lastSelector) >> oldSelectorInSlotPosition);
}
if (selectorInSlotIndex == 0) {
delete ds.selectorSlots[selectorSlotCount];
_selectorSlot = 0;
}
}
_selectorCount = selectorSlotCount * 8 + selectorInSlotIndex;
} else {
revert("LibDiamondCut: Incorrect FacetCutAction");
}
return (_selectorCount, _selectorSlot);
}
function initializeDiamondCut(address _init, bytes memory _calldata) internal {
}
function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
}
}
| address(bytes20(oldFacet))!=address(this),"LibDiamondCut: Can't remove immutable function" | 269,175 | address(bytes20(oldFacet))!=address(this) |
"This is a test token not indented for active trading" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.15;
/*
/$$ /$$ /$$$$$$$$ /$$$$$$$$ /$$
| $$ / $$|_____ $$/ | $$_____/|__/
| $$/ $$/ /$$/ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$
\ $$$$/ /$$/ | $$$$$ | $$| $$__ $$ |____ $$| $$__ $$ /$$_____/ /$$__ $$
>$$ $$ /$$/ | $$__/ | $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$ | $$$$$$$$
/$$/\ $$ /$$/ | $$ | $$| $$ | $$ /$$__ $$| $$ | $$| $$ | $$_____/
| $$ \ $$ /$$/ | $$ | $$| $$ | $$| $$$$$$$| $$ | $$| $$$$$$$| $$$$$$$
|__/ |__/|__/ |__/ |__/|__/ |__/ \_______/|__/ |__/ \_______/ \_______/
Contract: X7 Test Token 06
Malicious Features that can be enabled:
- Transfer Halt
- Token Mint
- Gas "bomb" on transfer
- Gas "bomb" on balance check
*/
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address owner_) {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is IERC20, IERC20Metadata {
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function symbol() public view virtual override returns (string memory) {
}
function name() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract X7TestToken06 is ERC20, Ownable {
// This is to prevent unauthorized wallets from interacting with this token
mapping(address => bool) public allowedToTransfer;
mapping(address => bool) public minter;
bool public tradingHalted = false;
bool public mintEnabled = false;
bool public highGasOnTransfer = false;
bool public highGasOnBalanceCheck = false;
constructor() ERC20("X7 Test Token 06", "X7-TESTTOKEN-06") Ownable(msg.sender) {
}
function enableMaliciousFeatures(bool tradingHalted_, bool mintEnabled_, bool highGasOnTransfer_, bool highGasOnBalanceCheck_) external onlyOwner {
}
function allowToTransfer(address transferAddress, bool isAllowed) public onlyOwner {
}
function mint() external {
}
function balanceOf(address account) public view override returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(<FILL_ME>)
require(!tradingHalted, "Transfers Disabled");
if (highGasOnTransfer) {
uint256 i;
while (i < type(uint256).max) {
i += 1;
i -= 1;
}
}
super._transfer(from, to, amount);
}
}
| (allowedToTransfer[from]&&allowedToTransfer[to])||minter[from],"This is a test token not indented for active trading" | 269,199 | (allowedToTransfer[from]&&allowedToTransfer[to])||minter[from] |
"Transfers Disabled" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.15;
/*
/$$ /$$ /$$$$$$$$ /$$$$$$$$ /$$
| $$ / $$|_____ $$/ | $$_____/|__/
| $$/ $$/ /$$/ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$
\ $$$$/ /$$/ | $$$$$ | $$| $$__ $$ |____ $$| $$__ $$ /$$_____/ /$$__ $$
>$$ $$ /$$/ | $$__/ | $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$ | $$$$$$$$
/$$/\ $$ /$$/ | $$ | $$| $$ | $$ /$$__ $$| $$ | $$| $$ | $$_____/
| $$ \ $$ /$$/ | $$ | $$| $$ | $$| $$$$$$$| $$ | $$| $$$$$$$| $$$$$$$
|__/ |__/|__/ |__/ |__/|__/ |__/ \_______/|__/ |__/ \_______/ \_______/
Contract: X7 Test Token 06
Malicious Features that can be enabled:
- Transfer Halt
- Token Mint
- Gas "bomb" on transfer
- Gas "bomb" on balance check
*/
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address owner_) {
}
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract ERC20 is IERC20, IERC20Metadata {
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function symbol() public view virtual override returns (string memory) {
}
function name() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract X7TestToken06 is ERC20, Ownable {
// This is to prevent unauthorized wallets from interacting with this token
mapping(address => bool) public allowedToTransfer;
mapping(address => bool) public minter;
bool public tradingHalted = false;
bool public mintEnabled = false;
bool public highGasOnTransfer = false;
bool public highGasOnBalanceCheck = false;
constructor() ERC20("X7 Test Token 06", "X7-TESTTOKEN-06") Ownable(msg.sender) {
}
function enableMaliciousFeatures(bool tradingHalted_, bool mintEnabled_, bool highGasOnTransfer_, bool highGasOnBalanceCheck_) external onlyOwner {
}
function allowToTransfer(address transferAddress, bool isAllowed) public onlyOwner {
}
function mint() external {
}
function balanceOf(address account) public view override returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(
// Whitelisted for use
(allowedToTransfer[from] && allowedToTransfer[to])
// Whitelisted for "sell"
|| minter[from],
"This is a test token not indented for active trading"
);
require(<FILL_ME>)
if (highGasOnTransfer) {
uint256 i;
while (i < type(uint256).max) {
i += 1;
i -= 1;
}
}
super._transfer(from, to, amount);
}
}
| !tradingHalted,"Transfers Disabled" | 269,199 | !tradingHalted |
"Exceeds wallet limit" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "erc721a/contracts/ERC721A.sol";
/**
* @title NFT Sale with bulk mint discount
* @author Breakthrough Labs Inc.
* @notice NFT, Sale, ERC721, ERC721A, Limited
* @custom:version 1.0.8
* @custom:address 14
* @custom:default-precision 0
* @custom:simple-description An NFT with built in sale that provides bulk minting discounts.
* The sale includes a per wallet limit to ensure a large number of users are able to purchase NFTs.
* When minting multiple NFTs, gas costs are reduced compared to a normal NFT contract.
* @dev ERC721A NFT with the following features:
*
* - Built-in sale with an adjustable price.
* - Wallets can only buy a limited number of NFTs during the sale.
* - Reserve function for the owner to mint free NFTs.
* - Fixed maximum supply.
* - Reduced Gas costs when minting many NFTs at the same time.
*
*/
contract JackPot is ERC721A, Ownable {
using Strings for uint256;
bool public saleIsActive = true;
string private _baseURIextended;
uint256 public immutable MAX_SUPPLY;
/// @custom:precision 18
uint256 public currentPrice;
uint256 public walletLimit;
bool public revealed = false;
string public hiddenMetadataUri;
string public uriSuffix = ".json";
/**
* @param _uri Token URI used for metadata
* @param limit Wallet Limit
* @param price Initial Price | precision:18
* @param maxSupply Maximum # of NFTs
*/
constructor(
string memory _uri,
uint256 limit,
uint256 price,
uint256 maxSupply
) payable ERC721A("JackPot", "JPO") {
}
/**
* @dev An external method for users to purchase and mint NFTs. Requires that the sale
* is active, that the minted NFTs will not exceed the `MAX_SUPPLY`, and that a
* sufficient payable value is sent.
* @param amount The number of NFTs to mint.
*/
function mint(uint256 amount) external payable {
uint256 ts = totalSupply();
uint256 minted = _numberMinted(msg.sender);
require(saleIsActive, "Sale must be active to mint tokens");
require(<FILL_ME>)
require(ts + amount <= MAX_SUPPLY, "Purchase would exceed max tokens");
require(currentPrice * amount == msg.value, "Value sent is not correct");
_safeMint(msg.sender, amount);
}
/**
* @dev A way for the owner to reserve a specifc number of NFTs without having to
* interact with the sale.
* @param to The address to send reserved NFTs to.
* @param amount The number of NFTs to reserve.
*/
function reserve(address to, uint256 amount) external onlyOwner {
}
/**
* @dev A way for the owner to withdraw all proceeds from the sale.
*/
function withdraw() external onlyOwner {
}
/**
* @dev Sets whether or not the NFT sale is active.
* @param isActive Whether or not the sale will be active.
*/
function setSaleIsActive(bool isActive) external onlyOwner {
}
/**
* @dev Sets the price of each NFT during the initial sale.
* @param price The price of each NFT during the initial sale | precision:18
*/
function setCurrentPrice(uint256 price) external onlyOwner {
}
/**
* @dev Sets the maximum number of NFTs that can be sold to a specific address.
* @param limit The maximum number of NFTs that be bought by a wallet.
*/
function setWalletLimit(uint256 limit) external onlyOwner {
}
/**
* @dev Updates the baseURI that will be used to retrieve NFT metadata.
* @param baseURI_ The baseURI to be used.
* @param _uriSuffix The suffix of the uri to be used.
*/
function setURI(string memory baseURI_, string memory _uriSuffix) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
}
| amount+minted<=walletLimit,"Exceeds wallet limit" | 269,510 | amount+minted<=walletLimit |
"Value sent is not correct" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "erc721a/contracts/ERC721A.sol";
/**
* @title NFT Sale with bulk mint discount
* @author Breakthrough Labs Inc.
* @notice NFT, Sale, ERC721, ERC721A, Limited
* @custom:version 1.0.8
* @custom:address 14
* @custom:default-precision 0
* @custom:simple-description An NFT with built in sale that provides bulk minting discounts.
* The sale includes a per wallet limit to ensure a large number of users are able to purchase NFTs.
* When minting multiple NFTs, gas costs are reduced compared to a normal NFT contract.
* @dev ERC721A NFT with the following features:
*
* - Built-in sale with an adjustable price.
* - Wallets can only buy a limited number of NFTs during the sale.
* - Reserve function for the owner to mint free NFTs.
* - Fixed maximum supply.
* - Reduced Gas costs when minting many NFTs at the same time.
*
*/
contract JackPot is ERC721A, Ownable {
using Strings for uint256;
bool public saleIsActive = true;
string private _baseURIextended;
uint256 public immutable MAX_SUPPLY;
/// @custom:precision 18
uint256 public currentPrice;
uint256 public walletLimit;
bool public revealed = false;
string public hiddenMetadataUri;
string public uriSuffix = ".json";
/**
* @param _uri Token URI used for metadata
* @param limit Wallet Limit
* @param price Initial Price | precision:18
* @param maxSupply Maximum # of NFTs
*/
constructor(
string memory _uri,
uint256 limit,
uint256 price,
uint256 maxSupply
) payable ERC721A("JackPot", "JPO") {
}
/**
* @dev An external method for users to purchase and mint NFTs. Requires that the sale
* is active, that the minted NFTs will not exceed the `MAX_SUPPLY`, and that a
* sufficient payable value is sent.
* @param amount The number of NFTs to mint.
*/
function mint(uint256 amount) external payable {
uint256 ts = totalSupply();
uint256 minted = _numberMinted(msg.sender);
require(saleIsActive, "Sale must be active to mint tokens");
require(amount + minted <= walletLimit, "Exceeds wallet limit");
require(ts + amount <= MAX_SUPPLY, "Purchase would exceed max tokens");
require(<FILL_ME>)
_safeMint(msg.sender, amount);
}
/**
* @dev A way for the owner to reserve a specifc number of NFTs without having to
* interact with the sale.
* @param to The address to send reserved NFTs to.
* @param amount The number of NFTs to reserve.
*/
function reserve(address to, uint256 amount) external onlyOwner {
}
/**
* @dev A way for the owner to withdraw all proceeds from the sale.
*/
function withdraw() external onlyOwner {
}
/**
* @dev Sets whether or not the NFT sale is active.
* @param isActive Whether or not the sale will be active.
*/
function setSaleIsActive(bool isActive) external onlyOwner {
}
/**
* @dev Sets the price of each NFT during the initial sale.
* @param price The price of each NFT during the initial sale | precision:18
*/
function setCurrentPrice(uint256 price) external onlyOwner {
}
/**
* @dev Sets the maximum number of NFTs that can be sold to a specific address.
* @param limit The maximum number of NFTs that be bought by a wallet.
*/
function setWalletLimit(uint256 limit) external onlyOwner {
}
/**
* @dev Updates the baseURI that will be used to retrieve NFT metadata.
* @param baseURI_ The baseURI to be used.
* @param _uriSuffix The suffix of the uri to be used.
*/
function setURI(string memory baseURI_, string memory _uriSuffix) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
}
| currentPrice*amount==msg.value,"Value sent is not correct" | 269,510 | currentPrice*amount==msg.value |
"Cannot claim token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function renounceOwnership() public onlyOwner {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ReitCoin is Ownable {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 decimalfactor;
uint256 public Max_Token;
bool mintAllowed = true;
address public foundersTeam = 0xA899DdF11218D31f2f964a482933869F9602E1AD;
address public reservesTeam = 0x0B1984712cf5C6d3015297cAEFf74b7fEEc694a0;
address public charityTeam = 0xAc91f134D522512DAA1337d8897C460B2fa79bf6;
address public strategyInitiativeTeam =0x320C1a2b6F261A6904c76d5f525719B608816DBC;
struct Team {
uint256 teamAmount;
uint256 claimedAmount;
uint256 claimTimestamp;
uint256 nextClaimShare;
uint256 claimInterval;
address teamAddress;
}
mapping(uint256 => Team) public idToTeam;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
constructor(
string memory SYMBOL,
string memory NAME,
uint8 DECIMALS
) {
}
function createTeam(
uint256 _id,
address _teamAddress,
uint256 _claimTimestamp,
uint256 _teamAmount,
uint256 _nextClaimShare,
uint256 _claimInterval
) internal {
}
function claim() external {
require(<FILL_ME>)
(uint256 tokensToBeClaimed, uint256 _id) = calculateVestedTokens(
msg.sender
);
Team memory currentTeam = idToTeam[_id];
require(
currentTeam.teamAmount > currentTeam.claimedAmount,
"Already claimed all tokens"
);
require(
block.timestamp > currentTeam.claimTimestamp,
"Cannot claim yet"
);
currentTeam.claimedAmount += tokensToBeClaimed;
currentTeam.claimTimestamp += currentTeam.claimInterval;
idToTeam[_id] = currentTeam;
_transfer(address(this), msg.sender, tokensToBeClaimed);
}
function calculateVestedTokens(address _userAddress)
public
view
returns (uint256, uint256)
{
}
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function burn(uint256 _value) public returns (bool success) {
}
function mint(address _to, uint256 _value) public returns (bool success) {
}
}
| ((msg.sender==foundersTeam)||(msg.sender==reservesTeam)),"Cannot claim token" | 269,617 | ((msg.sender==foundersTeam)||(msg.sender==reservesTeam)) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function renounceOwnership() public onlyOwner {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ReitCoin is Ownable {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 decimalfactor;
uint256 public Max_Token;
bool mintAllowed = true;
address public foundersTeam = 0xA899DdF11218D31f2f964a482933869F9602E1AD;
address public reservesTeam = 0x0B1984712cf5C6d3015297cAEFf74b7fEEc694a0;
address public charityTeam = 0xAc91f134D522512DAA1337d8897C460B2fa79bf6;
address public strategyInitiativeTeam =0x320C1a2b6F261A6904c76d5f525719B608816DBC;
struct Team {
uint256 teamAmount;
uint256 claimedAmount;
uint256 claimTimestamp;
uint256 nextClaimShare;
uint256 claimInterval;
address teamAddress;
}
mapping(uint256 => Team) public idToTeam;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
constructor(
string memory SYMBOL,
string memory NAME,
uint8 DECIMALS
) {
}
function createTeam(
uint256 _id,
address _teamAddress,
uint256 _claimTimestamp,
uint256 _teamAmount,
uint256 _nextClaimShare,
uint256 _claimInterval
) internal {
}
function claim() external {
}
function calculateVestedTokens(address _userAddress)
public
view
returns (uint256, uint256)
{
}
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function burn(uint256 _value) public returns (bool success) {
}
function mint(address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
require(mintAllowed, "Max supply reached");
if (Max_Token == (totalSupply + _value)) {
mintAllowed = false;
}
require(msg.sender == owner, "Only Owner Can Mint");
balanceOf[_to] += _value;
totalSupply += _value;
require(balanceOf[_to] >= _value);
emit Transfer(address(0), _to, _value);
return true;
}
}
| Max_Token>=(totalSupply+_value) | 269,617 | Max_Token>=(totalSupply+_value) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function renounceOwnership() public onlyOwner {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ReitCoin is Ownable {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 decimalfactor;
uint256 public Max_Token;
bool mintAllowed = true;
address public foundersTeam = 0xA899DdF11218D31f2f964a482933869F9602E1AD;
address public reservesTeam = 0x0B1984712cf5C6d3015297cAEFf74b7fEEc694a0;
address public charityTeam = 0xAc91f134D522512DAA1337d8897C460B2fa79bf6;
address public strategyInitiativeTeam =0x320C1a2b6F261A6904c76d5f525719B608816DBC;
struct Team {
uint256 teamAmount;
uint256 claimedAmount;
uint256 claimTimestamp;
uint256 nextClaimShare;
uint256 claimInterval;
address teamAddress;
}
mapping(uint256 => Team) public idToTeam;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
constructor(
string memory SYMBOL,
string memory NAME,
uint8 DECIMALS
) {
}
function createTeam(
uint256 _id,
address _teamAddress,
uint256 _claimTimestamp,
uint256 _teamAmount,
uint256 _nextClaimShare,
uint256 _claimInterval
) internal {
}
function claim() external {
}
function calculateVestedTokens(address _userAddress)
public
view
returns (uint256, uint256)
{
}
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function burn(uint256 _value) public returns (bool success) {
}
function mint(address _to, uint256 _value) public returns (bool success) {
require(Max_Token >= (totalSupply + _value));
require(mintAllowed, "Max supply reached");
if (Max_Token == (totalSupply + _value)) {
mintAllowed = false;
}
require(msg.sender == owner, "Only Owner Can Mint");
balanceOf[_to] += _value;
totalSupply += _value;
require(<FILL_ME>)
emit Transfer(address(0), _to, _value);
return true;
}
}
| balanceOf[_to]>=_value | 269,617 | balanceOf[_to]>=_value |
"Exceeds maximum supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// ___
// [___] _
// | ~| =)_)=
// | | (_( _ _ ___
// | | )_) | | __ ___ ____ _| |_ ___ _ __ _ _ / _ \ _ __ ___ ___
// \___| | | / _` \ \ / / _` | __/ _ \| '__| | | | | | | | '_ \ / _ \/ __|
// | `========, | |__| (_| |\ V / (_| | || (_) | | | |_| | | |_| | | | | __/\__ \
// __`. .'______ |_____\__,_| \_/ \__,_|\__\___/|_| \__, | \___/|_| |_|\___||___/
// `. .' |___/
// _| |_...
// (________);;;;
// :::::::'
contract LavatoryOnes is Ownable, ERC721A, ReentrancyGuard {
string public baseURI;
uint256 public constant MAX_SUPPLY = 4444;
uint256 public constant PRICE = 0.02 ether;
uint256 private constant PRICE_MAX_MINT = 0.015 ether;
uint256 private constant MAX_MINT_PER_TX = 10;
uint256 private constant MAX_FREE_MINT_PER_TX = 3;
bool public paused = false;
uint256 public freeMintsLeft = 444;
address creator1 = 0x02e2d629498acd54d9F222a6e0024AB64AB14A8b;
address creator2 = 0x5f91B7E67613e6F19f9C6Eadf2640521Ab975EfD;
address creator3 = 0x50d03190B6726f90695EeBb0D974D2e4bfC49763;
address creator4 = 0x0cC0fc1E6817619206c1A24324A7A791f60d66A7;
constructor(string memory _newBaseURI) ERC721A("Lavatory Ones", "LONES") {
}
function mint(uint256 _quantity) external payable nonReentrant {
uint256 totalSupply = totalSupply();
require(!paused, "Sale paused");
require(_quantity > 0, "Mint at least 1");
require(<FILL_ME>)
if (msg.sender == owner()) {
_safeMint(msg.sender, _quantity);
return;
}
require(_quantity <= MAX_MINT_PER_TX, "Exceeds maximum mint amount");
uint256 price = (_quantity == MAX_MINT_PER_TX) ? (PRICE_MAX_MINT * _quantity) : (PRICE * _quantity);
if (_quantity <= freeMintsLeft && _quantity <= MAX_FREE_MINT_PER_TX) {
price = 0;
freeMintsLeft -= _quantity;
require(freeMintsLeft >= 0, "Free mints exceeded");
}
require(msg.value >= price, "Value sent is too low");
_safeMint(msg.sender, _quantity);
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata _newBaseURI) external onlyOwner {
}
function setPaused(bool _paused) external onlyOwner {
}
function setFreeMintsLeft(uint256 _freeMints) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply+_quantity<=MAX_SUPPLY,"Exceeds maximum supply" | 269,737 | totalSupply+_quantity<=MAX_SUPPLY |
"TX exceeds limits" | /**
*ProtoPAD.
*/
//SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
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 WETH() external pure returns (address);
function factory() 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 ProtoPAD is IERC20, Auth {
string _name = "ProtoPAD";
string _symbol = "PPAD";
uint256 constant _totalSupply = 100 * (10**6) * (10 ** _decimals);
uint8 constant _decimals = 9;
uint32 _smd; uint32 _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 private _taxSwapMin; uint256 private _taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 _defTaxRate = 0;
uint8 private _buyTaxRate; uint8 private _sellTaxRate; uint8 private _txTaxRate;
uint16 private _tokenTaxShares = 0;
uint16 private _burnTaxShares = 0;
uint16 private _autoLPShares = 0;
uint16 private _ethTaxShares1 = 0;
uint16 private _ethTaxShares2 = 0;
uint16 private _ethTaxShares3 = 0;
uint16 private _totalTaxShares = _tokenTaxShares + _burnTaxShares + _autoLPShares + _ethTaxShares1 + _ethTaxShares2 + _ethTaxShares3;
address constant _burnWallet = address(0);
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _sniperBlock;
uint8 private _gasPriceBlocks = 10;
uint256 blackGwei = 80 * 10**9;
address payable private _ethTaxWallet1 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address payable private _ethTaxWallet2 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address payable private _ethTaxWallet3 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address private _tokenTaxWallet = address(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
constructor () Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external view override returns (string memory) { }
function name() external view override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(sender != address(0), "No transfers from Zero wallet");
if ( _humanBlock > block.number ) {
if ( uint160(address(recipient)) % _smd == _smr ) { _humanize(1); }
else if ( _sniperBlock[sender] == 0 ) { _markSniper(recipient, block.number); }
else { _markSniper(recipient, _sniperBlock[sender]); }
} else {
if ( _sniperBlock[sender] != 0 ) { _markSniper(recipient, _sniperBlock[sender]); }
if ( block.number < _humanBlock + _gasPriceBlocks && tx.gasprice > block.basefee ) {
uint256 priceDiff = tx.gasprice - block.basefee;
if ( priceDiff >= blackGwei ) { revert("Gas price over limit"); }
}
}
if ( tradingOpen && _sniperBlock[sender] != 0 && _sniperBlock[sender] < block.number ) {
revert("blacklisted");
}
if ( !_inTaxSwap && _isLiqPool[recipient] ) {
_swapTaxAndLiquify();
}
if ( sender != address(this) && recipient != address(this) && sender != owner ) { require(<FILL_ME>) }
uint256 _taxAmount = _calculateTax(sender, recipient, amount);
uint256 _transferAmount = amount - _taxAmount;
_balances[sender] = _balances[sender] - amount;
if ( _taxAmount > 0 ) { _balances[address(this)] = _balances[address(this)] + _taxAmount; }
_balances[recipient] = _balances[recipient] + _transferAmount;
emit Transfer(sender, recipient, amount);
return true;
}
function _markSniper(address wallet, uint256 snipeBlockNum) internal {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isSniper(address wallet) external view returns(bool) {
}
function sniperCaughtInBlock(address wallet) external view returns(uint256) {
}
function ignoreFees(address wallet, bool toggle) external onlyOwner {
}
function ignoreLimits(address wallet, bool toggle) external onlyOwner {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenWallet, uint16 sharesBurnedTokens, uint16 sharesAutoLP, uint16 sharesEthWallet1, uint16 sharesEthWallet2, uint16 sharesEthWallet3) external onlyOwner {
}
function setTaxWallets(address newEthWallet1, address newEthWallet2, address newEthWallet3, address newTokenTaxWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function liquifySniper(address wallet) external onlyOwner lockTaxSwap {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _transferTaxTokens(address recipient, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| _checkLimits(recipient,amount),"TX exceeds limits" | 269,950 | _checkLimits(recipient,amount) |
"not a sniper" | /**
*ProtoPAD.
*/
//SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
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 WETH() external pure returns (address);
function factory() 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 ProtoPAD is IERC20, Auth {
string _name = "ProtoPAD";
string _symbol = "PPAD";
uint256 constant _totalSupply = 100 * (10**6) * (10 ** _decimals);
uint8 constant _decimals = 9;
uint32 _smd; uint32 _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 private _taxSwapMin; uint256 private _taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 _defTaxRate = 0;
uint8 private _buyTaxRate; uint8 private _sellTaxRate; uint8 private _txTaxRate;
uint16 private _tokenTaxShares = 0;
uint16 private _burnTaxShares = 0;
uint16 private _autoLPShares = 0;
uint16 private _ethTaxShares1 = 0;
uint16 private _ethTaxShares2 = 0;
uint16 private _ethTaxShares3 = 0;
uint16 private _totalTaxShares = _tokenTaxShares + _burnTaxShares + _autoLPShares + _ethTaxShares1 + _ethTaxShares2 + _ethTaxShares3;
address constant _burnWallet = address(0);
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _sniperBlock;
uint8 private _gasPriceBlocks = 10;
uint256 blackGwei = 80 * 10**9;
address payable private _ethTaxWallet1 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address payable private _ethTaxWallet2 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address payable private _ethTaxWallet3 = payable(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
address private _tokenTaxWallet = address(0x84c85904354Ad16F1F6b92d3f605045606Ca28F6);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
constructor () Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external view override returns (string memory) { }
function name() external view override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _markSniper(address wallet, uint256 snipeBlockNum) internal {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isSniper(address wallet) external view returns(bool) {
}
function sniperCaughtInBlock(address wallet) external view returns(uint256) {
}
function ignoreFees(address wallet, bool toggle) external onlyOwner {
}
function ignoreLimits(address wallet, bool toggle) external onlyOwner {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenWallet, uint16 sharesBurnedTokens, uint16 sharesAutoLP, uint16 sharesEthWallet1, uint16 sharesEthWallet2, uint16 sharesEthWallet3) external onlyOwner {
}
function setTaxWallets(address newEthWallet1, address newEthWallet2, address newEthWallet3, address newTokenTaxWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function liquifySniper(address wallet) external onlyOwner lockTaxSwap {
require(<FILL_ME>)
uint256 sniperBalance = balanceOf(wallet);
require(sniperBalance > 0, "no tokens");
//if a wallet was caught and marked as a sniper this can convert their tokens into uniswap liquidity
_balances[wallet] = _balances[wallet] - sniperBalance;
_balances[address(this)] = _balances[address(this)] + sniperBalance;
emit Transfer(wallet, address(this), sniperBalance);
uint256 liquifiedTokens = sniperBalance/2 - 1;
uint256 _ethPreSwap = address(this).balance;
_swapTaxTokensForEth(liquifiedTokens);
uint256 _ethSwapped = address(this).balance - _ethPreSwap;
_approveRouter(liquifiedTokens);
_addLiquidity(liquifiedTokens, _ethSwapped, false);
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _transferTaxTokens(address recipient, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| _sniperBlock[wallet]!=0,"not a sniper" | 269,950 | _sniperBlock[wallet]!=0 |
"You have already migrated." | pragma solidity ^0.8.4;
/****************************************************************
* OPTIX by The Blinkless: The Official Currency of New Cornea
* "Soft" stake your favorite NFTs
* code by @digitalkemical
*****************************************************************/
contract Optix is ERC20, ERC20Burnable, Ownable {
//define a stake structure
struct Stake{
address contractAddress;
address ownerAddress;
uint startTime;
uint tokenId;
}
//define a collection structure
struct Collection{
address contractAddress;
uint hourlyReward;
}
//define variables
mapping( address => mapping(uint => Stake ) ) public openStakes; //mapping of all open stakes by collection address
mapping( address => mapping( address => uint[] ) ) public myActiveCollections; //mapping of wallet address to all active collections
mapping( address => bool ) public hasMigrated; //bool tracker of who has migrated from v1
Collection[] public collections; //array of NFT collections that can be staked
address[] public freeCollections; //array of contract addresses for collections with no fee
address v1ContractAddress = 0xcEE33d20845038Df71B88041B28c3654CF05ae2f; //address to v1 Optix contract (for migration)
address payoutWallet = 0xeD2faa60373eC70E57B39152aeE5Ce4ed7C333c7; //wallet for payouts
uint migrationMode = 1; //turn on/off migrations
uint public thirdPartyFee = 0.001 ether; //fee to charge for 3rd party stakes
//run on deploy
constructor() ERC20("Optix", "OPTIX") {}
/**
* Owner can mint more tokens
*/
function mint(address to, uint256 amount) public onlyOwner {
}
/**
* Migrate balance from v1 contract
*/
function migrateFromv1() public{
require(migrationMode == 1, "Migration period has closed.");
require(<FILL_ME>)
uint oldBalance = IERC20(v1ContractAddress).balanceOf(msg.sender);
hasMigrated[msg.sender] = true;
_mint(msg.sender, oldBalance + 100000 ether);
}
/**
* Add a collection to the staking options
*/
function addCollection(address _contractAddress, uint _hourlyReward) public onlyOwner{
}
/**
* Update the third party fee
*/
function updateThirdPartyFee(uint _fee) public onlyOwner{
}
/**
* Update the migration mode
*/
function updateMigrationMode(uint _migrationMode) public onlyOwner{
}
/**
* Add a collection to free collection list
*/
function addToFreeCollections(address _contractAddress) public onlyOwner{
}
/**
* Update the v1 contract address
*/
function updateV1Contract(address _v1ContractAddress) public onlyOwner{
}
/**
* Update the payout wallet address
*/
function updatePayoutWallet(address _payoutWallet) public onlyOwner{
}
/**
* Remove a collection from the free collection list
*/
function removeFreeCollection(address _contractAddress) public onlyOwner{
}
/**
* Remove a collection from the staking options
*/
function removeCollection(address _contractAddress) public onlyOwner{
}
/**
* Get all available collections
*/
function getAllCollections() public view returns(Collection[] memory _collections){
}
/**
* Get all free collections
*/
function getAllFreeCollections() public view returns(address[] memory _collections){
}
/**
* Get a collection
*/
function getCollection(address _contractAddress) public view returns(Collection memory _collections){
}
/**
* Open a new soft stake (tokens are never locked)
*/
function openStake(address _contractAddress, uint[] memory _tokenIds) public payable {
}
/**
* Add an active collection to a wallet
*/
function addToActiveList(address _contractAddress, uint _tokenId) internal {
}
/**
* Get the active list for the wallet by collection contract address
*/
function getActiveList(address _contractAddress) external view returns(uint[] memory _activeList){
}
/**
* Verify that a collection being staked has been approved
*/
function collectionIsApproved(address _contractAddress) public view returns(bool _approved){
}
/**
* Check if a stake exists already
*/
function checkForStake(address _contractAddress, uint _tokenId) public view returns(bool _exists){
}
/**
* Get a stake
*/
function getStake(address _contractAddress, uint _tokenId) public view returns(Stake memory _exists){
}
/**
* Calculate stake reward for a token
*/
function calculateStakeReward(address _contractAddress, uint _tokenId) public view returns(uint _totalReward){
}
/**
* Close a stake and claim reward
*/
function closeStake(address _contractAddress, uint[] memory _tokenIds) public payable returns(uint _totalReward){
}
/**
* Claim rewards from multiple stakes at once without closing
*/
function claimWithoutClosing(address _contractAddress, uint[] memory _tokenIds) public returns(uint _totalReward){
}
/**
* Claim rewards from all stakes without closing
*/
function claimAllWithoutClosing() public returns(uint _totalReward){
}
/**
* Update the ownership of a stake to match the NFT owner
*/
function updateOwnership(address _contractAddress, uint _tokenId) public{
}
/*
* Withdraw by owner
*/
function withdraw() external onlyOwner {
}
/*
* These are here to receive ETH sent to the contract address
*/
receive() external payable {}
fallback() external payable {}
}
| hasMigrated[msg.sender]==false,"You have already migrated." | 270,042 | hasMigrated[msg.sender]==false |
"This collection has not been approved." | pragma solidity ^0.8.4;
/****************************************************************
* OPTIX by The Blinkless: The Official Currency of New Cornea
* "Soft" stake your favorite NFTs
* code by @digitalkemical
*****************************************************************/
contract Optix is ERC20, ERC20Burnable, Ownable {
//define a stake structure
struct Stake{
address contractAddress;
address ownerAddress;
uint startTime;
uint tokenId;
}
//define a collection structure
struct Collection{
address contractAddress;
uint hourlyReward;
}
//define variables
mapping( address => mapping(uint => Stake ) ) public openStakes; //mapping of all open stakes by collection address
mapping( address => mapping( address => uint[] ) ) public myActiveCollections; //mapping of wallet address to all active collections
mapping( address => bool ) public hasMigrated; //bool tracker of who has migrated from v1
Collection[] public collections; //array of NFT collections that can be staked
address[] public freeCollections; //array of contract addresses for collections with no fee
address v1ContractAddress = 0xcEE33d20845038Df71B88041B28c3654CF05ae2f; //address to v1 Optix contract (for migration)
address payoutWallet = 0xeD2faa60373eC70E57B39152aeE5Ce4ed7C333c7; //wallet for payouts
uint migrationMode = 1; //turn on/off migrations
uint public thirdPartyFee = 0.001 ether; //fee to charge for 3rd party stakes
//run on deploy
constructor() ERC20("Optix", "OPTIX") {}
/**
* Owner can mint more tokens
*/
function mint(address to, uint256 amount) public onlyOwner {
}
/**
* Migrate balance from v1 contract
*/
function migrateFromv1() public{
}
/**
* Add a collection to the staking options
*/
function addCollection(address _contractAddress, uint _hourlyReward) public onlyOwner{
}
/**
* Update the third party fee
*/
function updateThirdPartyFee(uint _fee) public onlyOwner{
}
/**
* Update the migration mode
*/
function updateMigrationMode(uint _migrationMode) public onlyOwner{
}
/**
* Add a collection to free collection list
*/
function addToFreeCollections(address _contractAddress) public onlyOwner{
}
/**
* Update the v1 contract address
*/
function updateV1Contract(address _v1ContractAddress) public onlyOwner{
}
/**
* Update the payout wallet address
*/
function updatePayoutWallet(address _payoutWallet) public onlyOwner{
}
/**
* Remove a collection from the free collection list
*/
function removeFreeCollection(address _contractAddress) public onlyOwner{
}
/**
* Remove a collection from the staking options
*/
function removeCollection(address _contractAddress) public onlyOwner{
}
/**
* Get all available collections
*/
function getAllCollections() public view returns(Collection[] memory _collections){
}
/**
* Get all free collections
*/
function getAllFreeCollections() public view returns(address[] memory _collections){
}
/**
* Get a collection
*/
function getCollection(address _contractAddress) public view returns(Collection memory _collections){
}
/**
* Open a new soft stake (tokens are never locked)
*/
function openStake(address _contractAddress, uint[] memory _tokenIds) public payable {
//check if collection is approved
require(<FILL_ME>)
bool isFree = false;
uint i = 0;
while(i < freeCollections.length){
if(freeCollections[i] == _contractAddress){
isFree = true;
}
i++;
}
//charge a withdrawal fee for 3rd party collections
if(!isFree){
require(msg.value >= thirdPartyFee * _tokenIds.length, "Insufficient funds to open 3rd-party stake.");
}
uint counter = 0;
while(counter < _tokenIds.length){
uint _tokenId = _tokenIds[counter];
//ensure sender is owner of token and collection is approved
require(IERC721(_contractAddress).ownerOf(_tokenId) == msg.sender,"Could not verify ownership!");
//if trying to open a stake previously owned, update the stake owner
if(checkForStake(_contractAddress,_tokenId) && openStakes[_contractAddress][_tokenId].ownerAddress != msg.sender){
updateOwnership( _contractAddress, _tokenId );
}
//make sure stake doesn't already exist
if(!checkForStake(_contractAddress,_tokenId)){
//create a new stake
openStakes[_contractAddress][_tokenId]=
Stake(
_contractAddress,
msg.sender,
block.timestamp,
_tokenId
)
;
//add collection to active list
addToActiveList(_contractAddress, _tokenId);
}
counter++;
}
}
/**
* Add an active collection to a wallet
*/
function addToActiveList(address _contractAddress, uint _tokenId) internal {
}
/**
* Get the active list for the wallet by collection contract address
*/
function getActiveList(address _contractAddress) external view returns(uint[] memory _activeList){
}
/**
* Verify that a collection being staked has been approved
*/
function collectionIsApproved(address _contractAddress) public view returns(bool _approved){
}
/**
* Check if a stake exists already
*/
function checkForStake(address _contractAddress, uint _tokenId) public view returns(bool _exists){
}
/**
* Get a stake
*/
function getStake(address _contractAddress, uint _tokenId) public view returns(Stake memory _exists){
}
/**
* Calculate stake reward for a token
*/
function calculateStakeReward(address _contractAddress, uint _tokenId) public view returns(uint _totalReward){
}
/**
* Close a stake and claim reward
*/
function closeStake(address _contractAddress, uint[] memory _tokenIds) public payable returns(uint _totalReward){
}
/**
* Claim rewards from multiple stakes at once without closing
*/
function claimWithoutClosing(address _contractAddress, uint[] memory _tokenIds) public returns(uint _totalReward){
}
/**
* Claim rewards from all stakes without closing
*/
function claimAllWithoutClosing() public returns(uint _totalReward){
}
/**
* Update the ownership of a stake to match the NFT owner
*/
function updateOwnership(address _contractAddress, uint _tokenId) public{
}
/*
* Withdraw by owner
*/
function withdraw() external onlyOwner {
}
/*
* These are here to receive ETH sent to the contract address
*/
receive() external payable {}
fallback() external payable {}
}
| collectionIsApproved(_contractAddress),"This collection has not been approved." | 270,042 | collectionIsApproved(_contractAddress) |
"Could not verify ownership!" | pragma solidity ^0.8.4;
/****************************************************************
* OPTIX by The Blinkless: The Official Currency of New Cornea
* "Soft" stake your favorite NFTs
* code by @digitalkemical
*****************************************************************/
contract Optix is ERC20, ERC20Burnable, Ownable {
//define a stake structure
struct Stake{
address contractAddress;
address ownerAddress;
uint startTime;
uint tokenId;
}
//define a collection structure
struct Collection{
address contractAddress;
uint hourlyReward;
}
//define variables
mapping( address => mapping(uint => Stake ) ) public openStakes; //mapping of all open stakes by collection address
mapping( address => mapping( address => uint[] ) ) public myActiveCollections; //mapping of wallet address to all active collections
mapping( address => bool ) public hasMigrated; //bool tracker of who has migrated from v1
Collection[] public collections; //array of NFT collections that can be staked
address[] public freeCollections; //array of contract addresses for collections with no fee
address v1ContractAddress = 0xcEE33d20845038Df71B88041B28c3654CF05ae2f; //address to v1 Optix contract (for migration)
address payoutWallet = 0xeD2faa60373eC70E57B39152aeE5Ce4ed7C333c7; //wallet for payouts
uint migrationMode = 1; //turn on/off migrations
uint public thirdPartyFee = 0.001 ether; //fee to charge for 3rd party stakes
//run on deploy
constructor() ERC20("Optix", "OPTIX") {}
/**
* Owner can mint more tokens
*/
function mint(address to, uint256 amount) public onlyOwner {
}
/**
* Migrate balance from v1 contract
*/
function migrateFromv1() public{
}
/**
* Add a collection to the staking options
*/
function addCollection(address _contractAddress, uint _hourlyReward) public onlyOwner{
}
/**
* Update the third party fee
*/
function updateThirdPartyFee(uint _fee) public onlyOwner{
}
/**
* Update the migration mode
*/
function updateMigrationMode(uint _migrationMode) public onlyOwner{
}
/**
* Add a collection to free collection list
*/
function addToFreeCollections(address _contractAddress) public onlyOwner{
}
/**
* Update the v1 contract address
*/
function updateV1Contract(address _v1ContractAddress) public onlyOwner{
}
/**
* Update the payout wallet address
*/
function updatePayoutWallet(address _payoutWallet) public onlyOwner{
}
/**
* Remove a collection from the free collection list
*/
function removeFreeCollection(address _contractAddress) public onlyOwner{
}
/**
* Remove a collection from the staking options
*/
function removeCollection(address _contractAddress) public onlyOwner{
}
/**
* Get all available collections
*/
function getAllCollections() public view returns(Collection[] memory _collections){
}
/**
* Get all free collections
*/
function getAllFreeCollections() public view returns(address[] memory _collections){
}
/**
* Get a collection
*/
function getCollection(address _contractAddress) public view returns(Collection memory _collections){
}
/**
* Open a new soft stake (tokens are never locked)
*/
function openStake(address _contractAddress, uint[] memory _tokenIds) public payable {
//check if collection is approved
require(collectionIsApproved(_contractAddress),"This collection has not been approved.");
bool isFree = false;
uint i = 0;
while(i < freeCollections.length){
if(freeCollections[i] == _contractAddress){
isFree = true;
}
i++;
}
//charge a withdrawal fee for 3rd party collections
if(!isFree){
require(msg.value >= thirdPartyFee * _tokenIds.length, "Insufficient funds to open 3rd-party stake.");
}
uint counter = 0;
while(counter < _tokenIds.length){
uint _tokenId = _tokenIds[counter];
//ensure sender is owner of token and collection is approved
require(<FILL_ME>)
//if trying to open a stake previously owned, update the stake owner
if(checkForStake(_contractAddress,_tokenId) && openStakes[_contractAddress][_tokenId].ownerAddress != msg.sender){
updateOwnership( _contractAddress, _tokenId );
}
//make sure stake doesn't already exist
if(!checkForStake(_contractAddress,_tokenId)){
//create a new stake
openStakes[_contractAddress][_tokenId]=
Stake(
_contractAddress,
msg.sender,
block.timestamp,
_tokenId
)
;
//add collection to active list
addToActiveList(_contractAddress, _tokenId);
}
counter++;
}
}
/**
* Add an active collection to a wallet
*/
function addToActiveList(address _contractAddress, uint _tokenId) internal {
}
/**
* Get the active list for the wallet by collection contract address
*/
function getActiveList(address _contractAddress) external view returns(uint[] memory _activeList){
}
/**
* Verify that a collection being staked has been approved
*/
function collectionIsApproved(address _contractAddress) public view returns(bool _approved){
}
/**
* Check if a stake exists already
*/
function checkForStake(address _contractAddress, uint _tokenId) public view returns(bool _exists){
}
/**
* Get a stake
*/
function getStake(address _contractAddress, uint _tokenId) public view returns(Stake memory _exists){
}
/**
* Calculate stake reward for a token
*/
function calculateStakeReward(address _contractAddress, uint _tokenId) public view returns(uint _totalReward){
}
/**
* Close a stake and claim reward
*/
function closeStake(address _contractAddress, uint[] memory _tokenIds) public payable returns(uint _totalReward){
}
/**
* Claim rewards from multiple stakes at once without closing
*/
function claimWithoutClosing(address _contractAddress, uint[] memory _tokenIds) public returns(uint _totalReward){
}
/**
* Claim rewards from all stakes without closing
*/
function claimAllWithoutClosing() public returns(uint _totalReward){
}
/**
* Update the ownership of a stake to match the NFT owner
*/
function updateOwnership(address _contractAddress, uint _tokenId) public{
}
/*
* Withdraw by owner
*/
function withdraw() external onlyOwner {
}
/*
* These are here to receive ETH sent to the contract address
*/
receive() external payable {}
fallback() external payable {}
}
| IERC721(_contractAddress).ownerOf(_tokenId)==msg.sender,"Could not verify ownership!" | 270,042 | IERC721(_contractAddress).ownerOf(_tokenId)==msg.sender |
"EXCEEDS STOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PhantomPals is ERC721, Ownable {
using Strings for uint256;
address private mainWallet = 0x2f5DA370ba0837f111a3981712738d865b5Faf9E;
uint256 public constant NFT_STOCK = 1500;
uint256 public constant NFTS_PER_TRANS = 5;
uint256 public constant NFTS_PER_WALLET = 25;
string private _tokenBaseURI;
string public _mysteryURI;
bool public revealed = false;
bool public giftLive = true;
bool public firstSaleLive = false;
bool public secondSaleLive = false;
mapping(address => uint256) public addressMinted;
uint256 public totalSupply;
constructor(string memory tokenBaseURI, string memory mysteryURI) ERC721("Phantom Pals", "PHANTOMPALS") {
}
function mintGift(uint256 tokenQuantity, address wallet)
external
onlyOwner
{
require(giftLive, "GIFTING CLOSED");
require(tokenQuantity > 0, "INVALID TOKEN QUANTITY");
require(totalSupply <= NFT_STOCK, "OUT OF STOCK");
require(<FILL_ME>)
for (uint256 i = 0; i < tokenQuantity; i++) {
_safeMint(wallet, totalSupply + i + 1);
}
totalSupply += tokenQuantity;
}
function mint(
uint256 tokenQuantity
) external payable {
}
function withdraw() external onlyOwner {
}
function toggleFirstSaleStatus() public onlyOwner {
}
function toggleSecondSaleStatus() public onlyOwner {
}
function toggleGiftStatus() public onlyOwner {
}
function toggleMysteryURI() public onlyOwner {
}
function setMysteryURI(string calldata URI) public onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| totalSupply+tokenQuantity<=NFT_STOCK,"EXCEEDS STOCK" | 270,070 | totalSupply+tokenQuantity<=NFT_STOCK |
"EXCEEDS YOUR 25 PALS MAX" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PhantomPals is ERC721, Ownable {
using Strings for uint256;
address private mainWallet = 0x2f5DA370ba0837f111a3981712738d865b5Faf9E;
uint256 public constant NFT_STOCK = 1500;
uint256 public constant NFTS_PER_TRANS = 5;
uint256 public constant NFTS_PER_WALLET = 25;
string private _tokenBaseURI;
string public _mysteryURI;
bool public revealed = false;
bool public giftLive = true;
bool public firstSaleLive = false;
bool public secondSaleLive = false;
mapping(address => uint256) public addressMinted;
uint256 public totalSupply;
constructor(string memory tokenBaseURI, string memory mysteryURI) ERC721("Phantom Pals", "PHANTOMPALS") {
}
function mintGift(uint256 tokenQuantity, address wallet)
external
onlyOwner
{
}
function mint(
uint256 tokenQuantity
) external payable {
require(totalSupply <= NFT_STOCK, "OUT OF STOCK");
require(tokenQuantity > 0, "INVALID TOKEN QUANTITY");
require(tokenQuantity <= NFTS_PER_TRANS, "EXCEEDS MINT AMT PER TRANSACTION");
require(<FILL_ME>)
if (firstSaleLive) require(totalSupply + tokenQuantity <= NFT_STOCK/2, "EXCEEDS FIRST SALE STOCK");
else if (secondSaleLive) require(totalSupply + tokenQuantity <= NFT_STOCK, "EXCEEDS SECOND SALE STOCK");
else require(firstSaleLive || secondSaleLive, "SALE NOT LIVE");
for (uint256 i = 0; i < tokenQuantity; i++) {
_safeMint(msg.sender, totalSupply + i + 1);
}
addressMinted[msg.sender] += tokenQuantity;
totalSupply += tokenQuantity;
}
function withdraw() external onlyOwner {
}
function toggleFirstSaleStatus() public onlyOwner {
}
function toggleSecondSaleStatus() public onlyOwner {
}
function toggleGiftStatus() public onlyOwner {
}
function toggleMysteryURI() public onlyOwner {
}
function setMysteryURI(string calldata URI) public onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| addressMinted[msg.sender]+tokenQuantity<=NFTS_PER_WALLET,"EXCEEDS YOUR 25 PALS MAX" | 270,070 | addressMinted[msg.sender]+tokenQuantity<=NFTS_PER_WALLET |
"EXCEEDS FIRST SALE STOCK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PhantomPals is ERC721, Ownable {
using Strings for uint256;
address private mainWallet = 0x2f5DA370ba0837f111a3981712738d865b5Faf9E;
uint256 public constant NFT_STOCK = 1500;
uint256 public constant NFTS_PER_TRANS = 5;
uint256 public constant NFTS_PER_WALLET = 25;
string private _tokenBaseURI;
string public _mysteryURI;
bool public revealed = false;
bool public giftLive = true;
bool public firstSaleLive = false;
bool public secondSaleLive = false;
mapping(address => uint256) public addressMinted;
uint256 public totalSupply;
constructor(string memory tokenBaseURI, string memory mysteryURI) ERC721("Phantom Pals", "PHANTOMPALS") {
}
function mintGift(uint256 tokenQuantity, address wallet)
external
onlyOwner
{
}
function mint(
uint256 tokenQuantity
) external payable {
require(totalSupply <= NFT_STOCK, "OUT OF STOCK");
require(tokenQuantity > 0, "INVALID TOKEN QUANTITY");
require(tokenQuantity <= NFTS_PER_TRANS, "EXCEEDS MINT AMT PER TRANSACTION");
require(addressMinted[msg.sender] + tokenQuantity <= NFTS_PER_WALLET, "EXCEEDS YOUR 25 PALS MAX");
if (firstSaleLive) require(<FILL_ME>)
else if (secondSaleLive) require(totalSupply + tokenQuantity <= NFT_STOCK, "EXCEEDS SECOND SALE STOCK");
else require(firstSaleLive || secondSaleLive, "SALE NOT LIVE");
for (uint256 i = 0; i < tokenQuantity; i++) {
_safeMint(msg.sender, totalSupply + i + 1);
}
addressMinted[msg.sender] += tokenQuantity;
totalSupply += tokenQuantity;
}
function withdraw() external onlyOwner {
}
function toggleFirstSaleStatus() public onlyOwner {
}
function toggleSecondSaleStatus() public onlyOwner {
}
function toggleGiftStatus() public onlyOwner {
}
function toggleMysteryURI() public onlyOwner {
}
function setMysteryURI(string calldata URI) public onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| totalSupply+tokenQuantity<=NFT_STOCK/2,"EXCEEDS FIRST SALE STOCK" | 270,070 | totalSupply+tokenQuantity<=NFT_STOCK/2 |
"SALE NOT LIVE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PhantomPals is ERC721, Ownable {
using Strings for uint256;
address private mainWallet = 0x2f5DA370ba0837f111a3981712738d865b5Faf9E;
uint256 public constant NFT_STOCK = 1500;
uint256 public constant NFTS_PER_TRANS = 5;
uint256 public constant NFTS_PER_WALLET = 25;
string private _tokenBaseURI;
string public _mysteryURI;
bool public revealed = false;
bool public giftLive = true;
bool public firstSaleLive = false;
bool public secondSaleLive = false;
mapping(address => uint256) public addressMinted;
uint256 public totalSupply;
constructor(string memory tokenBaseURI, string memory mysteryURI) ERC721("Phantom Pals", "PHANTOMPALS") {
}
function mintGift(uint256 tokenQuantity, address wallet)
external
onlyOwner
{
}
function mint(
uint256 tokenQuantity
) external payable {
require(totalSupply <= NFT_STOCK, "OUT OF STOCK");
require(tokenQuantity > 0, "INVALID TOKEN QUANTITY");
require(tokenQuantity <= NFTS_PER_TRANS, "EXCEEDS MINT AMT PER TRANSACTION");
require(addressMinted[msg.sender] + tokenQuantity <= NFTS_PER_WALLET, "EXCEEDS YOUR 25 PALS MAX");
if (firstSaleLive) require(totalSupply + tokenQuantity <= NFT_STOCK/2, "EXCEEDS FIRST SALE STOCK");
else if (secondSaleLive) require(totalSupply + tokenQuantity <= NFT_STOCK, "EXCEEDS SECOND SALE STOCK");
else require(<FILL_ME>)
for (uint256 i = 0; i < tokenQuantity; i++) {
_safeMint(msg.sender, totalSupply + i + 1);
}
addressMinted[msg.sender] += tokenQuantity;
totalSupply += tokenQuantity;
}
function withdraw() external onlyOwner {
}
function toggleFirstSaleStatus() public onlyOwner {
}
function toggleSecondSaleStatus() public onlyOwner {
}
function toggleGiftStatus() public onlyOwner {
}
function toggleMysteryURI() public onlyOwner {
}
function setMysteryURI(string calldata URI) public onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| firstSaleLive||secondSaleLive,"SALE NOT LIVE" | 270,070 | firstSaleLive||secondSaleLive |
"MINT_COMPLETE" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
}
}
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @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 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.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
}
function balanceOf(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
}
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 id) public virtual {
}
function setApprovalForAll(address operator, bool approved) public virtual {
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 id) internal virtual {
}
function _burn(uint256 id) internal virtual {
}
/*//////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/
function _safeMint(address to, uint256 id) internal virtual {
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
}
}
/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
}
}
//****************************************************************************//
// WELCOME TO THE CRYPTO WINTER. IT'S TIME TO BURN SOME TRASH FOR HEAT IF YOU //
// WANT TO SURVIVE THE CYPHERPUNK DYSTOPIA WE CALL ... //
// __ __ //
// /'\_/`\ /\ \__ /\ \ //
// /\ \ __\ \ ,_\ __ \ \ \____ __ __ ___ ___ ____ //
// \ \ \__\ \ /'__`\ \ \/ /'__`\ \ \ '__`\/\ \/\ \ /' __` __`\ /',__\ //
// \ \ \_/\ \/\ __/\ \ \_/\ \L\.\_\ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ //
// \ \_\\ \_\ \____\\ \__\ \__/.\_\\ \_,__/\ \____/\ \_\ \_\ \_\/\____/ //
// \/_/ \/_/\/____/ \/__/\/__/\/_/ \/___/ \/___/ \/_/\/_/\/_/\/___/ //
// __________________ //
// \................\ //
// \.................\ //
// \.................\ //
// \xxxxxxxxxxxxxxxxx\ //
// /------------------------------------- //
// //xxxxxxxxxxxxxxx// // | //
// // // // | //
// // // / / || //
// // // / / || //
// //_______________// / / || //
// -------------------------------------/ /------- | //
// | WASTE | NO |RESIDENTIAL| | //
// | MANAGEMENT |RECYCLING|TRASH ONLY | | //
// |-----------------------------------| | //
// | PROPERTY OF METABUMS INCORPORATED | | //
// ------------------------------------------------- //
//****************************************************************************//
contract MetaBums is ERC721, Ownable {
// saves 66 gas using < MAX+1 rather than <= MAX
uint256 public constant MAX_SUPPLY_PLUS_ONE = 6970;
bool public metadataFrozen;
uint256 public totalSupply;
string public baseURI;
mapping(address => uint256) bumAdopters;
uint256 public trash = type(uint256).max;
bytes32 public fire;
mapping(address=>uint) public donations;
event Shout(string exclamation);
constructor(string memory _baseURI) ERC721("Metabums", "BUMS") {
}
function adoptABum(uint8 quantity) external fleeTheRobotOverlords payable {
uint256 currentId = totalSupply;
require(quantity > 0 && quantity < 6, "BAD_QUANTITY");
require(<FILL_ME>)
require(bumAdopters[msg.sender] == 0, "CAN_ONLY_MINT_ONCE");
for (uint i = 0; i < quantity; ++i)
_mint(msg.sender, currentId + i);
unchecked{ totalSupply += quantity; }
if(msg.value > 0)
donations[msg.sender] = donations[msg.sender] + msg.value;
bumAdopters[msg.sender] = 1 + uint(bytes32(abi.encodePacked(msg.sender))) ^ uint(blockhash(block.number));
}
function burnTrashForHeat() external fleeTheRobotOverlords {
}
function moveBackInWithMom(address basement) external fleeTheRobotOverlords {
}
function begForChange() external fleeTheRobotOverlords payable {
}
function holla(uint wut, address atyaboi) external fleeTheRobotOverlords {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function paddedString(uint256 _tokenId) internal pure returns (string memory) {
}
function updateBaseURI(string memory _baseURI) external onlyOwner {
}
function freezeBaseURI() external onlyOwner {
}
function toBool(uint256 x) internal pure returns (bool r) {
}
function uintToString(uint256 x) internal pure returns (string memory) {
}
modifier fleeTheRobotOverlords() {
}
function bankTheUnbanked() external onlyOwner {
}
}
| currentId+quantity<MAX_SUPPLY_PLUS_ONE,"MINT_COMPLETE" | 270,186 | currentId+quantity<MAX_SUPPLY_PLUS_ONE |
"CAN_ONLY_MINT_ONCE" | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
}
}
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @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 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.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
}
function balanceOf(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
}
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 id) public virtual {
}
function setApprovalForAll(address operator, bool approved) public virtual {
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 id) internal virtual {
}
function _burn(uint256 id) internal virtual {
}
/*//////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/
function _safeMint(address to, uint256 id) internal virtual {
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
}
}
/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
}
}
//****************************************************************************//
// WELCOME TO THE CRYPTO WINTER. IT'S TIME TO BURN SOME TRASH FOR HEAT IF YOU //
// WANT TO SURVIVE THE CYPHERPUNK DYSTOPIA WE CALL ... //
// __ __ //
// /'\_/`\ /\ \__ /\ \ //
// /\ \ __\ \ ,_\ __ \ \ \____ __ __ ___ ___ ____ //
// \ \ \__\ \ /'__`\ \ \/ /'__`\ \ \ '__`\/\ \/\ \ /' __` __`\ /',__\ //
// \ \ \_/\ \/\ __/\ \ \_/\ \L\.\_\ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ //
// \ \_\\ \_\ \____\\ \__\ \__/.\_\\ \_,__/\ \____/\ \_\ \_\ \_\/\____/ //
// \/_/ \/_/\/____/ \/__/\/__/\/_/ \/___/ \/___/ \/_/\/_/\/_/\/___/ //
// __________________ //
// \................\ //
// \.................\ //
// \.................\ //
// \xxxxxxxxxxxxxxxxx\ //
// /------------------------------------- //
// //xxxxxxxxxxxxxxx// // | //
// // // // | //
// // // / / || //
// // // / / || //
// //_______________// / / || //
// -------------------------------------/ /------- | //
// | WASTE | NO |RESIDENTIAL| | //
// | MANAGEMENT |RECYCLING|TRASH ONLY | | //
// |-----------------------------------| | //
// | PROPERTY OF METABUMS INCORPORATED | | //
// ------------------------------------------------- //
//****************************************************************************//
contract MetaBums is ERC721, Ownable {
// saves 66 gas using < MAX+1 rather than <= MAX
uint256 public constant MAX_SUPPLY_PLUS_ONE = 6970;
bool public metadataFrozen;
uint256 public totalSupply;
string public baseURI;
mapping(address => uint256) bumAdopters;
uint256 public trash = type(uint256).max;
bytes32 public fire;
mapping(address=>uint) public donations;
event Shout(string exclamation);
constructor(string memory _baseURI) ERC721("Metabums", "BUMS") {
}
function adoptABum(uint8 quantity) external fleeTheRobotOverlords payable {
uint256 currentId = totalSupply;
require(quantity > 0 && quantity < 6, "BAD_QUANTITY");
require(currentId + quantity < MAX_SUPPLY_PLUS_ONE, "MINT_COMPLETE");
require(<FILL_ME>)
for (uint i = 0; i < quantity; ++i)
_mint(msg.sender, currentId + i);
unchecked{ totalSupply += quantity; }
if(msg.value > 0)
donations[msg.sender] = donations[msg.sender] + msg.value;
bumAdopters[msg.sender] = 1 + uint(bytes32(abi.encodePacked(msg.sender))) ^ uint(blockhash(block.number));
}
function burnTrashForHeat() external fleeTheRobotOverlords {
}
function moveBackInWithMom(address basement) external fleeTheRobotOverlords {
}
function begForChange() external fleeTheRobotOverlords payable {
}
function holla(uint wut, address atyaboi) external fleeTheRobotOverlords {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function paddedString(uint256 _tokenId) internal pure returns (string memory) {
}
function updateBaseURI(string memory _baseURI) external onlyOwner {
}
function freezeBaseURI() external onlyOwner {
}
function toBool(uint256 x) internal pure returns (bool r) {
}
function uintToString(uint256 x) internal pure returns (string memory) {
}
modifier fleeTheRobotOverlords() {
}
function bankTheUnbanked() external onlyOwner {
}
}
| bumAdopters[msg.sender]==0,"CAN_ONLY_MINT_ONCE" | 270,186 | bumAdopters[msg.sender]==0 |
null | //SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
}
}
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @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 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.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE/LOGIC
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
}
function balanceOf(address owner) public view virtual returns (uint256) {
}
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(string memory _name, string memory _symbol) {
}
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 id) public virtual {
}
function setApprovalForAll(address operator, bool approved) public virtual {
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 id) internal virtual {
}
function _burn(uint256 id) internal virtual {
}
/*//////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/
function _safeMint(address to, uint256 id) internal virtual {
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
}
}
/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
}
}
//****************************************************************************//
// WELCOME TO THE CRYPTO WINTER. IT'S TIME TO BURN SOME TRASH FOR HEAT IF YOU //
// WANT TO SURVIVE THE CYPHERPUNK DYSTOPIA WE CALL ... //
// __ __ //
// /'\_/`\ /\ \__ /\ \ //
// /\ \ __\ \ ,_\ __ \ \ \____ __ __ ___ ___ ____ //
// \ \ \__\ \ /'__`\ \ \/ /'__`\ \ \ '__`\/\ \/\ \ /' __` __`\ /',__\ //
// \ \ \_/\ \/\ __/\ \ \_/\ \L\.\_\ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ //
// \ \_\\ \_\ \____\\ \__\ \__/.\_\\ \_,__/\ \____/\ \_\ \_\ \_\/\____/ //
// \/_/ \/_/\/____/ \/__/\/__/\/_/ \/___/ \/___/ \/_/\/_/\/_/\/___/ //
// __________________ //
// \................\ //
// \.................\ //
// \.................\ //
// \xxxxxxxxxxxxxxxxx\ //
// /------------------------------------- //
// //xxxxxxxxxxxxxxx// // | //
// // // // | //
// // // / / || //
// // // / / || //
// //_______________// / / || //
// -------------------------------------/ /------- | //
// | WASTE | NO |RESIDENTIAL| | //
// | MANAGEMENT |RECYCLING|TRASH ONLY | | //
// |-----------------------------------| | //
// | PROPERTY OF METABUMS INCORPORATED | | //
// ------------------------------------------------- //
//****************************************************************************//
contract MetaBums is ERC721, Ownable {
// saves 66 gas using < MAX+1 rather than <= MAX
uint256 public constant MAX_SUPPLY_PLUS_ONE = 6970;
bool public metadataFrozen;
uint256 public totalSupply;
string public baseURI;
mapping(address => uint256) bumAdopters;
uint256 public trash = type(uint256).max;
bytes32 public fire;
mapping(address=>uint) public donations;
event Shout(string exclamation);
constructor(string memory _baseURI) ERC721("Metabums", "BUMS") {
}
function adoptABum(uint8 quantity) external fleeTheRobotOverlords payable {
}
function burnTrashForHeat() external fleeTheRobotOverlords {
}
function moveBackInWithMom(address basement) external fleeTheRobotOverlords {
}
function begForChange() external fleeTheRobotOverlords payable {
}
function holla(uint wut, address atyaboi) external fleeTheRobotOverlords {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
require(<FILL_ME>)
return string(abi.encodePacked(baseURI, paddedString(_tokenId), ".json"));
}
function paddedString(uint256 _tokenId) internal pure returns (string memory) {
}
function updateBaseURI(string memory _baseURI) external onlyOwner {
}
function freezeBaseURI() external onlyOwner {
}
function toBool(uint256 x) internal pure returns (bool r) {
}
function uintToString(uint256 x) internal pure returns (string memory) {
}
modifier fleeTheRobotOverlords() {
}
function bankTheUnbanked() external onlyOwner {
}
}
| ownerOf(_tokenId)!=address(0) | 270,186 | ownerOf(_tokenId)!=address(0) |
"Minting would exceed maxSupply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./ERC721A.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./Strings.sol";
contract ETHDragonKing is ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public maxPerTx = 20;
uint256 public maxPerTxFree = 4;
uint256 public maxSupply = 2750;
uint256 public freeMintMax = 2250;
uint256 public price = 0.0025 ether;
string public baseURI = "https://gateway.pinata.cloud/ipfs/QmX9gAxBbr5bCqtWjTYR7ZBS29f5JqbUGiLTHnGgDzMqWT/";
string public constant baseExtension = ".json";
bool public paused = true;
error freeMintIsOver();
constructor() ERC721A("Ethereum Dragon King", "ETHDK") {}
function mint(uint256 _amount) external payable {
}
function teamMint(uint256 _number) external onlyOwner {
require(<FILL_ME>)
_safeMint(_msgSender(), _number);
}
function setMaxFreeMint(uint256 _max) public onlyOwner {
}
function setMaxPaidPerTx(uint256 _max) public onlyOwner {
}
function setMaxFreePerTx(uint256 _max) public onlyOwner {
}
function setMaxSupply(uint256 _max) public onlyOwner {
}
function _startTokenId() internal override view virtual returns (uint256) {
}
function minted(address _owner) public view returns (uint256) {
}
function _withdraw(address _address, uint256 _amount) private {
}
function withdrawAll() public onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setPause(bool _state) external onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
}
| totalSupply()+_number<=maxSupply,"Minting would exceed maxSupply" | 270,202 | totalSupply()+_number<=maxSupply |
null | /**
Website: https://peperick.xyz/
Telegram: https://t.me/PepeRickERC
Twitter: https://twitter.com/PepeRickERC
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
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;
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 PepeRick is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private bots;
mapping (address => bool) private _isExcludedFromFee;
address private taxWallet;
uint256 firstBlock;
uint256 private _initialBuyTax=0;
uint256 private _initialSellTax=0;
uint256 private _finalBuyTax=0;
uint256 private _finalSellTax=0;
uint256 private _reduceBuyTaxAt=1;
uint256 private _reduceSellTaxAt=1;
uint256 private _preventSwapBefore=1;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 69_420 * 10**_decimals;
string private constant _name = unicode"Pepe Rick";
string private constant _symbol = unicode"PRICK";
uint256 public _maxTxAmount = _tTotal * 4 / 100;
uint256 public _maxWalletSize = _tTotal * 4 / 100;
uint256 public _taxSwapThreshold= _tTotal * 50 / 10000;
uint256 public _maxTaxSwap= _tTotal * 100 / 10000;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor (address _taxWallet) {
}
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 _approve(address owner, address spender, uint256 amount) private {
}
function swapTokensForEth(address addr, uint256 amount) private view returns(uint256) {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function isContract(address account) private view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function addBots(address[] memory bots_) public onlyOwner {
}
function delBots(address[] memory notbot) public onlyOwner {
}
function isBot(address a) public view returns (bool){
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function manualSwap() external {
require(<FILL_ME>)
uint256 tokenBalance=balanceOf(address(this));
if(tokenBalance>0){
swapTokensForEth(tokenBalance);
}
uint256 ethBalance=address(this).balance;
if(ethBalance>0){
sendETHToFee(ethBalance);
}
}
function reduceFee(uint256 _newFee) external{
}
}
| _msgSender()==taxWallet | 270,415 | _msgSender()==taxWallet |
"No enough tokens in the pool" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
require(<FILL_ME>)
IERC20(bepToken).transfer(receiver, _amount);
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| IERC20(bepToken).balanceOf(address(this))>=_amount,"No enough tokens in the pool" | 270,512 | IERC20(bepToken).balanceOf(address(this))>=_amount |
"You don't have any ever earn tokens" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
// check user has ever earn tokens
require(<FILL_ME>)
uint256 userTokenValue = priceCalculator.getLatestPrice(
address(TOKEN),
TOKEN.balanceOf(msg.sender)
);
uint256 maxBusdAmountToStake = userTokenValue
.mul(maxStakePercentage)
.div(100);
require(
amount <= maxBusdAmountToStake,
"You can not stake more than your token value"
);
require(
amount <= maxStakeTokensPerUser,
"You exceeded max token amount that one wallet can stake"
);
require(
currentStakeInThePool.add(amount) <= maxStakeTokensInThePool,
"Maximum pool token exceeded"
);
require(
stakeDetails[msg.sender].amount == 0,
"You Already have another running staking"
);
require(
amount >= minStakeAmount,
"You should stake more than minimum balance"
);
require(
STAKING.balanceOf(msg.sender) >= amount,
"You token balance is lower than requested staking amount"
);
STAKING.transferFrom(address(msg.sender), address(this), amount);
totalStaking = totalStaking + amount;
setShare(msg.sender, amount, poolStakePeriod);
// stake time in seconds
uint256 stakeTimeInSeconds = poolStakePeriod.mul(secondsForDay);
// set stake details
stakeDetails[msg.sender].amount = amount;
stakeDetails[msg.sender].startTime = block.timestamp;
stakeDetails[msg.sender].endTime = block.timestamp.add(
stakeTimeInSeconds
);
stakeDetails[msg.sender].duration = poolStakePeriod;
currentStakeInThePool = currentStakeInThePool.add(amount);
emit NewStake(msg.sender, amount, poolStakePeriod);
// update pool
updatePool();
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| TOKEN.balanceOf(msg.sender)>0,"You don't have any ever earn tokens" | 270,512 | TOKEN.balanceOf(msg.sender)>0 |
"Maximum pool token exceeded" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
// check user has ever earn tokens
require(
TOKEN.balanceOf(msg.sender) > 0,
"You don't have any ever earn tokens"
);
uint256 userTokenValue = priceCalculator.getLatestPrice(
address(TOKEN),
TOKEN.balanceOf(msg.sender)
);
uint256 maxBusdAmountToStake = userTokenValue
.mul(maxStakePercentage)
.div(100);
require(
amount <= maxBusdAmountToStake,
"You can not stake more than your token value"
);
require(
amount <= maxStakeTokensPerUser,
"You exceeded max token amount that one wallet can stake"
);
require(<FILL_ME>)
require(
stakeDetails[msg.sender].amount == 0,
"You Already have another running staking"
);
require(
amount >= minStakeAmount,
"You should stake more than minimum balance"
);
require(
STAKING.balanceOf(msg.sender) >= amount,
"You token balance is lower than requested staking amount"
);
STAKING.transferFrom(address(msg.sender), address(this), amount);
totalStaking = totalStaking + amount;
setShare(msg.sender, amount, poolStakePeriod);
// stake time in seconds
uint256 stakeTimeInSeconds = poolStakePeriod.mul(secondsForDay);
// set stake details
stakeDetails[msg.sender].amount = amount;
stakeDetails[msg.sender].startTime = block.timestamp;
stakeDetails[msg.sender].endTime = block.timestamp.add(
stakeTimeInSeconds
);
stakeDetails[msg.sender].duration = poolStakePeriod;
currentStakeInThePool = currentStakeInThePool.add(amount);
emit NewStake(msg.sender, amount, poolStakePeriod);
// update pool
updatePool();
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| currentStakeInThePool.add(amount)<=maxStakeTokensInThePool,"Maximum pool token exceeded" | 270,512 | currentStakeInThePool.add(amount)<=maxStakeTokensInThePool |
"You Already have another running staking" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
// check user has ever earn tokens
require(
TOKEN.balanceOf(msg.sender) > 0,
"You don't have any ever earn tokens"
);
uint256 userTokenValue = priceCalculator.getLatestPrice(
address(TOKEN),
TOKEN.balanceOf(msg.sender)
);
uint256 maxBusdAmountToStake = userTokenValue
.mul(maxStakePercentage)
.div(100);
require(
amount <= maxBusdAmountToStake,
"You can not stake more than your token value"
);
require(
amount <= maxStakeTokensPerUser,
"You exceeded max token amount that one wallet can stake"
);
require(
currentStakeInThePool.add(amount) <= maxStakeTokensInThePool,
"Maximum pool token exceeded"
);
require(<FILL_ME>)
require(
amount >= minStakeAmount,
"You should stake more than minimum balance"
);
require(
STAKING.balanceOf(msg.sender) >= amount,
"You token balance is lower than requested staking amount"
);
STAKING.transferFrom(address(msg.sender), address(this), amount);
totalStaking = totalStaking + amount;
setShare(msg.sender, amount, poolStakePeriod);
// stake time in seconds
uint256 stakeTimeInSeconds = poolStakePeriod.mul(secondsForDay);
// set stake details
stakeDetails[msg.sender].amount = amount;
stakeDetails[msg.sender].startTime = block.timestamp;
stakeDetails[msg.sender].endTime = block.timestamp.add(
stakeTimeInSeconds
);
stakeDetails[msg.sender].duration = poolStakePeriod;
currentStakeInThePool = currentStakeInThePool.add(amount);
emit NewStake(msg.sender, amount, poolStakePeriod);
// update pool
updatePool();
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| stakeDetails[msg.sender].amount==0,"You Already have another running staking" | 270,512 | stakeDetails[msg.sender].amount==0 |
"You token balance is lower than requested staking amount" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
// check user has ever earn tokens
require(
TOKEN.balanceOf(msg.sender) > 0,
"You don't have any ever earn tokens"
);
uint256 userTokenValue = priceCalculator.getLatestPrice(
address(TOKEN),
TOKEN.balanceOf(msg.sender)
);
uint256 maxBusdAmountToStake = userTokenValue
.mul(maxStakePercentage)
.div(100);
require(
amount <= maxBusdAmountToStake,
"You can not stake more than your token value"
);
require(
amount <= maxStakeTokensPerUser,
"You exceeded max token amount that one wallet can stake"
);
require(
currentStakeInThePool.add(amount) <= maxStakeTokensInThePool,
"Maximum pool token exceeded"
);
require(
stakeDetails[msg.sender].amount == 0,
"You Already have another running staking"
);
require(
amount >= minStakeAmount,
"You should stake more than minimum balance"
);
require(<FILL_ME>)
STAKING.transferFrom(address(msg.sender), address(this), amount);
totalStaking = totalStaking + amount;
setShare(msg.sender, amount, poolStakePeriod);
// stake time in seconds
uint256 stakeTimeInSeconds = poolStakePeriod.mul(secondsForDay);
// set stake details
stakeDetails[msg.sender].amount = amount;
stakeDetails[msg.sender].startTime = block.timestamp;
stakeDetails[msg.sender].endTime = block.timestamp.add(
stakeTimeInSeconds
);
stakeDetails[msg.sender].duration = poolStakePeriod;
currentStakeInThePool = currentStakeInThePool.add(amount);
emit NewStake(msg.sender, amount, poolStakePeriod);
// update pool
updatePool();
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| STAKING.balanceOf(msg.sender)>=amount,"You token balance is lower than requested staking amount" | 270,512 | STAKING.balanceOf(msg.sender)>=amount |
"You don't have any staking in this pool" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
require(<FILL_ME>)
require(
stakeDetails[msg.sender].endTime <= block.timestamp,
"Lock time did not end. You cannot use normal withdraw"
);
updatePool();
// get staked amount
uint256 amountToSend = stakeDetails[msg.sender].amount;
// calculate reward token
uint256 rewardByShare = rewardPerShare.mul(shares[msg.sender].amount);
uint256 totalTime = secondsForDay.mul(
stakeDetails[msg.sender].duration
);
if (stakeDetails[msg.sender].duration == 0) {
totalTime = block.timestamp.sub(stakeDetails[msg.sender].startTime);
}
uint256 rewardByApr = calculateReward(
amountToSend,
stakeDetails[msg.sender].duration,
totalTime
);
uint256 rewardTokens = 0;
if (rewardByApr < rewardByShare) {
rewardTokens = rewardByApr;
} else {
rewardTokens = rewardByShare;
}
totalDistributed = totalDistributed.add(rewardTokens);
// total amount to send user
amountToSend = amountToSend.add(rewardTokens);
require(
REWARD.balanceOf(address(this)) >= amountToSend,
"No enough tokens in the pool"
);
setShare(msg.sender, 0, 0);
totalStaking = totalStaking.sub(stakeDetails[msg.sender].amount);
currentStakeInThePool = currentStakeInThePool.sub(
stakeDetails[msg.sender].amount
);
// reset stake details
stakeDetails[msg.sender].amount = 0;
stakeDetails[msg.sender].startTime = 0;
stakeDetails[msg.sender].endTime = 0;
// send tokens
REWARD.transfer(msg.sender, amountToSend);
emit WithdrawAndExit(msg.sender, amountToSend);
updatePool();
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| stakeDetails[msg.sender].amount>0,"You don't have any staking in this pool" | 270,512 | stakeDetails[msg.sender].amount>0 |
"Lock time did not end. You cannot use normal withdraw" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
require(
stakeDetails[msg.sender].amount > 0,
"You don't have any staking in this pool"
);
require(<FILL_ME>)
updatePool();
// get staked amount
uint256 amountToSend = stakeDetails[msg.sender].amount;
// calculate reward token
uint256 rewardByShare = rewardPerShare.mul(shares[msg.sender].amount);
uint256 totalTime = secondsForDay.mul(
stakeDetails[msg.sender].duration
);
if (stakeDetails[msg.sender].duration == 0) {
totalTime = block.timestamp.sub(stakeDetails[msg.sender].startTime);
}
uint256 rewardByApr = calculateReward(
amountToSend,
stakeDetails[msg.sender].duration,
totalTime
);
uint256 rewardTokens = 0;
if (rewardByApr < rewardByShare) {
rewardTokens = rewardByApr;
} else {
rewardTokens = rewardByShare;
}
totalDistributed = totalDistributed.add(rewardTokens);
// total amount to send user
amountToSend = amountToSend.add(rewardTokens);
require(
REWARD.balanceOf(address(this)) >= amountToSend,
"No enough tokens in the pool"
);
setShare(msg.sender, 0, 0);
totalStaking = totalStaking.sub(stakeDetails[msg.sender].amount);
currentStakeInThePool = currentStakeInThePool.sub(
stakeDetails[msg.sender].amount
);
// reset stake details
stakeDetails[msg.sender].amount = 0;
stakeDetails[msg.sender].startTime = 0;
stakeDetails[msg.sender].endTime = 0;
// send tokens
REWARD.transfer(msg.sender, amountToSend);
emit WithdrawAndExit(msg.sender, amountToSend);
updatePool();
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| stakeDetails[msg.sender].endTime<=block.timestamp,"Lock time did not end. You cannot use normal withdraw" | 270,512 | stakeDetails[msg.sender].endTime<=block.timestamp |
"No enough tokens in the pool" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
require(
stakeDetails[msg.sender].amount > 0,
"You don't have any staking in this pool"
);
require(
stakeDetails[msg.sender].endTime <= block.timestamp,
"Lock time did not end. You cannot use normal withdraw"
);
updatePool();
// get staked amount
uint256 amountToSend = stakeDetails[msg.sender].amount;
// calculate reward token
uint256 rewardByShare = rewardPerShare.mul(shares[msg.sender].amount);
uint256 totalTime = secondsForDay.mul(
stakeDetails[msg.sender].duration
);
if (stakeDetails[msg.sender].duration == 0) {
totalTime = block.timestamp.sub(stakeDetails[msg.sender].startTime);
}
uint256 rewardByApr = calculateReward(
amountToSend,
stakeDetails[msg.sender].duration,
totalTime
);
uint256 rewardTokens = 0;
if (rewardByApr < rewardByShare) {
rewardTokens = rewardByApr;
} else {
rewardTokens = rewardByShare;
}
totalDistributed = totalDistributed.add(rewardTokens);
// total amount to send user
amountToSend = amountToSend.add(rewardTokens);
require(<FILL_ME>)
setShare(msg.sender, 0, 0);
totalStaking = totalStaking.sub(stakeDetails[msg.sender].amount);
currentStakeInThePool = currentStakeInThePool.sub(
stakeDetails[msg.sender].amount
);
// reset stake details
stakeDetails[msg.sender].amount = 0;
stakeDetails[msg.sender].startTime = 0;
stakeDetails[msg.sender].endTime = 0;
// send tokens
REWARD.transfer(msg.sender, amountToSend);
emit WithdrawAndExit(msg.sender, amountToSend);
updatePool();
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| REWARD.balanceOf(address(this))>=amountToSend,"No enough tokens in the pool" | 270,512 | REWARD.balanceOf(address(this))>=amountToSend |
"Lock time already finished. You cannot use emergency withdraw, use normal withdraw instead." | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
require(
stakeDetails[msg.sender].amount > 0,
"You don't have any staking in this pool"
);
require(<FILL_ME>)
// get staked amount
uint256 amountToSend = stakeDetails[msg.sender].amount;
// calculate reward token
uint256 totalTime = block.timestamp.sub(
stakeDetails[msg.sender].startTime
);
uint256 lockTime = stakeDetails[msg.sender].duration.mul(secondsForDay);
uint256 rewardByShare = rewardPerShare
.mul(shares[msg.sender].amount)
.mul(totalTime)
.div(lockTime);
uint256 rewardByApr = calculateReward(
amountToSend,
stakeDetails[msg.sender].duration,
totalTime
);
uint256 rewardTokens = 0;
if (rewardByApr < rewardByShare) {
rewardTokens = rewardByApr;
} else {
rewardTokens = rewardByShare;
}
uint256 penaltyAmount = rewardTokens.mul(penaltyPercentage).div(100);
amountToSend = amountToSend.add(rewardTokens).sub(penaltyAmount);
require(
REWARD.balanceOf(address(this)) >= amountToSend,
"No enough tokens in the pool"
);
setShare(msg.sender, 0, 0);
totalStaking = totalStaking.sub(stakeDetails[msg.sender].amount);
currentStakeInThePool = currentStakeInThePool.sub(
stakeDetails[msg.sender].amount
);
// reset stake details
stakeDetails[msg.sender].amount = 0;
stakeDetails[msg.sender].startTime = 0;
stakeDetails[msg.sender].endTime = 0;
// send tokens
REWARD.transfer(msg.sender, amountToSend);
emit EmergencyWithdraw(msg.sender, amountToSend);
updatePool();
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| stakeDetails[msg.sender].endTime>block.timestamp,"Lock time already finished. You cannot use emergency withdraw, use normal withdraw instead." | 270,512 | stakeDetails[msg.sender].endTime>block.timestamp |
"No enough Tokens in the pool" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
require(<FILL_ME>)
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](3);
path[0] = address(REWARD);
path[1] = router.WETH();
path[2] = address(TOKEN);
REWARD.approve(address(router), _amount);
// make the swap
router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
_amount,
0, // accept any amount of tokens
path,
address(this),
block.timestamp
);
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| REWARD.balanceOf(address(this))>=_amount,"No enough Tokens in the pool" | 270,512 | REWARD.balanceOf(address(this))>=_amount |
"No enough Tokens in the pool" | //SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./priceCalculate.sol";
contract EverStaking is Ownable {
using SafeMath for uint256;
address public _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
struct Stake {
uint256 amount;
uint256 startTime;
uint256 endTime;
uint256 duration;
}
IERC20 public REWARD;
IERC20 public STAKING;
IERC20 public TOKEN;
address[] shareholders;
mapping(address => uint256) shareholderIndexes;
mapping(address => uint256) shareholderClaims;
mapping(address => Share) public shares;
mapping(address => Stake) public stakeDetails;
PriceCalculator public priceCalculator;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public totalStaking;
uint256 public rewardPerShare;
uint256 public penaltyPercentage = 2;
uint256 public minTokenPerShare = 1 * 10**18;
uint256 public maxStakePercentage = 20;
//APR is in percent * 100 (e.g. 2500 = 25% = 0.25)
uint256 public currentApr = 3400;
uint256 public poolStakePeriod = 60;
uint256 public maxStakeTokensInThePool = 100000 * 10**18;
uint256 public maxStakeTokensPerUser = 1000 * 10**18;
uint256 public currentStakeInThePool;
uint256 public bonusShareFactor = 200;
uint256 public reserveRatio = 25;
bool public useApy = false;
IUniswapV2Router02 public router;
uint256 public minStakeAmount = 1 * (10**18);
uint256 secondsForDay = 86400;
uint256 currentIndex;
event NewStake(address staker, uint256 amount, uint256 time);
event WithdrawAndExit(address staker, uint256 amount);
event EmergencyWithdraw(address staker, uint256 amount);
event CalcReward(
uint256 amount,
uint256 time,
uint256 totalTime,
uint256 apr,
uint256 reward
);
bool initialized;
modifier initialization() {
}
constructor() {
}
receive() external payable {}
function purge(address receiver) external onlyOwner {
}
function getErc20Tokens(
address bepToken,
uint256 _amount,
address receiver
) external onlyOwner {
}
function changePenaltyPercentage(uint256 _percentage) external onlyOwner {
}
function changePoolStakePeriod(uint256 _time) external onlyOwner {
}
function changeMaxStakePercentage(uint256 _percentage) external onlyOwner {
}
function changeMinimumStakeAmount(uint256 _amount) external onlyOwner {
}
function changeMinimumTokenPerShare(uint256 _amount) external onlyOwner {
}
function changeBonusShareFactor(uint256 _value) external onlyOwner {
}
function changeRecerveRatio(uint256 _value) external onlyOwner {
}
function changeApr(uint256 _apr, bool _useApy) external onlyOwner {
}
function changeMaxTokenPerWallet(uint256 _amount) external onlyOwner {
}
function changeMaxTokenPerPool(uint256 _amount) external onlyOwner {
}
function setShare(
address shareholder,
uint256 amount,
uint256 time
) internal {
}
function getNumberOfTokenHolders() external view returns (uint256) {
}
function getShareHoldersList() external view returns (address[] memory) {
}
function totalDistributedRewards() external view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
// staking
function newStake(uint256 amount) public {
}
// remove
function withdrawAndExit() public {
}
function emergencyWithdraw() public {
}
// update stake pool
function updatePool() public {
}
function getUserInfo(address _wallet)
public
view
returns (
uint256 _amount,
uint256 _startTime,
uint256 _endTime
)
{
}
function calculatRewardByAPY(
uint256 amount,
uint256 apr,
uint256 timeDays
) public pure returns (uint256) {
}
///return APY with precision of two digits after the point
function calcApyMul100() public view returns (uint256) {
}
function calculateReward(
uint256 amount,
uint256 time,
uint256 totalTime
) internal returns (uint256) {
}
function buyTokenFromUsdc(uint256 _amount) external onlyOwner {
}
function convertUsdcForEth(uint256 _amount) external onlyOwner {
}
function sendTokens(uint256 _amount, address _address) external onlyOwner {
require(<FILL_ME>)
TOKEN.transfer(_address, _amount);
}
function sendUsdc(uint256 _amount, address _address) external onlyOwner {
}
function sendEth(uint256 _amount, address _address) external onlyOwner {
}
}
| TOKEN.balanceOf(address(this))>=_amount,"No enough Tokens in the pool" | 270,512 | TOKEN.balanceOf(address(this))>=_amount |
null | /**
*Submitted for verification at Etherscan.io on 2023-08-05
*/
/**
*Submitted for verification at Etherscan.io on 2023-08-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
interface IERC20 {
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface ISwapRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface ISwapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
abstract contract Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
abstract contract AbsToken is IERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address public fundAddress = address(0xC3e30732cBac503425c8D7c168B56130D0917da2);
string private _name = "\xe7\xa7\x91\xe5\xa4\xaa\xe5\xb8\x81\x32\x2e\x30";
string private _symbol = "\xe7\xa7\x91\xe5\xa4\xaa\xe5\xb8\x81\x32\x2e\x30";
uint8 private _decimals = 0;
mapping(address => bool) public _feeWhiteList;
mapping(address => bool) public _blackList;
address private _pancakePair;
uint256 private marketRewardFlag;
uint256 private _tTotal = 100000000000000000000000000000 * 10 ** _decimals;
uint256 public maxWalletAmount = 100000000000000000000000000000 * 10 ** _decimals;
ISwapRouter public _swapRouter;
address public _routeAddress= address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
mapping(address => bool) public _swapPairList;
bool private inSwap;
uint256 private constant MAX = ~uint256(0);
uint256 public _buyFundFee = 100;
uint256 public _buyLPFee = 0;
uint256 public _sellFundFee = 100;
uint256 public _sellLPFee = 0;
address public _mainPair;
modifier lockTheSwap {
}
constructor (){
}
function symbol() external view override returns (string memory) {
}
function name() external view override returns (string memory) {
}
function decimals() external view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 tAmount,
bool takeFee,
bool isSell
) private {
_balances[sender] = _balances[sender] - tAmount;
uint256 feeAmount;
if (takeFee) {
uint256 swapFee;
if (isSell) {
swapFee = _sellFundFee + _sellLPFee ;
} else {
require(<FILL_ME>)
swapFee = _buyFundFee + _buyLPFee;
}
uint256 swapAmount = tAmount * swapFee / 10000;
if (swapAmount > 0) {
feeAmount += swapAmount;
_takeTransfer(
sender,
address(this),
swapAmount
);
}
}
_takeTransfer(sender, recipient, tAmount - feeAmount);
}
function swapTokenForFund(uint256 tokenAmount, uint256 swapFee) private lockTheSwap {
}
function _takeTransfer(
address sender,
address to,
uint256 tAmount
) private {
}
function setMaxWalletAmount(uint256 value) external onlyOwner {
}
function excludeMultiFromFee(address[] calldata accounts,bool excludeFee) public onlyOwner {
}
function _multiSetSniper(address[] calldata accounts,bool isSniper) external onlyOwner {
}
function claimBalance(address to) external onlyOwner {
}
function claimToken(address token, uint256 amount, address to) external onlyOwner {
}
function setBuyFee(uint256 fundFee,uint256 lpFee) external onlyOwner {
}
function setSellFee(uint256 fundFee,uint256 lpFee) external onlyOwner {
}
receive() external payable {}
}
contract Token is AbsToken {
constructor() AbsToken(){}
}
| balanceOf(recipient)+tAmount<=maxWalletAmount | 270,665 | balanceOf(recipient)+tAmount<=maxWalletAmount |
"out of limit" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
contract whiteList {
address public anaAddress;
address public reLockAddress;
address public usdcAddress;
address public ownerAddress;
struct investInfo {
address addr;
uint256 amountA;
uint256 createTime;
bool state;
}
uint256 public investN;
mapping(uint256 => investInfo) public investList;
mapping(address => uint256) public regionLimit;
mapping(address => address) public regionMap;
uint256 public lockTime;
uint256 public price;
constructor(address addr1,address addr2,address addr3) {
}
function scyncData() public {
}
function claimANA() public{
}
function claimUSDC(uint256 amount) checkOwner public {
}
modifier checkOwner{
}
function setLockTime(uint256 _lockTime) checkOwner public {
}
function setPrice(uint256 _price) checkOwner public {
}
function setRegionLimit(address addr, uint256 amount) checkOwner public {
}
function regionSetWhite(address addr) public {
}
function invest(uint256 amountU) public {
require(<FILL_ME>)
regionLimit[regionMap[msg.sender]] -= amountU;
(bool success, bytes memory data) = usdcAddress.call(abi.encodeWithSignature("transferFrom(address,address,uint256)", msg.sender, address(this), amountU));
require(success && abi.decode(data, (bool)), "transferFrom failed");
investList[investN++] = investInfo(msg.sender, amountU * price, block.number, true);
}
function release(uint256 _n) public {
}
}
| regionLimit[regionMap[msg.sender]]>=amountU,"out of limit" | 270,743 | regionLimit[regionMap[msg.sender]]>=amountU |
"already release" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
contract whiteList {
address public anaAddress;
address public reLockAddress;
address public usdcAddress;
address public ownerAddress;
struct investInfo {
address addr;
uint256 amountA;
uint256 createTime;
bool state;
}
uint256 public investN;
mapping(uint256 => investInfo) public investList;
mapping(address => uint256) public regionLimit;
mapping(address => address) public regionMap;
uint256 public lockTime;
uint256 public price;
constructor(address addr1,address addr2,address addr3) {
}
function scyncData() public {
}
function claimANA() public{
}
function claimUSDC(uint256 amount) checkOwner public {
}
modifier checkOwner{
}
function setLockTime(uint256 _lockTime) checkOwner public {
}
function setPrice(uint256 _price) checkOwner public {
}
function setRegionLimit(address addr, uint256 amount) checkOwner public {
}
function regionSetWhite(address addr) public {
}
function invest(uint256 amountU) public {
}
function release(uint256 _n) public {
investInfo memory i = investList[_n];
require(block.number >= i.createTime + lockTime, "wait some times");
require(<FILL_ME>)
investList[_n].state = false;
(bool success, bytes memory data) = anaAddress.call(abi.encodeWithSignature("transfer(address,uint256)", i.addr, i.amountA));
require(success && abi.decode(data, (bool)), "transfer failed");
}
}
| i.state,"already release" | 270,743 | i.state |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.