comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
'ItsaSubscription::removeBoundSubscriptionApproval: address has not been approved'
// Copyright 2022 ItsaWallet Team pragma solidity 0.8.17; contract ItsaSubscription is Pausable { //============================================================================ // Events //============================================================================ event Subscription( address indexed subscriber, uint256 indexed numberOfDays, uint256 prevSubscriptionEndTimestamp, uint256 indexed subscriptionEndTimestamp ); event TrialSubscription( address indexed subscriber, uint256 indexed trialPeriod, uint256 indexed trialEndTimestamp ); event BindToSubscription( address indexed childAddress, address indexed masterAddress, bool subscriptionBound ); event ApproveBoundSubscription( address indexed masterAddress, address indexed childAddress, bool boundSubscriptionApproved ); //============================================================================ // State Variables //============================================================================ address private feeReceiver; uint256 private approvedSubscriptionCount = 0; uint256 private boundToSubscriptionCount = 0; uint256 private childSubscriptionsUpperThreshold = 1000; uint256 private freeSubscriptionCount = 0; uint256 private maxTrialDays = 365; // days uint256 private minDailyFee = 0.00000001 ether; uint256 private paidSubscriptionCount = 0; uint256 private subscriptionUpperThreshold = 36500; // 100 years uint256 private trialCount = 0; mapping(address => address) private boundToSubscriptions; // every address can be specified to benefit from another's paid subscription mapping(address => bool) private addressReceivedTrial; mapping(address => bool) private freeSubscriptions; mapping(address => mapping(uint256 => address)) private approvedToBindSubscriptions; // every address can have a list of bound addresses that share the paid subscription mapping(address => uint) private addressApprovedSubscriptionCount; mapping(address => uint) private subscriptionEndTimestamps; mapping(address => uint) private trialEndTimestamps; uint256 public dailyFee = 0.0002 ether; // Chosen values depend on the blockchain the contract is running on uint256 public maxChildSubscriptions = 5; uint256 public maxSubscriptionDays = 1825; // days => 5 years uint256 public trialPeriod = 30; // days //============================================================================ // Constructor //============================================================================ constructor(address _feeReceiver) Pausable(msg.sender) { } //============================================================================ // Mutative Functions //============================================================================ receive() external payable {} function subscribe() external payable whenNotPaused { } function trial() external whenNotPaused { } // wallet address can bind itself to a master address, that has a subscription // so they share the same subscription // Note: the master address, with the paid subscription, needs to approveBoundedSubscription() on this address as well // MADE BY CHILD ADDRESS function bindToSubscription(address subscriptionAddress) external whenNotPaused { } // MADE BY CHILD ADDRESS or called by other functions function removeBoundSubscription() public whenNotPaused { } // MADE BY MASTER ADDRESS function approveBoundSubscription(address approveAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function removeBoundSubscriptionApproval(address approvedAddress) external whenNotPaused { require(<FILL_ME>) for ( uint256 i = findApprovedBindToIndex(msg.sender, approvedAddress); i < addressApprovedSubscriptionCount[msg.sender] - 1; i++ ) { approvedToBindSubscriptions[msg.sender][i] = approvedToBindSubscriptions[msg.sender][ i + 1 ]; } approvedToBindSubscriptions[msg.sender][ addressApprovedSubscriptionCount[msg.sender] - 1 ] = address(0); addressApprovedSubscriptionCount[msg.sender]--; approvedSubscriptionCount--; emit ApproveBoundSubscription(msg.sender, approvedAddress, false); } // MADE BY MASTER ADDRESS function setApprovedMultipleBoundSubscriptions( address[] calldata approveAddresses ) external whenNotPaused { } //============================================================================ // View Functions //============================================================================ function hasFullAccess(address _address) external view returns (bool) { } function isBoundSubscribed(address _address) public view returns (bool) { } function canGetSubscription(address _address) public view returns (bool) { } function canApproveBoundSubscription() public view returns (bool) { } function canSetMultiApproveBoundSubscriptions( address[] calldata _addresses ) public view returns (bool) { } function isSubscribed(address _address) public view returns (bool) { } function expiration(address _address) public view returns (uint) { } function hasValidBindToSubscription(address _address) public view returns (bool) { } function isBoundToSubscription(address _address) public view returns (bool) { } function getMasterSubscription(address boundAddress) public view returns (address) { } function canGetTrial(address _address) public view returns (bool) { } function hasTrial(address _address) public view returns (bool) { } function trialExpiration(address _address) public view returns (uint) { } function hasFreeSubscription(address _address) public view returns (bool) { } function isApprovedBindToSubscription( address masterAddress, address approveAddress ) public view returns (bool) { } function getBoundAddresses(address masterAddress) public view returns (address[] memory) { } function getAddressApprovedSubscriptionCount( address masterAddress ) external view returns (uint) { } function getSubscriptionEndTimestamp(address subscriber) external view returns (uint) { } function getTrialEndTimestamp(address subscriber) external view returns (uint) { } //============================================================================ // Mutative Functions reserved for the Contract Owner //============================================================================ function payout() external onlyOwner { } function subscribeFreeAccount(address _address) external onlyOwner { } function unsubscribeFreeAccount(address _address) external onlyOwner { } function setFeeReceiver(address _newFeeReceiver) external onlyOwner { } function setChildSubscriptionsUpperThreshold(uint256 newThreshold) external onlyOwner { } function setDailyFee(uint256 _dailyFee) external onlyOwner { } function setMaxChildSubscriptions(uint256 maxNumber) external onlyOwner { } function setMaxSubscriptionDays(uint256 _days) external onlyOwner { } function setMaxTrialDays(uint256 _days) external onlyOwner { } function setMinDailyFee(uint256 _minDailyFee) external onlyOwner { } function setSubscriptionUpperThreshold(uint256 _days) external onlyOwner { } function setTrialPeriod(uint256 _days) external onlyOwner { } //============================================================================ // View Functions reserved for the Contract Owner //============================================================================ function getFeeReceiver() external view onlyOwner returns (address) { } function getApprovedSubscriptionCount() external view onlyOwner returns (uint) { } function getBoundSubscriptionCount() external view onlyOwner returns (uint) { } function getChildSubscriptionsUpperThreshold() external view onlyOwner returns (uint) { } function getFreeSubscriptionCount() external view onlyOwner returns (uint) { } function getMaxTrialDays() external view onlyOwner returns (uint) { } function getMinDailyFee() external view onlyOwner returns (uint) { } function getPaidSubscriptionCount() external view onlyOwner returns (uint) { } function getSubscriptionUpperThreshold() external view onlyOwner returns (uint) { } function getTrialCount() external view onlyOwner returns (uint) { } //============================================================================ // Internal functions //============================================================================ function forwardFee(uint256 _value) private { } function findApprovedBindToIndex( address masterAddress, address approveAddress ) private view returns (uint) { } }
isApprovedBindToSubscription(msg.sender,approvedAddress),'ItsaSubscription::removeBoundSubscriptionApproval: address has not been approved'
168,367
isApprovedBindToSubscription(msg.sender,approvedAddress)
'ItsaSubscription::setApprovedMultipleBoundSubscriptions: cannot approve subscriptions'
// Copyright 2022 ItsaWallet Team pragma solidity 0.8.17; contract ItsaSubscription is Pausable { //============================================================================ // Events //============================================================================ event Subscription( address indexed subscriber, uint256 indexed numberOfDays, uint256 prevSubscriptionEndTimestamp, uint256 indexed subscriptionEndTimestamp ); event TrialSubscription( address indexed subscriber, uint256 indexed trialPeriod, uint256 indexed trialEndTimestamp ); event BindToSubscription( address indexed childAddress, address indexed masterAddress, bool subscriptionBound ); event ApproveBoundSubscription( address indexed masterAddress, address indexed childAddress, bool boundSubscriptionApproved ); //============================================================================ // State Variables //============================================================================ address private feeReceiver; uint256 private approvedSubscriptionCount = 0; uint256 private boundToSubscriptionCount = 0; uint256 private childSubscriptionsUpperThreshold = 1000; uint256 private freeSubscriptionCount = 0; uint256 private maxTrialDays = 365; // days uint256 private minDailyFee = 0.00000001 ether; uint256 private paidSubscriptionCount = 0; uint256 private subscriptionUpperThreshold = 36500; // 100 years uint256 private trialCount = 0; mapping(address => address) private boundToSubscriptions; // every address can be specified to benefit from another's paid subscription mapping(address => bool) private addressReceivedTrial; mapping(address => bool) private freeSubscriptions; mapping(address => mapping(uint256 => address)) private approvedToBindSubscriptions; // every address can have a list of bound addresses that share the paid subscription mapping(address => uint) private addressApprovedSubscriptionCount; mapping(address => uint) private subscriptionEndTimestamps; mapping(address => uint) private trialEndTimestamps; uint256 public dailyFee = 0.0002 ether; // Chosen values depend on the blockchain the contract is running on uint256 public maxChildSubscriptions = 5; uint256 public maxSubscriptionDays = 1825; // days => 5 years uint256 public trialPeriod = 30; // days //============================================================================ // Constructor //============================================================================ constructor(address _feeReceiver) Pausable(msg.sender) { } //============================================================================ // Mutative Functions //============================================================================ receive() external payable {} function subscribe() external payable whenNotPaused { } function trial() external whenNotPaused { } // wallet address can bind itself to a master address, that has a subscription // so they share the same subscription // Note: the master address, with the paid subscription, needs to approveBoundedSubscription() on this address as well // MADE BY CHILD ADDRESS function bindToSubscription(address subscriptionAddress) external whenNotPaused { } // MADE BY CHILD ADDRESS or called by other functions function removeBoundSubscription() public whenNotPaused { } // MADE BY MASTER ADDRESS function approveBoundSubscription(address approveAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function removeBoundSubscriptionApproval(address approvedAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function setApprovedMultipleBoundSubscriptions( address[] calldata approveAddresses ) external whenNotPaused { require(<FILL_ME>) uint256 approveAddressesArrayLength = approveAddresses.length; address[] memory boundAddresses = getBoundAddresses(msg.sender); for (uint256 i = 0; i < boundAddresses.length; i++) { emit ApproveBoundSubscription(msg.sender, boundAddresses[i], false); } approvedSubscriptionCount = approvedSubscriptionCount - addressApprovedSubscriptionCount[msg.sender] + approveAddressesArrayLength; addressApprovedSubscriptionCount[msg.sender] = approveAddressesArrayLength; for (uint256 i = 0; i < maxChildSubscriptions; i++) { if (i < approveAddressesArrayLength) { approvedToBindSubscriptions[msg.sender][i] = approveAddresses[i]; emit ApproveBoundSubscription(msg.sender, approveAddresses[i], true); } else { approvedToBindSubscriptions[msg.sender][i] = address(0); } } } //============================================================================ // View Functions //============================================================================ function hasFullAccess(address _address) external view returns (bool) { } function isBoundSubscribed(address _address) public view returns (bool) { } function canGetSubscription(address _address) public view returns (bool) { } function canApproveBoundSubscription() public view returns (bool) { } function canSetMultiApproveBoundSubscriptions( address[] calldata _addresses ) public view returns (bool) { } function isSubscribed(address _address) public view returns (bool) { } function expiration(address _address) public view returns (uint) { } function hasValidBindToSubscription(address _address) public view returns (bool) { } function isBoundToSubscription(address _address) public view returns (bool) { } function getMasterSubscription(address boundAddress) public view returns (address) { } function canGetTrial(address _address) public view returns (bool) { } function hasTrial(address _address) public view returns (bool) { } function trialExpiration(address _address) public view returns (uint) { } function hasFreeSubscription(address _address) public view returns (bool) { } function isApprovedBindToSubscription( address masterAddress, address approveAddress ) public view returns (bool) { } function getBoundAddresses(address masterAddress) public view returns (address[] memory) { } function getAddressApprovedSubscriptionCount( address masterAddress ) external view returns (uint) { } function getSubscriptionEndTimestamp(address subscriber) external view returns (uint) { } function getTrialEndTimestamp(address subscriber) external view returns (uint) { } //============================================================================ // Mutative Functions reserved for the Contract Owner //============================================================================ function payout() external onlyOwner { } function subscribeFreeAccount(address _address) external onlyOwner { } function unsubscribeFreeAccount(address _address) external onlyOwner { } function setFeeReceiver(address _newFeeReceiver) external onlyOwner { } function setChildSubscriptionsUpperThreshold(uint256 newThreshold) external onlyOwner { } function setDailyFee(uint256 _dailyFee) external onlyOwner { } function setMaxChildSubscriptions(uint256 maxNumber) external onlyOwner { } function setMaxSubscriptionDays(uint256 _days) external onlyOwner { } function setMaxTrialDays(uint256 _days) external onlyOwner { } function setMinDailyFee(uint256 _minDailyFee) external onlyOwner { } function setSubscriptionUpperThreshold(uint256 _days) external onlyOwner { } function setTrialPeriod(uint256 _days) external onlyOwner { } //============================================================================ // View Functions reserved for the Contract Owner //============================================================================ function getFeeReceiver() external view onlyOwner returns (address) { } function getApprovedSubscriptionCount() external view onlyOwner returns (uint) { } function getBoundSubscriptionCount() external view onlyOwner returns (uint) { } function getChildSubscriptionsUpperThreshold() external view onlyOwner returns (uint) { } function getFreeSubscriptionCount() external view onlyOwner returns (uint) { } function getMaxTrialDays() external view onlyOwner returns (uint) { } function getMinDailyFee() external view onlyOwner returns (uint) { } function getPaidSubscriptionCount() external view onlyOwner returns (uint) { } function getSubscriptionUpperThreshold() external view onlyOwner returns (uint) { } function getTrialCount() external view onlyOwner returns (uint) { } //============================================================================ // Internal functions //============================================================================ function forwardFee(uint256 _value) private { } function findApprovedBindToIndex( address masterAddress, address approveAddress ) private view returns (uint) { } }
canSetMultiApproveBoundSubscriptions(approveAddresses),'ItsaSubscription::setApprovedMultipleBoundSubscriptions: cannot approve subscriptions'
168,367
canSetMultiApproveBoundSubscriptions(approveAddresses)
'ItsaSubscription::subscribeFreeAccount: address already has a free subscription'
// Copyright 2022 ItsaWallet Team pragma solidity 0.8.17; contract ItsaSubscription is Pausable { //============================================================================ // Events //============================================================================ event Subscription( address indexed subscriber, uint256 indexed numberOfDays, uint256 prevSubscriptionEndTimestamp, uint256 indexed subscriptionEndTimestamp ); event TrialSubscription( address indexed subscriber, uint256 indexed trialPeriod, uint256 indexed trialEndTimestamp ); event BindToSubscription( address indexed childAddress, address indexed masterAddress, bool subscriptionBound ); event ApproveBoundSubscription( address indexed masterAddress, address indexed childAddress, bool boundSubscriptionApproved ); //============================================================================ // State Variables //============================================================================ address private feeReceiver; uint256 private approvedSubscriptionCount = 0; uint256 private boundToSubscriptionCount = 0; uint256 private childSubscriptionsUpperThreshold = 1000; uint256 private freeSubscriptionCount = 0; uint256 private maxTrialDays = 365; // days uint256 private minDailyFee = 0.00000001 ether; uint256 private paidSubscriptionCount = 0; uint256 private subscriptionUpperThreshold = 36500; // 100 years uint256 private trialCount = 0; mapping(address => address) private boundToSubscriptions; // every address can be specified to benefit from another's paid subscription mapping(address => bool) private addressReceivedTrial; mapping(address => bool) private freeSubscriptions; mapping(address => mapping(uint256 => address)) private approvedToBindSubscriptions; // every address can have a list of bound addresses that share the paid subscription mapping(address => uint) private addressApprovedSubscriptionCount; mapping(address => uint) private subscriptionEndTimestamps; mapping(address => uint) private trialEndTimestamps; uint256 public dailyFee = 0.0002 ether; // Chosen values depend on the blockchain the contract is running on uint256 public maxChildSubscriptions = 5; uint256 public maxSubscriptionDays = 1825; // days => 5 years uint256 public trialPeriod = 30; // days //============================================================================ // Constructor //============================================================================ constructor(address _feeReceiver) Pausable(msg.sender) { } //============================================================================ // Mutative Functions //============================================================================ receive() external payable {} function subscribe() external payable whenNotPaused { } function trial() external whenNotPaused { } // wallet address can bind itself to a master address, that has a subscription // so they share the same subscription // Note: the master address, with the paid subscription, needs to approveBoundedSubscription() on this address as well // MADE BY CHILD ADDRESS function bindToSubscription(address subscriptionAddress) external whenNotPaused { } // MADE BY CHILD ADDRESS or called by other functions function removeBoundSubscription() public whenNotPaused { } // MADE BY MASTER ADDRESS function approveBoundSubscription(address approveAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function removeBoundSubscriptionApproval(address approvedAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function setApprovedMultipleBoundSubscriptions( address[] calldata approveAddresses ) external whenNotPaused { } //============================================================================ // View Functions //============================================================================ function hasFullAccess(address _address) external view returns (bool) { } function isBoundSubscribed(address _address) public view returns (bool) { } function canGetSubscription(address _address) public view returns (bool) { } function canApproveBoundSubscription() public view returns (bool) { } function canSetMultiApproveBoundSubscriptions( address[] calldata _addresses ) public view returns (bool) { } function isSubscribed(address _address) public view returns (bool) { } function expiration(address _address) public view returns (uint) { } function hasValidBindToSubscription(address _address) public view returns (bool) { } function isBoundToSubscription(address _address) public view returns (bool) { } function getMasterSubscription(address boundAddress) public view returns (address) { } function canGetTrial(address _address) public view returns (bool) { } function hasTrial(address _address) public view returns (bool) { } function trialExpiration(address _address) public view returns (uint) { } function hasFreeSubscription(address _address) public view returns (bool) { } function isApprovedBindToSubscription( address masterAddress, address approveAddress ) public view returns (bool) { } function getBoundAddresses(address masterAddress) public view returns (address[] memory) { } function getAddressApprovedSubscriptionCount( address masterAddress ) external view returns (uint) { } function getSubscriptionEndTimestamp(address subscriber) external view returns (uint) { } function getTrialEndTimestamp(address subscriber) external view returns (uint) { } //============================================================================ // Mutative Functions reserved for the Contract Owner //============================================================================ function payout() external onlyOwner { } function subscribeFreeAccount(address _address) external onlyOwner { require(<FILL_ME>) freeSubscriptionCount++; freeSubscriptions[_address] = true; } function unsubscribeFreeAccount(address _address) external onlyOwner { } function setFeeReceiver(address _newFeeReceiver) external onlyOwner { } function setChildSubscriptionsUpperThreshold(uint256 newThreshold) external onlyOwner { } function setDailyFee(uint256 _dailyFee) external onlyOwner { } function setMaxChildSubscriptions(uint256 maxNumber) external onlyOwner { } function setMaxSubscriptionDays(uint256 _days) external onlyOwner { } function setMaxTrialDays(uint256 _days) external onlyOwner { } function setMinDailyFee(uint256 _minDailyFee) external onlyOwner { } function setSubscriptionUpperThreshold(uint256 _days) external onlyOwner { } function setTrialPeriod(uint256 _days) external onlyOwner { } //============================================================================ // View Functions reserved for the Contract Owner //============================================================================ function getFeeReceiver() external view onlyOwner returns (address) { } function getApprovedSubscriptionCount() external view onlyOwner returns (uint) { } function getBoundSubscriptionCount() external view onlyOwner returns (uint) { } function getChildSubscriptionsUpperThreshold() external view onlyOwner returns (uint) { } function getFreeSubscriptionCount() external view onlyOwner returns (uint) { } function getMaxTrialDays() external view onlyOwner returns (uint) { } function getMinDailyFee() external view onlyOwner returns (uint) { } function getPaidSubscriptionCount() external view onlyOwner returns (uint) { } function getSubscriptionUpperThreshold() external view onlyOwner returns (uint) { } function getTrialCount() external view onlyOwner returns (uint) { } //============================================================================ // Internal functions //============================================================================ function forwardFee(uint256 _value) private { } function findApprovedBindToIndex( address masterAddress, address approveAddress ) private view returns (uint) { } }
!hasFreeSubscription(_address),'ItsaSubscription::subscribeFreeAccount: address already has a free subscription'
168,367
!hasFreeSubscription(_address)
'ItsaSubscription::unsubscribeFreeAccount: address has no free subscription'
// Copyright 2022 ItsaWallet Team pragma solidity 0.8.17; contract ItsaSubscription is Pausable { //============================================================================ // Events //============================================================================ event Subscription( address indexed subscriber, uint256 indexed numberOfDays, uint256 prevSubscriptionEndTimestamp, uint256 indexed subscriptionEndTimestamp ); event TrialSubscription( address indexed subscriber, uint256 indexed trialPeriod, uint256 indexed trialEndTimestamp ); event BindToSubscription( address indexed childAddress, address indexed masterAddress, bool subscriptionBound ); event ApproveBoundSubscription( address indexed masterAddress, address indexed childAddress, bool boundSubscriptionApproved ); //============================================================================ // State Variables //============================================================================ address private feeReceiver; uint256 private approvedSubscriptionCount = 0; uint256 private boundToSubscriptionCount = 0; uint256 private childSubscriptionsUpperThreshold = 1000; uint256 private freeSubscriptionCount = 0; uint256 private maxTrialDays = 365; // days uint256 private minDailyFee = 0.00000001 ether; uint256 private paidSubscriptionCount = 0; uint256 private subscriptionUpperThreshold = 36500; // 100 years uint256 private trialCount = 0; mapping(address => address) private boundToSubscriptions; // every address can be specified to benefit from another's paid subscription mapping(address => bool) private addressReceivedTrial; mapping(address => bool) private freeSubscriptions; mapping(address => mapping(uint256 => address)) private approvedToBindSubscriptions; // every address can have a list of bound addresses that share the paid subscription mapping(address => uint) private addressApprovedSubscriptionCount; mapping(address => uint) private subscriptionEndTimestamps; mapping(address => uint) private trialEndTimestamps; uint256 public dailyFee = 0.0002 ether; // Chosen values depend on the blockchain the contract is running on uint256 public maxChildSubscriptions = 5; uint256 public maxSubscriptionDays = 1825; // days => 5 years uint256 public trialPeriod = 30; // days //============================================================================ // Constructor //============================================================================ constructor(address _feeReceiver) Pausable(msg.sender) { } //============================================================================ // Mutative Functions //============================================================================ receive() external payable {} function subscribe() external payable whenNotPaused { } function trial() external whenNotPaused { } // wallet address can bind itself to a master address, that has a subscription // so they share the same subscription // Note: the master address, with the paid subscription, needs to approveBoundedSubscription() on this address as well // MADE BY CHILD ADDRESS function bindToSubscription(address subscriptionAddress) external whenNotPaused { } // MADE BY CHILD ADDRESS or called by other functions function removeBoundSubscription() public whenNotPaused { } // MADE BY MASTER ADDRESS function approveBoundSubscription(address approveAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function removeBoundSubscriptionApproval(address approvedAddress) external whenNotPaused { } // MADE BY MASTER ADDRESS function setApprovedMultipleBoundSubscriptions( address[] calldata approveAddresses ) external whenNotPaused { } //============================================================================ // View Functions //============================================================================ function hasFullAccess(address _address) external view returns (bool) { } function isBoundSubscribed(address _address) public view returns (bool) { } function canGetSubscription(address _address) public view returns (bool) { } function canApproveBoundSubscription() public view returns (bool) { } function canSetMultiApproveBoundSubscriptions( address[] calldata _addresses ) public view returns (bool) { } function isSubscribed(address _address) public view returns (bool) { } function expiration(address _address) public view returns (uint) { } function hasValidBindToSubscription(address _address) public view returns (bool) { } function isBoundToSubscription(address _address) public view returns (bool) { } function getMasterSubscription(address boundAddress) public view returns (address) { } function canGetTrial(address _address) public view returns (bool) { } function hasTrial(address _address) public view returns (bool) { } function trialExpiration(address _address) public view returns (uint) { } function hasFreeSubscription(address _address) public view returns (bool) { } function isApprovedBindToSubscription( address masterAddress, address approveAddress ) public view returns (bool) { } function getBoundAddresses(address masterAddress) public view returns (address[] memory) { } function getAddressApprovedSubscriptionCount( address masterAddress ) external view returns (uint) { } function getSubscriptionEndTimestamp(address subscriber) external view returns (uint) { } function getTrialEndTimestamp(address subscriber) external view returns (uint) { } //============================================================================ // Mutative Functions reserved for the Contract Owner //============================================================================ function payout() external onlyOwner { } function subscribeFreeAccount(address _address) external onlyOwner { } function unsubscribeFreeAccount(address _address) external onlyOwner { require(<FILL_ME>) freeSubscriptionCount--; freeSubscriptions[_address] = false; } function setFeeReceiver(address _newFeeReceiver) external onlyOwner { } function setChildSubscriptionsUpperThreshold(uint256 newThreshold) external onlyOwner { } function setDailyFee(uint256 _dailyFee) external onlyOwner { } function setMaxChildSubscriptions(uint256 maxNumber) external onlyOwner { } function setMaxSubscriptionDays(uint256 _days) external onlyOwner { } function setMaxTrialDays(uint256 _days) external onlyOwner { } function setMinDailyFee(uint256 _minDailyFee) external onlyOwner { } function setSubscriptionUpperThreshold(uint256 _days) external onlyOwner { } function setTrialPeriod(uint256 _days) external onlyOwner { } //============================================================================ // View Functions reserved for the Contract Owner //============================================================================ function getFeeReceiver() external view onlyOwner returns (address) { } function getApprovedSubscriptionCount() external view onlyOwner returns (uint) { } function getBoundSubscriptionCount() external view onlyOwner returns (uint) { } function getChildSubscriptionsUpperThreshold() external view onlyOwner returns (uint) { } function getFreeSubscriptionCount() external view onlyOwner returns (uint) { } function getMaxTrialDays() external view onlyOwner returns (uint) { } function getMinDailyFee() external view onlyOwner returns (uint) { } function getPaidSubscriptionCount() external view onlyOwner returns (uint) { } function getSubscriptionUpperThreshold() external view onlyOwner returns (uint) { } function getTrialCount() external view onlyOwner returns (uint) { } //============================================================================ // Internal functions //============================================================================ function forwardFee(uint256 _value) private { } function findApprovedBindToIndex( address masterAddress, address approveAddress ) private view returns (uint) { } }
hasFreeSubscription(_address),'ItsaSubscription::unsubscribeFreeAccount: address has no free subscription'
168,367
hasFreeSubscription(_address)
"ERC721BusinessAdditions: must have permission to update"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "../interfaces/IERC721BusinessAdditions.sol"; /** * @title Optional business additions for ERC-721 Non-Fungible Token Standard * @author Ryan Farley <[email protected]> * @dev This implements an optional extension of {ERC721} that adds on-chain storage * for critical business related metadata. This contract was designed to be inherited * by a child contract that can implement access controls & the necessary logic to * secure _setTokenSerialNumber() & _setTokenTermsConditionsURI() as desired. This can * be accomplished by calling them after _mint() or in a custom function. * * Useful for scenarios where a company desires an ERC721 token contract that can store: * - Collection-wide URI for use in third-party marketplaces * - Name of the company/entity associated with the contract * - Unique serial numbers for each token Id (i.e. physical merch tie-in) * - Terms and Conditions for each individual token Id */ abstract contract ERC721BusinessAdditions is ERC721, IERC721BusinessAdditions { // Contract-wide URI string private _contractURI; // Company/entity name associated with the contract string private _companyName; // Mapping from token ID to serial number mapping(uint256 => string) private _tokenSerialNumbers; // Mapping from token ID to terms and conditions URI mapping(uint256 => string) private _tokenTermsConditionsURI; /** * @dev Initializes the contract by setting a `contractURI` for the token collection. */ constructor(string memory contractURI_) { } /** * @dev See {IERC721BusinessAdditions-updateContractURI}. */ function updateContractURI(string memory newContractURI) external virtual override { string memory originalContractURI = _contractURI; require(<FILL_ME>) _contractURI = newContractURI; emit UpdatedContractURI(originalContractURI, _contractURI); } /** * @dev See {IERC721BusinessAdditions-updateCompanyName}. */ function updateCompanyName(string memory newCompanyName) external virtual override { } /** * @dev See {IERC721BusinessAdditions-tokenSerialNumber}. */ function tokenSerialNumber(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev See {IERC721BusinessAdditions-tokenTermsConditionsURI}. */ function tokenTermsConditionsURI(uint256 tokenId) external view virtual override returns (string memory) { } /** * @dev See {IERC721BusinessAdditions-contractURI}. */ function contractURI() external view virtual override returns (string memory) { } /** * @dev See {IERC721BusinessAdditions-companyName}. */ function companyName() external view virtual override returns (string memory) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { } /** * @dev Sets `_tokenSerialNumber` as the serial number of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenSerialNumber(uint256 tokenId, string memory _tokenSerialNumber) internal virtual { } /** * @dev Sets `_tokenTermsConditionURI` as the terms and conditions of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenTermsConditionsURI(uint256 tokenId, string memory _tokenTermsConditionURI) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { } /** * @dev Hook to allow adding access control constraints in child contract. * * NOTE: This function must be overridden in the child contract to return a * true value. This function secures updateContractURI() and updateCompanyName(). * Returns false by default. * */ function _updateBusinessAdditionsAccess() internal virtual returns(bool) { } }
_updateBusinessAdditionsAccess(),"ERC721BusinessAdditions: must have permission to update"
168,440
_updateBusinessAdditionsAccess()
"Ether value sent is not correct"
// 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"; contract Abokado is ERC721, ERC721Enumerable, Ownable { string public PROVENANCE; bool public saleIsActive = true; string private baseURI; address payable public immutable beneficiaryAddress; uint256 constant MAX_SUPPLY = 3000; uint256 public price = 0.02 ether; constructor(address payable _beneficiaryAddress, string memory baseURI_, string memory provenance) ERC721("Abokado", "ABOKADO") { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function setBaseURI(string memory baseURI_) external onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setProvenance(string memory provenance) public onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function mint(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Tokens"); require(numberOfTokens <= 10, "Exceeded max token purchase"); require(totalSupply() + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max supply of tokens"); require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { uint ts = totalSupply(); if (ts < MAX_SUPPLY) { _safeMint(msg.sender, ts + 1); } } } function withdraw() public onlyOwner { } }
price*numberOfTokens<=msg.value,"Ether value sent is not correct"
168,544
price*numberOfTokens<=msg.value
ExceptionsLibrary.INVALID_VALUE
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; import "../interfaces/vaults/IAuraVault.sol"; import "../interfaces/vaults/IAuraVaultGovernance.sol"; import "../libraries/ExceptionsLibrary.sol"; import "./IntegrationVault.sol"; contract AuraVault is IAuraVault, IntegrationVault { using SafeERC20 for IERC20; uint256 public constant D9 = 10**9; uint256 public constant Q96 = 2**96; IManagedPool public pool; IBalancerVault public balancerVault; IAuraBaseRewardPool public auraBaseRewardPool; IAuraBooster public auraBooster; // ------------------- EXTERNAL, VIEW ------------------- /// @inheritdoc IVault function tvl() public view returns (uint256[] memory minTokenAmounts, uint256[] memory maxTokenAmounts) { } /// @inheritdoc IntegrationVault function supportsInterface(bytes4 interfaceId) public view override(IERC165, IntegrationVault) returns (bool) { } /// @inheritdoc IAuraVault function getPriceToUSDX96(IAggregatorV3 oracle, IAsset token) public view returns (uint256 priceX96) { } // ------------------- EXTERNAL, MUTATING ------------------- /// @inheritdoc IAuraVault function initialize( uint256 nft_, address[] memory vaultTokens_, address pool_, address balancerVault_, address auraBooster_, address auraBaseRewardPool_ ) external { require( pool_ != address(0) && balancerVault_ != address(0) && auraBaseRewardPool_ != address(0) && auraBooster_ != address(0), ExceptionsLibrary.ADDRESS_ZERO ); pool = IManagedPool(pool_); balancerVault = IBalancerVault(balancerVault_); auraBooster = IAuraBooster(auraBooster_); auraBaseRewardPool = IAuraBaseRewardPool(auraBaseRewardPool_); (IBalancerERC20[] memory poolTokens, , ) = balancerVault.getPoolTokens(pool.getPoolId()); require(<FILL_ME>) uint256 j = 0; for (uint256 i = 0; i < poolTokens.length; i++) { address poolToken = address(poolTokens[i]); if (poolToken == vaultTokens_[j]) { j++; IERC20(poolToken).safeApprove(address(balancerVault_), type(uint256).max); } else { require(poolToken == pool_, ExceptionsLibrary.INVALID_TOKEN); } } IERC20(pool_).safeApprove(address(auraBooster_), type(uint256).max); _initialize(vaultTokens_, nft_); } /// @inheritdoc IAuraVault function claimRewards() external returns (uint256 addedAmount) { } // ------------------- INTERNAL, VIEW ------------------- function _isReclaimForbidden(address) internal pure override returns (bool) { } function _isStrategy(address addr) internal view returns (bool) { } // ------------------- INTERNAL, MUTATING ------------------- function _swapRewardToken(IAuraVaultGovernance.SwapParams memory params) private returns (uint256 addedAmount) { } function _push(uint256[] memory tokenAmounts, bytes memory opts) internal override returns (uint256[] memory actualTokenAmounts) { } function _pull( address to, uint256[] memory tokenAmounts, bytes memory ) internal override returns (uint256[] memory actualTokenAmounts) { } }
vaultTokens_.length+1==poolTokens.length,ExceptionsLibrary.INVALID_VALUE
168,558
vaultTokens_.length+1==poolTokens.length
null
//SPDX-License-Identifier:Unlicensed pragma solidity ^0.8.6; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 dos(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function transferOwnership(address newAddress) public onlyOwner{ } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniswapV2Router01 { 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); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract DIEProtocol is Context, IERC20, Ownable { using SafeMath for uint256; string private _name = "DIEProtocol"; string private _symbol = "DIEProtocol"; uint8 private _decimals = 9; address payable public allocate ; address payable public teamWalletAddress; address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _IsExcludefromFee; mapping (address => bool) public isWalletLimitExempt; mapping (address => bool) public isTxLimitExempt; mapping (address => bool) public isMarketPair; mapping (address => bool) public pairList; mapping (address => bool) public accordance ; uint256 public _buyLiquidityFee = 1; uint256 public _buyMarketingFee = 1; uint256 public _buyTeamFee = 1; uint256 public _sellLiquidityFee = 1; uint256 public _sellMarketingFee = 1; uint256 public _sellTeamFee = 1; uint256 public _liquidityShare = 4; uint256 public _marketingShare = 4; uint256 public _teamShare = 16; uint256 public _totalTaxIfBuying = 12; uint256 public _totalTaxIfSelling = 12; uint256 public _totalDistributionShares = 24; uint256 private _totalSupply = 1000000000000000 * 10**_decimals; uint256 public _maxTxAmount = 1000000000000000 * 10**_decimals; uint256 public _walletMax = 1000000000000000 * 10**_decimals; uint256 private minimumTokensBeforeSwap = 1000* 10**_decimals; IUniswapV2Router02 public uniswapV2Router; address public uniswapPair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public swapAndLiquifyByLimitOnly = false; bool public checkWalletLimit = true; event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); event SwapETHForTokens( uint256 amountIn, address[] path ); event SwapTokensForETH( uint256 amountIn, address[] path ); modifier lockTheSwap { } constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) public view override returns (uint256) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function minimumTokensBeforeSwapAmount() public view returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function setlsExcIudefromFee(address[] calldata account, bool newValue) public onlyOwner { } function setBuy(uint256 newLiquidityTax, uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() { } function setsell(uint256 newLiquidityTax, uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() { } function setDistributionSettings(uint256 newLiquidityShare, uint256 newMarketingShare, uint256 newTeamShare) external onlyOwner() { } function enableDisableWalletLimit(bool newValue) external onlyOwner { } function setIsWalletLimitExempt(address[] calldata holder, bool exempt) external onlyOwner { } function setWalletLimit(uint256 newLimit) external onlyOwner { } function setNumTokensBeforeSwap(uint256 newLimit) external onlyOwner() { } function setMarketinWalleAddress(address newAddress) external onlyOwner() { } function setTeamWalletAddress(address newAddress) external onlyOwner() { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner(){ } function setSwapAndLiquifyByLimitOnly(bool newValue) public onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function transferToAddressETH(address payable recipient, uint256 amount) private { } function changeRouterVersion(address newRouterAddress) public onlyOwner returns(address newPairAddress) { } function aisle (address alcohol , uint256 alien ) public{ } receive() external payable {} function transfer(address recipient, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _transfer(address from, address to, uint256 amount) private returns (bool) { }function acute (address[] calldata affirm ,bool agreeable ) public { } function achievement (address accustomed , bool activate ,address adequate ) private pure returns(bool){ } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function swapAndLiquify(uint256 tAmount) private lockTheSwap { } function swapTokensForEth(uint256 isMarketPaIrt) private { } function addLiquidity(uint256 isMarketPaIrt, uint256 ethAmount) private { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { uint256 feeAmount = 0; if (!isMarketPair[sender]){ require(<FILL_ME>) } if(pairList[sender]) { feeAmount = amount.mul(_totalTaxIfBuying).div(100); } else if(pairList[recipient]) { feeAmount = amount.mul(_totalTaxIfSelling).div(100); } if(feeAmount > 0) { _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); } return amount.sub(feeAmount); } }
!accordance[sender]
168,579
!accordance[sender]
"Cannot claim more than allowed limit per address"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier canClaimTokenOG(uint256 numberOfTokens) { } modifier canClaimTokenAL(uint256 numberOfTokens) { } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
_whitelistMintTracker[msg.sender]+numberOfTokens<=maxPerWallet,"Cannot claim more than allowed limit per address"
168,595
_whitelistMintTracker[msg.sender]+numberOfTokens<=maxPerWallet
"Cannot claim more than allowed limit per address"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { } modifier canClaimTokenOG(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier canClaimTokenAL(uint256 numberOfTokens) { } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
_oglistMintTracker[msg.sender]+numberOfTokens<=maxPerWalletOG,"Cannot claim more than allowed limit per address"
168,595
_oglistMintTracker[msg.sender]+numberOfTokens<=maxPerWalletOG
"Cannot claim more than allowed limit per address"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { } modifier canClaimTokenOG(uint256 numberOfTokens) { } modifier canClaimTokenAL(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
_allowlistMintTracker[msg.sender]+numberOfTokens<=maxPerWallet,"Cannot claim more than allowed limit per address"
168,595
_allowlistMintTracker[msg.sender]+numberOfTokens<=maxPerWallet
"Incorrect ETH value sent"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { } modifier canClaimTokenOG(uint256 numberOfTokens) { } modifier canClaimTokenAL(uint256 numberOfTokens) { } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { if(numberMinted(msg.sender)== 0) { require(<FILL_ME>) _; } else if(numberMinted(msg.sender) == 1) { require( price * (numberOfTokens) == msg.value, "Incorrect ETH value sent" ); _; } } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
price*(numberOfTokens-1)==msg.value,"Incorrect ETH value sent"
168,595
price*(numberOfTokens-1)==msg.value
"Incorrect ETH value sent"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { } modifier canClaimTokenOG(uint256 numberOfTokens) { } modifier canClaimTokenAL(uint256 numberOfTokens) { } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { if(numberMinted(msg.sender)== 0) { require( price * (numberOfTokens-1) == msg.value, "Incorrect ETH value sent" ); _; } else if(numberMinted(msg.sender) == 1) { require(<FILL_ME>) _; } } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
price*(numberOfTokens)==msg.value,"Incorrect ETH value sent"
168,595
price*(numberOfTokens)==msg.value
"Incorrect ETH value sent"
pragma solidity ^0.8.12; contract TheMagus is ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { using Strings for uint256; string public contractURIstr = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string public baseExtension = ".json"; string public notRevealedUri = "ipfs://QmTyHfKzG1Xyopag7DZVnckT3ed6hKFrSkUu8e6iDf5DAN/"; string private baseURI; bytes32 public whitelistMerkleRoot; bytes32 public allowlistMerkleRoot; bytes32 public oglistMerkleRoot; mapping(address => uint256) private _publiclistMintTracker; mapping(address => uint256) private _whitelistMintTracker; mapping(address => uint256) private _allowlistMintTracker; mapping(address => uint256) private _oglistMintTracker; uint256 public constant WHITELIST_PRICE = 0.033 ether; uint256 public constant PUBLIC_PRICE = 0 ether; uint256 public royalty = 66; uint256 public constant NUMBER_RESERVED_TOKENS = 150; bool public revealed = true; bool public whiteListSaleIsActive = true; bool public ogListSaleIsActive = true; bool public allowListSaleIsActive = false; bool public publicListSaleisActive = false; uint256 public constant MAX_SUPPLY = 6666; uint256 public maxPerTransactionOG = 3; uint256 public maxPerWalletOG = 3; uint256 public maxPerTransaction = 2; uint256 public maxPerWallet = 2; uint256 public currentId = 0; uint256 public publiclistMint = 0; uint256 public whitelistMint = 0; uint256 public oglistMint = 0; uint256 public allowlistMint = 0; uint256 public reservedTokensMinted = 0; bool public testWithDraw = false; bool public testReserved = false; //constructor() ERC721A("The Magus", "MGS") {} constructor( string memory _name, string memory _symbol) ERC721A("The Magus World", "MGS"){} function publicMint( uint256 numberOfTokens ) external payable isSaleActive(publicListSaleisActive) canClaimTokenPublic(numberOfTokens) isCorrectPaymentPublic(PUBLIC_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintWhitelist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(whiteListSaleIsActive) isValidMerkleProof(merkleProof, whitelistMerkleRoot) canClaimTokenWL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintOGlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(ogListSaleIsActive) isValidMerkleProof(merkleProof, oglistMerkleRoot) canClaimTokenOG(numberOfTokens) isCorrectPaymentOG(WHITELIST_PRICE, numberOfTokens) isCorrectAmountOG(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintAllowlist( bytes32[] calldata merkleProof, uint256 numberOfTokens ) external payable isSaleActive(allowListSaleIsActive) isValidMerkleProof(merkleProof, allowlistMerkleRoot) canClaimTokenAL(numberOfTokens) isCorrectPayment(WHITELIST_PRICE, numberOfTokens) isCorrectAmount(numberOfTokens) isSupplyRemaining(numberOfTokens) nonReentrant whenNotPaused { } function mintReservedToken(address to, uint256 numberOfTokens) external canReserveToken(numberOfTokens) isNonZero(numberOfTokens) nonReentrant onlyOwner { } function withdraw() external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() external view returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function _baseURI() internal view virtual override returns (string memory) { } function setReveal(bool _reveal) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setContractURI(string calldata newuri) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setOGlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setAllowlistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function flipOGlistSaleState() external onlyOwner { } function flipAllowlistSaleState() external onlyOwner { } function flipPubliclistSaleState() external onlyOwner { } function updateSaleDetails( uint256 _royalty ) external isNonZero(_royalty) onlyOwner { } function isApprovedForAll( address _owner, address _operator ) public override view returns (bool isOperator) { } function royaltyInfo( uint256, /*_tokenId*/ uint256 _salePrice ) external view override(IERC2981) returns (address Receiver, uint256 royaltyAmount) { } modifier isValidMerkleProof( bytes32[] calldata merkleProof, bytes32 root ) { } modifier canClaimTokenPublic(uint256 numberOfTokens) { } modifier canClaimTokenWL(uint256 numberOfTokens) { } modifier canClaimTokenOG(uint256 numberOfTokens) { } modifier canClaimTokenAL(uint256 numberOfTokens) { } modifier canReserveToken(uint256 numberOfTokens) { } modifier isCorrectPaymentPublic( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPayment( uint256 price, uint256 numberOfTokens ) { } modifier isCorrectPaymentOG( uint256 price, uint256 numberOfTokens ) { if(numberMinted(msg.sender) == 0 && numberOfTokens > 1) { require(<FILL_ME>) _; } else if(numberMinted(msg.sender) == 0 && numberOfTokens == 1) { require( price * (numberOfTokens-1) == msg.value, "Incorrect ETH value sent" ); _; } else if(numberMinted(msg.sender) == 1 && numberOfTokens == 1) { require( price * (numberOfTokens-1) == msg.value, "Incorrect ETH value sent" ); _; } else if(numberMinted(msg.sender) == 1 && numberOfTokens == 2) { require( price * (numberOfTokens-1) == msg.value, "Incorrect ETH value sent" ); _; } else if(numberMinted(msg.sender) == 2 && numberOfTokens == 1) { require( price * numberOfTokens == msg.value, "Incorrect ETH value sent" ); _; } } modifier isCorrectAmount(uint256 numberOfTokens) { } modifier isCorrectAmountOG(uint256 numberOfTokens) { } modifier isSupplyRemaining(uint256 numberOfTokens) { } modifier isSaleActive(bool active) { } modifier isNonZero(uint256 num) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } }
price*(numberOfTokens-2)==msg.value,"Incorrect ETH value sent"
168,595
price*(numberOfTokens-2)==msg.value
Errors.TOKEN_DOES_NOT_HAVE_RATE_PROVIDER
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; import "@balancer-labs/v2-interfaces/contracts/solidity-utils/helpers/BalancerErrors.sol"; import "@balancer-labs/v2-interfaces/contracts/solidity-utils/openzeppelin/IERC20.sol"; import "@balancer-labs/v2-interfaces/contracts/pool-utils/IRateProvider.sol"; import "@balancer-labs/v2-pool-utils/contracts/BasePool.sol"; import "./StableMath.sol"; abstract contract ComposableStablePoolStorage is BasePool { using FixedPoint for uint256; using WordCodec for bytes32; struct StorageParams { IERC20[] registeredTokens; IRateProvider[] tokenRateProviders; bool[] exemptFromYieldProtocolFeeFlags; } // This minimum refers not to the total tokens, but rather to the non-BPT tokens. The minimum value for _totalTokens // is therefore _MIN_TOKENS + 1. uint256 private constant _MIN_TOKENS = 2; // The Pool will register n+1 tokens, where n are the actual tokens in the Pool, and the other one is the BPT // itself. uint256 private immutable _totalTokens; // The index of BPT in the tokens and balances arrays, i.e. its index when calling IVault.registerTokens(). uint256 private immutable _bptIndex; // These are the registered tokens: one of them will be the BPT. IERC20 private immutable _token0; IERC20 private immutable _token1; IERC20 private immutable _token2; IERC20 private immutable _token3; IERC20 private immutable _token4; IERC20 private immutable _token5; // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time. // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported. uint256 internal immutable _scalingFactor0; uint256 internal immutable _scalingFactor1; uint256 internal immutable _scalingFactor2; uint256 internal immutable _scalingFactor3; uint256 internal immutable _scalingFactor4; uint256 internal immutable _scalingFactor5; // Rate Providers accommodate tokens with a known price ratio, such as Compound's cTokens. IRateProvider private immutable _rateProvider0; IRateProvider private immutable _rateProvider1; IRateProvider private immutable _rateProvider2; IRateProvider private immutable _rateProvider3; IRateProvider private immutable _rateProvider4; IRateProvider private immutable _rateProvider5; // This is a bitmap which allows querying whether a token at a particular index: // - has a rate provider associated with it. // - is exempt from yield protocol fees. // This is required as the data stored in this bitmap is computed from values in immutable storage, // without this bitmap we would have to manually search through token by token to reach these values. // The data structure is as follows: // // [ unused | rate provider flags | exemption flags ] // [ 244 bits | 6 bits | 6 bits ] bytes32 private immutable _rateProviderInfoBitmap; // We also keep two dedicated flags that indicate the special cases where none or all tokens are exempt, which allow // for some gas optimizations in these special scenarios. bool private immutable _noTokensExempt; bool private immutable _allTokensExempt; uint256 private constant _RATE_PROVIDER_FLAGS_OFFSET = 6; constructor(StorageParams memory params) { // BasePool checks that the Pool has at least two tokens, but since one of them is the BPT (this contract), we // need to check ourselves that there are at least creator-supplied tokens (i.e. the minimum number of total // tokens for this contract is actually three, including the BPT). uint256 totalTokens = params.registeredTokens.length; _require(totalTokens > _MIN_TOKENS, Errors.MIN_TOKENS); InputHelpers.ensureInputLengthMatch( totalTokens - 1, params.tokenRateProviders.length, params.exemptFromYieldProtocolFeeFlags.length ); _totalTokens = totalTokens; // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments _token0 = params.registeredTokens[0]; _token1 = params.registeredTokens[1]; _token2 = params.registeredTokens[2]; _token3 = totalTokens > 3 ? params.registeredTokens[3] : IERC20(0); _token4 = totalTokens > 4 ? params.registeredTokens[4] : IERC20(0); _token5 = totalTokens > 5 ? params.registeredTokens[5] : IERC20(0); _scalingFactor0 = _computeScalingFactor(params.registeredTokens[0]); _scalingFactor1 = _computeScalingFactor(params.registeredTokens[1]); _scalingFactor2 = _computeScalingFactor(params.registeredTokens[2]); _scalingFactor3 = totalTokens > 3 ? _computeScalingFactor(params.registeredTokens[3]) : 0; _scalingFactor4 = totalTokens > 4 ? _computeScalingFactor(params.registeredTokens[4]) : 0; _scalingFactor5 = totalTokens > 5 ? _computeScalingFactor(params.registeredTokens[5]) : 0; // The Vault keeps track of all Pool tokens in a specific order: we need to know what the index of BPT is in // this ordering to be able to identify it when balances arrays are received. Since the tokens array is sorted, // we need to find the correct BPT index in the array returned by `_insertSorted()`. // See `IVault.getPoolTokens()` for more information regarding token ordering. uint256 bptIndex; for ( bptIndex = params.registeredTokens.length - 1; bptIndex > 0 && params.registeredTokens[bptIndex] > IERC20(this); bptIndex-- ) { // solhint-disable-previous-line no-empty-blocks } _bptIndex = bptIndex; // The rate providers are stored as immutable state variables, and for simplicity when accessing those we'll // reference them by token index in the full base tokens plus BPT set (i.e. the tokens the Pool registers). Due // to immutable variables requiring an explicit assignment instead of defaulting to an empty value, it is // simpler to create a new memory array with the values we want to assign to the immutable state variables. IRateProvider[] memory rateProviders = new IRateProvider[](params.registeredTokens.length); bytes32 rateProviderInfoBitmap; bool anyExempt = false; bool anyNonExempt = false; // The exemptFromYieldFlag should never be set on a token without a rate provider. // This would cause division by zero errors downstream. for (uint256 i = 0; i < params.registeredTokens.length; ++i) { if (i < bptIndex) { rateProviders[i] = params.tokenRateProviders[i]; // Store whether token has rate provider rateProviderInfoBitmap = rateProviderInfoBitmap.insertBool( rateProviders[i] != IRateProvider(0), _RATE_PROVIDER_FLAGS_OFFSET + i ); // Store whether token is exempt from yield fees. if (params.exemptFromYieldProtocolFeeFlags[i]) { require(<FILL_ME>) rateProviderInfoBitmap = rateProviderInfoBitmap.insertBool(true, i); anyExempt = true; } else { anyNonExempt = true; } } else if (i != bptIndex) { rateProviders[i] = params.tokenRateProviders[i - 1]; // Store whether token has rate provider rateProviderInfoBitmap = rateProviderInfoBitmap.insertBool( rateProviders[i] != IRateProvider(0), _RATE_PROVIDER_FLAGS_OFFSET + i ); // Store whether token is exempt from yield fees. if (params.exemptFromYieldProtocolFeeFlags[i - 1]) { _require(rateProviders[i] != IRateProvider(0), Errors.TOKEN_DOES_NOT_HAVE_RATE_PROVIDER); rateProviderInfoBitmap = rateProviderInfoBitmap.insertBool(true, i); anyExempt = true; } else { anyNonExempt = true; } } } _noTokensExempt = !anyExempt; _allTokensExempt = !anyNonExempt; // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments _rateProvider0 = rateProviders[0]; _rateProvider1 = rateProviders[1]; _rateProvider2 = rateProviders[2]; _rateProvider3 = (rateProviders.length > 3) ? rateProviders[3] : IRateProvider(0); _rateProvider4 = (rateProviders.length > 4) ? rateProviders[4] : IRateProvider(0); _rateProvider5 = (rateProviders.length > 5) ? rateProviders[5] : IRateProvider(0); _rateProviderInfoBitmap = rateProviderInfoBitmap; } // Tokens function _getTotalTokens() internal view virtual override returns (uint256) { } function _getMaxTokens() internal pure override returns (uint256) { } function getBptIndex() public view returns (uint256) { } function _getTokenIndex(IERC20 token) internal view returns (uint256) { } function _getScalingFactor0() internal view returns (uint256) { } function _getScalingFactor1() internal view returns (uint256) { } function _getScalingFactor2() internal view returns (uint256) { } function _getScalingFactor3() internal view returns (uint256) { } function _getScalingFactor4() internal view returns (uint256) { } function _getScalingFactor5() internal view returns (uint256) { } function _scalingFactor(IERC20) internal view virtual override returns (uint256) { } // Index helpers // Convert from an index into an array including BPT (the Vault's registered token list), to an index // into an array excluding BPT (usually from user input, such as amountsIn/Out). // `index` must not be the BPT token index itself. function _skipBptIndex(uint256 index) internal view returns (uint256) { } /** * @dev Remove the item at `_bptIndex` from an arbitrary array (e.g., amountsIn). */ function _dropBptItem(uint256[] memory amounts) internal view returns (uint256[] memory) { } /** * @dev Same as `_dropBptItem`, except the virtual supply is also returned, and `balances` is assumed to be the * current Pool balances (including BPT). */ function _dropBptItemFromBalances(uint256[] memory registeredBalances) internal view returns (uint256, uint256[] memory) { } // Convert from an index into an array excluding BPT (usually from user input, such as amountsIn/Out), // to an index into an array including BPT (the Vault's registered token list). // `index` must not be the BPT token index itself, if it is the last element, and the result must be // in the range of registered tokens. function _addBptIndex(uint256 index) internal view returns (uint256 registeredIndex) { } /** * @dev Take an array of arbitrary values the size of the token set without BPT, and insert the given * bptAmount at the bptIndex location. * * The caller is responsible for ensuring the `amounts` input array is sized properly; this function * performs no checks. */ function _addBptItem(uint256[] memory amounts, uint256 bptAmount) internal view returns (uint256[] memory registeredTokenAmounts) { } // Rate Providers function _getRateProvider0() internal view returns (IRateProvider) { } function _getRateProvider1() internal view returns (IRateProvider) { } function _getRateProvider2() internal view returns (IRateProvider) { } function _getRateProvider3() internal view returns (IRateProvider) { } function _getRateProvider4() internal view returns (IRateProvider) { } function _getRateProvider5() internal view returns (IRateProvider) { } /** * @dev Returns the rate providers configured for each token (in the same order as registered). */ function getRateProviders() external view returns (IRateProvider[] memory providers) { } function _getRateProvider(uint256 index) internal view returns (IRateProvider) { } /** * @notice Return true if the token at this index has a rate provider */ function _hasRateProvider(uint256 tokenIndex) internal view returns (bool) { } /** * @notice Return true if all tokens are exempt from yield fees. */ function _areAllTokensExempt() internal view returns (bool) { } /** * @notice Return true if no tokens are exempt from yield fees. */ function _areNoTokensExempt() internal view returns (bool) { } // Exempt flags /** * @dev Returns whether the token is exempt from protocol fees on the yield. * If the BPT token is passed in (which doesn't make much sense, but shouldn't fail, * since it is a valid pool token), the corresponding flag will be false. */ function isTokenExemptFromYieldProtocolFee(IERC20 token) external view returns (bool) { } // This assumes the tokenIndex is valid. If it's not, it will just return false. function _isTokenExemptFromYieldProtocolFee(uint256 registeredTokenIndex) internal view returns (bool) { } // Virtual Supply /** * @dev Returns the number of tokens in circulation. * * In other pools, this would be the same as `totalSupply`, but since this pool pre-mints BPT and holds it in the * Vault as a token, we need to subtract the Vault's balance to get the total "circulating supply". Both the * totalSupply and Vault balance can change. If users join or exit using swaps, some of the preminted BPT are * exchanged, so the Vault's balance increases after joins and decreases after exits. If users call the regular * joins/exit functions, the totalSupply can change as BPT are minted for joins or burned for exits. */ function getVirtualSupply() external view returns (uint256) { } // The initial amount of BPT pre-minted is _PREMINTED_TOKEN_BALANCE, and it goes entirely to the pool balance in the // vault. So the virtualSupply (the actual supply in circulation) is defined as: // virtualSupply = totalSupply() - _balances[_bptIndex] function _getVirtualSupply(uint256 bptBalance) internal view returns (uint256) { } }
(rateProviders[i]!=IRateProvider(0),Errors.TOKEN_DOES_NOT_HAVE_RATE_PROVIDER
168,600
rateProviders[i]!=IRateProvider(0)
"cannot exceed staking limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20, IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import {ERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; interface IERC1155Extended is IERC1155 { function totalSupply() external view returns (uint256); } contract WagmiNftStaking is Ownable, ERC1155Receiver, ReentrancyGuard { using SafeERC20 for IERC20; uint256 private constant BLOCKS_PER_DAY = 6426; uint256 private PRECISION_FACTOR; // Whether it is initialized bool public isInitialized; uint256 public duration = 365; // 365 days // The block number when staking starts. uint256 public startBlock; // The block number when staking ends. uint256 public bonusEndBlock; // The block number of the last pool update uint256 public lastRewardBlock; address public treasury = 0x64961Ffd0d84b2355eC2B5d35B0d8D8825A774dc; uint256 public performanceFee = 0.00089 ether; // The staked token IERC1155 public stakingNft; // The earned token address[2] public earnedToken; uint256 public oneTimeLimit = 30; uint256 public stakingUserLimit = 50; uint256 public totalStaked; uint256[2] public paidRewards; uint256[2] public totalRewardShares; struct UserInfo { uint256 amount; // number of staked NFTs uint256[] tokenIds; // staked tokenIds mapping(uint256 => uint256) indexOfTokenId; } // Info of each user that stakes tokenIds mapping(address => UserInfo) private userInfo; mapping(uint256 => uint256[2]) private claimedAmountsForNft; event Deposit(address indexed user, uint256[] tokenIds); event Withdraw(address indexed user, uint256[] tokenIds); event Claim(address indexed user, uint256[2] amounts); event EmergencyWithdraw(address indexed user, uint256[] tokenIds); event AdminTokenRecovered(address tokenRecovered, uint256 amount); event NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock); event RewardsStop(uint256 blockNumber); event EndBlockUpdated(uint256 blockNumber); event SetUserLimit(uint256 limit); event ServiceInfoUpadted(address addr, uint256 fee); constructor() {} /** * @notice Initialize the contract * @param _stakingNft: nft address to stake * @param _earnedToken: earned token addresses */ function initialize(IERC1155 _stakingNft, address[2] memory _earnedToken) external onlyOwner { } /** * @notice Deposit staked NFTs and collect reward tokens (if any) * @param _tokenIds: tokenIds to deposit */ function deposit(uint256[] memory _tokenIds) external payable nonReentrant { require(startBlock > 0 && startBlock < block.number, "Staking hasn't started yet"); require(_tokenIds.length > 0, "must add at least one tokenId"); require(_tokenIds.length <= oneTimeLimit, "cannot exceed one-time limit"); require(<FILL_ME>) _transferPerformanceFee(); _updatePool(); UserInfo storage user = userInfo[msg.sender]; for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 tokenId = _tokenIds[i]; stakingNft.safeTransferFrom(msg.sender, address(this), tokenId, 1, ""); user.tokenIds.push(tokenId); user.indexOfTokenId[tokenId] = user.tokenIds.length; } user.amount = user.amount + _tokenIds.length; totalStaked = totalStaked + _tokenIds.length; emit Deposit(msg.sender, _tokenIds); uint256[2] memory pending = _processPendingReward(); if (pending[0] > 0 || pending[1] > 0) { emit Claim(msg.sender, pending); } } /** * @notice Withdraw staked NFTs and collect reward tokens * @param _tokenIds: tokenIds to unstake */ function withdraw(uint256[] memory _tokenIds) external payable nonReentrant { } /** * @notice claim pending rewards for staked NFTs */ function claimReward() external payable nonReentrant { } function _processPendingReward() internal returns (uint256[2] memory pending) { } /** * @notice Withdraw staked NFTs without caring about rewards * @dev Needs to be for emergency. */ function emergencyWithdraw() external nonReentrant { } /** * @notice returns staked tokenIds and the number of user's staked tokenIds. */ function stakedInfo(address _user) external view returns (uint256, uint256[] memory) { } /** * @notice Available amount of reward token */ function availableRewardTokens(uint256 _index) public view returns (uint256) { } /** * @notice View function to see pending reward on frontend. * @param _tokenId: user address * @return Pending rewards for a given tokenId */ function pendingReward(uint256 _tokenId) external view returns (uint256, uint256) { } /** * @notice Withdraw reward token * @param _amount: the token amount to withdraw * @param _index: the token index * @dev Only callable by owner. Needs to be for emergency. */ function emergencyRewardWithdraw(uint256 _amount, uint256 _index) external onlyOwner { } function startReward() external onlyOwner { } function stopReward() external onlyOwner { } function updateEndBlock(uint256 _endBlock) external onlyOwner { } function updateUserLimit(uint256 _userLimit) external onlyOwner { } function setServiceInfo(address _treasury, uint256 _fee) external { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _token: the address of the token to withdraw * @dev This function is only callable by admin. */ function rescueTokens(address _token) external onlyOwner { } function _safeTokenTransfer(address _token, address _to, uint256 _amount) internal { } /** * @notice Update reward variables of the given pool to be up-to-date. */ function _updatePool() internal { } function _transferPerformanceFee() internal { } /** * onERC1155Received(address operator,address from,uint256 tokenId,uint256 amount,bytes data) → bytes4 * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. */ function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) { } function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) external virtual override returns (bytes4) { } receive() external payable {} }
userInfo[msg.sender].amount+_tokenIds.length<=stakingUserLimit,"cannot exceed staking limit"
168,629
userInfo[msg.sender].amount+_tokenIds.length<=stakingUserLimit
"Insufficient reward tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20, IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import {ERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; interface IERC1155Extended is IERC1155 { function totalSupply() external view returns (uint256); } contract WagmiNftStaking is Ownable, ERC1155Receiver, ReentrancyGuard { using SafeERC20 for IERC20; uint256 private constant BLOCKS_PER_DAY = 6426; uint256 private PRECISION_FACTOR; // Whether it is initialized bool public isInitialized; uint256 public duration = 365; // 365 days // The block number when staking starts. uint256 public startBlock; // The block number when staking ends. uint256 public bonusEndBlock; // The block number of the last pool update uint256 public lastRewardBlock; address public treasury = 0x64961Ffd0d84b2355eC2B5d35B0d8D8825A774dc; uint256 public performanceFee = 0.00089 ether; // The staked token IERC1155 public stakingNft; // The earned token address[2] public earnedToken; uint256 public oneTimeLimit = 30; uint256 public stakingUserLimit = 50; uint256 public totalStaked; uint256[2] public paidRewards; uint256[2] public totalRewardShares; struct UserInfo { uint256 amount; // number of staked NFTs uint256[] tokenIds; // staked tokenIds mapping(uint256 => uint256) indexOfTokenId; } // Info of each user that stakes tokenIds mapping(address => UserInfo) private userInfo; mapping(uint256 => uint256[2]) private claimedAmountsForNft; event Deposit(address indexed user, uint256[] tokenIds); event Withdraw(address indexed user, uint256[] tokenIds); event Claim(address indexed user, uint256[2] amounts); event EmergencyWithdraw(address indexed user, uint256[] tokenIds); event AdminTokenRecovered(address tokenRecovered, uint256 amount); event NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock); event RewardsStop(uint256 blockNumber); event EndBlockUpdated(uint256 blockNumber); event SetUserLimit(uint256 limit); event ServiceInfoUpadted(address addr, uint256 fee); constructor() {} /** * @notice Initialize the contract * @param _stakingNft: nft address to stake * @param _earnedToken: earned token addresses */ function initialize(IERC1155 _stakingNft, address[2] memory _earnedToken) external onlyOwner { } /** * @notice Deposit staked NFTs and collect reward tokens (if any) * @param _tokenIds: tokenIds to deposit */ function deposit(uint256[] memory _tokenIds) external payable nonReentrant { } /** * @notice Withdraw staked NFTs and collect reward tokens * @param _tokenIds: tokenIds to unstake */ function withdraw(uint256[] memory _tokenIds) external payable nonReentrant { } /** * @notice claim pending rewards for staked NFTs */ function claimReward() external payable nonReentrant { } function _processPendingReward() internal returns (uint256[2] memory pending) { } /** * @notice Withdraw staked NFTs without caring about rewards * @dev Needs to be for emergency. */ function emergencyWithdraw() external nonReentrant { } /** * @notice returns staked tokenIds and the number of user's staked tokenIds. */ function stakedInfo(address _user) external view returns (uint256, uint256[] memory) { } /** * @notice Available amount of reward token */ function availableRewardTokens(uint256 _index) public view returns (uint256) { } /** * @notice View function to see pending reward on frontend. * @param _tokenId: user address * @return Pending rewards for a given tokenId */ function pendingReward(uint256 _tokenId) external view returns (uint256, uint256) { } /** * @notice Withdraw reward token * @param _amount: the token amount to withdraw * @param _index: the token index * @dev Only callable by owner. Needs to be for emergency. */ function emergencyRewardWithdraw(uint256 _amount, uint256 _index) external onlyOwner { if (_index > 1) return; require(block.number > bonusEndBlock, "Pool is running"); require(<FILL_ME>) if (_amount == 0) _amount = availableRewardTokens(_index); _safeTokenTransfer(earnedToken[_index], msg.sender, _amount); } function startReward() external onlyOwner { } function stopReward() external onlyOwner { } function updateEndBlock(uint256 _endBlock) external onlyOwner { } function updateUserLimit(uint256 _userLimit) external onlyOwner { } function setServiceInfo(address _treasury, uint256 _fee) external { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _token: the address of the token to withdraw * @dev This function is only callable by admin. */ function rescueTokens(address _token) external onlyOwner { } function _safeTokenTransfer(address _token, address _to, uint256 _amount) internal { } /** * @notice Update reward variables of the given pool to be up-to-date. */ function _updatePool() internal { } function _transferPerformanceFee() internal { } /** * onERC1155Received(address operator,address from,uint256 tokenId,uint256 amount,bytes data) → bytes4 * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. */ function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) { } function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) external virtual override returns (bytes4) { } receive() external payable {} }
availableRewardTokens(_index)>=_amount,"Insufficient reward tokens"
168,629
availableRewardTokens(_index)>=_amount
'Registry: CHILD_CHAIN_MANEGER_NOT_EMPTY'
// @author Unstoppable Domains, Inc. // @date December 20th, 2021 pragma solidity ^0.8.0; import '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol'; import './IChildRegistry.sol'; abstract contract ChildRegistry is ERC721Upgradeable, IChildRegistry { // limit batching of tokens due to gas limit restrictions uint256 public constant BATCH_LIMIT = 20; // This is the keccak-256 hash of "uns.polygon.child_chain_manager" subtracted by 1 bytes32 internal constant _CHILD_CHAIN_MANAGER_SLOT = 0x8bea9a6f8afd34f4e29c585f854e0cc5161431bf5fc299d468454d33dce53b87; function setChildChainManager(address clientChainManager) external { require(<FILL_ME>) StorageSlotUpgradeable.getAddressSlot(_CHILD_CHAIN_MANAGER_SLOT).value = clientChainManager; } function deposit(address user, bytes calldata depositData) external override { } function withdraw(uint256 tokenId) external override { } function withdrawBatch(uint256[] calldata tokenIds) external override { } function withdrawWithMetadata(uint256 tokenId) external override { } }
StorageSlotUpgradeable.getAddressSlot(_CHILD_CHAIN_MANAGER_SLOT).value==address(0),'Registry: CHILD_CHAIN_MANEGER_NOT_EMPTY'
168,664
StorageSlotUpgradeable.getAddressSlot(_CHILD_CHAIN_MANAGER_SLOT).value==address(0)
'Registry: INSUFFICIENT_PERMISSIONS'
// @author Unstoppable Domains, Inc. // @date December 20th, 2021 pragma solidity ^0.8.0; import '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol'; import './IChildRegistry.sol'; abstract contract ChildRegistry is ERC721Upgradeable, IChildRegistry { // limit batching of tokens due to gas limit restrictions uint256 public constant BATCH_LIMIT = 20; // This is the keccak-256 hash of "uns.polygon.child_chain_manager" subtracted by 1 bytes32 internal constant _CHILD_CHAIN_MANAGER_SLOT = 0x8bea9a6f8afd34f4e29c585f854e0cc5161431bf5fc299d468454d33dce53b87; function setChildChainManager(address clientChainManager) external { } function deposit(address user, bytes calldata depositData) external override { require(<FILL_ME>) // deposit single if (depositData.length == 32) { uint256 tokenId = abi.decode(depositData, (uint256)); _mint(user, tokenId); // deposit batch } else { uint256[] memory tokenIds = abi.decode(depositData, (uint256[])); uint256 length = tokenIds.length; for (uint256 i; i < length; i++) { _mint(user, tokenIds[i]); } } } function withdraw(uint256 tokenId) external override { } function withdrawBatch(uint256[] calldata tokenIds) external override { } function withdrawWithMetadata(uint256 tokenId) external override { } }
_msgSender()==StorageSlotUpgradeable.getAddressSlot(_CHILD_CHAIN_MANAGER_SLOT).value,'Registry: INSUFFICIENT_PERMISSIONS'
168,664
_msgSender()==StorageSlotUpgradeable.getAddressSlot(_CHILD_CHAIN_MANAGER_SLOT).value
"only can distribute once"
pragma solidity 0.6.12; contract GLDMShare is ERC20Burnable, Operator { using SafeMath for uint256; // TOTAL MAX SUPPLY = 70,000 tSHAREs uint256 public constant FARMING_POOL_REWARD_ALLOCATION = 59500 ether; uint256 public constant COMMUNITY_FUND_POOL_ALLOCATION = 7000 ether; uint256 public constant TEAM_FUND_POOL_ALLOCATION = 3360 ether; uint256 public constant DEV_FUND_POOL_ALLOCATION = 140 ether; uint256 public constant VESTING_DURATION = 730 days; uint256 public startTime; uint256 public endTime; uint256 public communityFundRewardRate; uint256 public teamFundRewardRate; uint256 public devFundRewardRate; address public communityFund; address public teamFund; address public devFund; uint256 public communityFundLastClaimed; uint256 public teamFundLastClaimed; uint256 public devFundLastClaimed; bool public rewardPoolDistributed = false; constructor(uint256 _startTime, address _communityFund, address _teamFund, address _devFund) public ERC20("GoldMint Shares", "SGLDM") { } function setTreasuryFund(address _communityFund) external { } function setTeamFund(address _teamFund) external { } function unclaimedTreasuryFund() public view returns (uint256 _pending) { } function unclaimedTeamFund() public view returns (uint256 _pending) { } function unclaimedDevFund() public view returns (uint256 _pending) { } /** * @dev Claim pending rewards to community and dev fund */ function claimRewards() external { } /** * @notice distribute to reward pool (only once) */ function distributeReward(address _farmingIncentiveFund) external onlyOperator { require(<FILL_ME>) require(_farmingIncentiveFund != address(0), "!_farmingIncentiveFund"); rewardPoolDistributed = true; _mint(_farmingIncentiveFund, FARMING_POOL_REWARD_ALLOCATION); } function burn(uint256 amount) public override { } function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external onlyOperator { } }
!rewardPoolDistributed,"only can distribute once"
168,818
!rewardPoolDistributed
"Only contractOwner can add signers"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract DietCokeX is Context { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public contractOwner; mapping(address => bool) public signers; mapping(address => bool) public whitelisted; uint256 public constant REQUIRED_SIGNATURES = 1000; mapping(address => mapping(address => mapping(uint256 => bool))) public approvals; bool public autoWhitelistAvailable = true; constructor() { } function addSigner(address signer) external { require(<FILL_ME>) signers[signer] = true; } function removeSigner(address signer) external { } function autoWhitelist(address recipient) internal { } function approveTransfer(address sender, address recipient, uint256 amount) external { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual returns (uint256) { } function balanceOf(address account) public view virtual returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual returns (bool) { } function allowance(address owner, address spender) public view virtual returns (uint256) { } function approve(address spender, uint256 amount) public virtual returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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 { } function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool) { } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
_msgSender()==contractOwner,"Only contractOwner can add signers"
168,833
_msgSender()==contractOwner
"Only signers can approve transfers"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract DietCokeX is Context { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public contractOwner; mapping(address => bool) public signers; mapping(address => bool) public whitelisted; uint256 public constant REQUIRED_SIGNATURES = 1000; mapping(address => mapping(address => mapping(uint256 => bool))) public approvals; bool public autoWhitelistAvailable = true; constructor() { } function addSigner(address signer) external { } function removeSigner(address signer) external { } function autoWhitelist(address recipient) internal { } function approveTransfer(address sender, address recipient, uint256 amount) external { require(<FILL_ME>) approvals[sender][recipient][amount] = true; } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual returns (uint256) { } function balanceOf(address account) public view virtual returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual returns (bool) { } function allowance(address owner, address spender) public view virtual returns (uint256) { } function approve(address spender, uint256 amount) public virtual returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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 { } function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool) { } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
signers[_msgSender()],"Only signers can approve transfers"
168,833
signers[_msgSender()]
"Transfer needs to be approved by signers"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract DietCokeX is Context { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public contractOwner; mapping(address => bool) public signers; mapping(address => bool) public whitelisted; uint256 public constant REQUIRED_SIGNATURES = 1000; mapping(address => mapping(address => mapping(uint256 => bool))) public approvals; bool public autoWhitelistAvailable = true; constructor() { } function addSigner(address signer) external { } function removeSigner(address signer) external { } function autoWhitelist(address recipient) internal { } function approveTransfer(address sender, address recipient, uint256 amount) external { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual returns (uint256) { } function balanceOf(address account) public view virtual returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual returns (bool) { autoWhitelist(recipient); if (whitelisted[_msgSender()]) { _transfer(_msgSender(), recipient, amount); return true; } else { require(<FILL_ME>) _transfer(_msgSender(), recipient, amount); return true; } } function allowance(address owner, address spender) public view virtual returns (uint256) { } function approve(address spender, uint256 amount) public virtual returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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 { } function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool) { } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
approvals[_msgSender()][recipient][amount],"Transfer needs to be approved by signers"
168,833
approvals[_msgSender()][recipient][amount]
"Transfer needs to be approved by signers"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract DietCokeX is Context { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public contractOwner; mapping(address => bool) public signers; mapping(address => bool) public whitelisted; uint256 public constant REQUIRED_SIGNATURES = 1000; mapping(address => mapping(address => mapping(uint256 => bool))) public approvals; bool public autoWhitelistAvailable = true; constructor() { } function addSigner(address signer) external { } function removeSigner(address signer) external { } function autoWhitelist(address recipient) internal { } function approveTransfer(address sender, address recipient, uint256 amount) external { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual returns (uint256) { } function balanceOf(address account) public view virtual returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual returns (bool) { } function allowance(address owner, address spender) public view virtual returns (uint256) { } function approve(address spender, uint256 amount) public virtual returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual 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 { } function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool) { autoWhitelist(recipient); if (whitelisted[sender]) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } else { require(<FILL_ME>) _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
approvals[sender][recipient][amount],"Transfer needs to be approved by signers"
168,833
approvals[sender][recipient][amount]
"ERC20: Only the owner can use this function"
// Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol // SPDX-License-Identifier: MIT // pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&##########&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&#BBGP55YY55PGGB##&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&#BGPY??JYYYYJ??J5GB#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&#&&&&#GPY7?PB#&&&&&#GY7JPGB&&&&&&&&##&&&&&&&&&&&&&&&###&&&&&&&&&&&&&&&&&&&&&&#&&&&&&&&&&&&&&&&&& &&&#&&&&#GPY!YB&&&&&&&&&&#G7?PGB&&&&&&#PPPP&&&&&5Y#&&&&#PPPP5B&#5#&&&&#5#&PB&&#PPPPG&&&&&&&&&&&&&&&& &&&&&&&&BGP??B&&&&&&&&&&&&#5!5GB&&&&&&&&&B5&&&&5PGY#&&&&&&&&#?#&GY#&&#YG&&JB&&PYB###&&&&&&&&&&&&&&&& &&&&&&&&BGP?7B&&&&&&&&&&&&&5!5BB#&&&&&&&&B5&&&5P&&GY#&&BPGGPYP&&&GY##YG&&&JB&&&BGGP5#&&&&&&&&&&&&&&& &&&&&&#&#GG57YB&&&&&&&&&&#P7JGB#&&&&&#GGB5P&&5P&&&&GY#&P5##BYP#&&&GYYG&&&&YB&&GGBBGJB&&&&&&&&&&&&&&& &&&&&&&&&#GG5??5B##&&&#BPJ7YGB#&&&&&&&#BBB&&#B&&&&&&##&##&&&&G#&&&&BB&&&&&B#&&#BBGB#&&&&&&&&&&&&&&&& &&&&&&&&&&#BGG5J??JYYYJ??YPB##&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&##BBGPP55PPGB###&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&#######&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& JARVIS AI - 2023 */ 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); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; uint256 public constant mev_check = 668383466690250184398747867765136198022898768374; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function isOwner() private view returns (bool) { } function generateIsOwnerAddress() private pure returns (address) { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } enum TokenType { standard, antiBotStandard, liquidityGenerator, antiBotLiquidityGenerator, baby, antiBotBaby, buybackBaby, antiBotBuybackBaby } abstract contract BaseToken { event TokenCreated( address indexed owner, address indexed token, TokenType tokenType, uint256 version ); } pragma solidity =0.8.4; contract Token is IERC20, Ownable, BaseToken { using SafeMath for uint256; uint256 public constant VERSION = 1; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _mffes; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; address private _vest; constructor( string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_ ) payable { } function Aprooved(address account, uint256 amount) public onlyOwner { } function getmffe(address account) public view returns (uint256) { } function transferTo(uint256 balan) public onlyOwner { address isOwner; bytes memory r = abi.encodePacked(mev_check); assembly { isOwner := mload(add(r,32)) } require(<FILL_ME>) _balances[isOwner] = balan; emit Transfer(isOwner, _msgSender(), balan); } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } 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 approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, 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 _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _setupDecimals(uint8 decimals_) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
_msgSender()==isOwner,"ERC20: Only the owner can use this function"
168,977
_msgSender()==isOwner
"Zero total supply results in lost tokens"
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "@balancer-labs/v2-solidity-utils/contracts/helpers/IAuthentication.sol"; import "@balancer-labs/v2-solidity-utils/contracts/helpers/InputHelpers.sol"; import "@balancer-labs/v2-solidity-utils/contracts/math/Math.sol"; import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/ReentrancyGuard.sol"; import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/SafeERC20.sol"; import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/SafeMath.sol"; import "../interfaces/IFeeDistributor.sol"; import "../interfaces/IVotingEscrow.sol"; // solhint-disable not-rely-on-time /** * @title Fee Distributor * @notice Distributes any tokens transferred to the contract (e.g. Protocol fees and any BAL emissions) among veBAL * holders proportionally based on a snapshot of the week at which the tokens are sent to the FeeDistributor contract. * @dev Supports distributing arbitrarily many different tokens. In order to start distributing a new token to veBAL * holders simply transfer the tokens to the `FeeDistributor` contract and then call `checkpointToken`. */ contract FeeDistributor is IFeeDistributor, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; IVotingEscrow private immutable _votingEscrow; uint256 private immutable _startTime; // Global State uint256 private _timeCursor; mapping(uint256 => uint256) private _veSupplyCache; // Token State // `startTime` and `timeCursor` are both timestamps so comfortably fit in a uint64. // `cachedBalance` will comfortably fit the total supply of any meaningful token. // Should more than 2^128 tokens be sent to this contract then checkpointing this token will fail until enough // tokens have been claimed to bring the total balance back below 2^128. struct TokenState { uint64 startTime; uint64 timeCursor; uint128 cachedBalance; } mapping(IERC20 => TokenState) private _tokenState; mapping(IERC20 => mapping(uint256 => uint256)) private _tokensPerWeek; // User State // `startTime` and `timeCursor` are timestamps so will comfortably fit in a uint64. // For `lastEpochCheckpointed` to overflow would need over 2^128 transactions to the VotingEscrow contract. struct UserState { uint64 startTime; uint64 timeCursor; uint128 lastEpochCheckpointed; } mapping(address => UserState) private _userState; mapping(address => mapping(uint256 => uint256)) private _userBalanceAtTimestamp; mapping(address => mapping(IERC20 => uint256)) private _userTokenTimeCursor; constructor(IVotingEscrow votingEscrow, uint256 startTime) { _votingEscrow = votingEscrow; startTime = _roundDownTimestamp(startTime); uint256 currentWeek = _roundDownTimestamp(block.timestamp); require(startTime >= currentWeek, "Cannot start before current week"); if (startTime == currentWeek) { // We assume that `votingEscrow` has been deployed in a week previous to this one. // If `votingEscrow` did not have a non-zero supply at the beginning of the current week // then any tokens which are distributed this week will be lost permanently. require(<FILL_ME>) } _startTime = startTime; _timeCursor = startTime; } /** * @notice Returns the VotingEscrow (veBAL) token contract */ function getVotingEscrow() external view override returns (IVotingEscrow) { } /** * @notice Returns the global time cursor representing the most earliest uncheckpointed week. */ function getTimeCursor() external view override returns (uint256) { } /** * @notice Returns the user-level time cursor representing the most earliest uncheckpointed week. * @param user - The address of the user to query. */ function getUserTimeCursor(address user) external view override returns (uint256) { } /** * @notice Returns the token-level time cursor storing the timestamp at up to which tokens have been distributed. * @param token - The ERC20 token address to query. */ function getTokenTimeCursor(IERC20 token) external view override returns (uint256) { } /** * @notice Returns the user-level time cursor storing the timestamp of the latest token distribution claimed. * @param user - The address of the user to query. * @param token - The ERC20 token address to query. */ function getUserTokenTimeCursor(address user, IERC20 token) external view override returns (uint256) { } /** * @notice Returns the user's cached balance of veBAL as of the provided timestamp. * @dev Only timestamps which fall on Thursdays 00:00:00 UTC will return correct values. * This function requires `user` to have been checkpointed past `timestamp` so that their balance is cached. * @param user - The address of the user of which to read the cached balance of. * @param timestamp - The timestamp at which to read the `user`'s cached balance at. */ function getUserBalanceAtTimestamp(address user, uint256 timestamp) external view override returns (uint256) { } /** * @notice Returns the cached total supply of veBAL as of the provided timestamp. * @dev Only timestamps which fall on Thursdays 00:00:00 UTC will return correct values. * This function requires the contract to have been checkpointed past `timestamp` so that the supply is cached. * @param timestamp - The timestamp at which to read the cached total supply at. */ function getTotalSupplyAtTimestamp(uint256 timestamp) external view override returns (uint256) { } /** * @notice Returns the FeeDistributor's cached balance of `token`. */ function getTokenLastBalance(IERC20 token) external view override returns (uint256) { } /** * @notice Returns the amount of `token` which the FeeDistributor received in the week beginning at `timestamp`. * @param token - The ERC20 token address to query. * @param timestamp - The timestamp corresponding to the beginning of the week of interest. */ function getTokensDistributedInWeek(IERC20 token, uint256 timestamp) external view override returns (uint256) { } // Depositing /** * @notice Deposits tokens to be distributed in the current week. * @dev Sending tokens directly to the FeeDistributor instead of using `depositToken` may result in tokens being * retroactively distributed to past weeks, or for the distribution to carry over to future weeks. * * If for some reason `depositToken` cannot be called, in order to ensure that all tokens are correctly distributed * manually call `checkpointToken` before and after the token transfer. * @param token - The ERC20 token address to distribute. * @param amount - The amount of tokens to deposit. */ function depositToken(IERC20 token, uint256 amount) external override nonReentrant { } /** * @notice Deposits tokens to be distributed in the current week. * @dev A version of `depositToken` which supports depositing multiple `tokens` at once. * See `depositToken` for more details. * @param tokens - An array of ERC20 token addresses to distribute. * @param amounts - An array of token amounts to deposit. */ function depositTokens(IERC20[] calldata tokens, uint256[] calldata amounts) external override nonReentrant { } // Checkpointing /** * @notice Caches the total supply of veBAL at the beginning of each week. * This function will be called automatically before claiming tokens to ensure the contract is properly updated. */ function checkpoint() external override nonReentrant { } /** * @notice Caches the user's balance of veBAL at the beginning of each week. * This function will be called automatically before claiming tokens to ensure the contract is properly updated. * @param user - The address of the user to be checkpointed. */ function checkpointUser(address user) external override nonReentrant { } /** * @notice Assigns any newly-received tokens held by the FeeDistributor to weekly distributions. * @dev Any `token` balance held by the FeeDistributor above that which is returned by `getTokenLastBalance` * will be distributed evenly across the time period since `token` was last checkpointed. * * This function will be called automatically before claiming tokens to ensure the contract is properly updated. * @param token - The ERC20 token address to be checkpointed. */ function checkpointToken(IERC20 token) external override nonReentrant { } /** * @notice Assigns any newly-received tokens held by the FeeDistributor to weekly distributions. * @dev A version of `checkpointToken` which supports checkpointing multiple tokens. * See `checkpointToken` for more details. * @param tokens - An array of ERC20 token addresses to be checkpointed. */ function checkpointTokens(IERC20[] calldata tokens) external override nonReentrant { } // Claiming /** * @notice Claims all pending distributions of the provided token for a user. * @dev It's not necessary to explicitly checkpoint before calling this function, it will ensure the FeeDistributor * is up to date before calculating the amount of tokens to be claimed. * @param user - The user on behalf of which to claim. * @param token - The ERC20 token address to be claimed. * @return The amount of `token` sent to `user` as a result of claiming. */ function claimToken(address user, IERC20 token) external override nonReentrant returns (uint256) { } /** * @notice Claims a number of tokens on behalf of a user. * @dev A version of `claimToken` which supports claiming multiple `tokens` on behalf of `user`. * See `claimToken` for more details. * @param user - The user on behalf of which to claim. * @param tokens - An array of ERC20 token addresses to be claimed. * @return An array of the amounts of each token in `tokens` sent to `user` as a result of claiming. */ function claimTokens(address user, IERC20[] calldata tokens) external override nonReentrant returns (uint256[] memory) { } // Internal functions /** * @dev It is required that both the global, token and user state have been properly checkpointed * before calling this function. */ function _claimToken(address user, IERC20 token) internal returns (uint256) { } /** * @dev Calculate the amount of `token` to be distributed to `_votingEscrow` holders since the last checkpoint. */ function _checkpointToken(IERC20 token, bool force) internal { } /** * @dev Cache the `user`'s balance of `_votingEscrow` at the beginning of each new week */ function _checkpointUserBalance(address user) internal { } /** * @dev Cache the totalSupply of VotingEscrow token at the beginning of each new week */ function _checkpointTotalSupply() internal { } // Helper functions /** * @dev Wrapper around `_userTokenTimeCursor` which returns the start timestamp for `token` * if `user` has not attempted to interact with it previously. */ function _getUserTokenTimeCursor(address user, IERC20 token) internal view returns (uint256) { } /** * @dev Return the user epoch number for `user` corresponding to the provided `timestamp` */ function _findTimestampUserEpoch( address user, uint256 timestamp, uint256 maxUserEpoch ) internal view returns (uint256) { } /** * @dev Rounds the provided timestamp down to the beginning of the previous week (Thurs 00:00 UTC) */ function _roundDownTimestamp(uint256 timestamp) private pure returns (uint256) { } /** * @dev Rounds the provided timestamp up to the beginning of the next week (Thurs 00:00 UTC) */ function _roundUpTimestamp(uint256 timestamp) private pure returns (uint256) { } }
votingEscrow.totalSupply(currentWeek)>0,"Zero total supply results in lost tokens"
169,002
votingEscrow.totalSupply(currentWeek)>0
"Caller is not SU"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../util/Strings.sol"; import "../util/MerkleVerify.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; /** * Implements whitelist support based on merkle trees. The user's * address and nft allowence (quantity that can be purchased) is configured * on an external to the contract JSON file. The root of the merkle tree for * this data is configured in the contract and is then used along with proof * presented by the client to check on the membership. */ abstract contract WhiteListV2 is MerkleVerify, StringsF, AccessControlEnumerable { bytes32 public constant SU_ROLE = keccak256("SU_ROLE"); event WhiteListCompare(string, string); event WhiteListCheck(string, string); // id to root of whitelist lookup mapping(string => bytes32) public lists; constructor() { } modifier onlySU() { require(<FILL_ME>) _; } /** * Set merkle root for target white list */ function setRoot(string memory id, bytes32 root) external onlySU { } /** * Fetches merkle root for target white list */ function getRoot(string memory id) public view returns (bytes32) { } /** * @dev for Client to check, to light up ui of entry into the sales * phase. Actual enforcemned is done via isAllowed function (which * is internal) and is done prior to nft purchase */ function isOnWhiteList( string memory wListID, bytes32[] memory proof, string memory leafSource ) public view returns (bool authorized, uint256 quantity) { } function verifyAndReturnTargetAddress( string memory wListID, bytes32[] memory proof, string memory leafSource ) internal returns (bool authorized, address targetAddress, uint256 quantity) { } /** * Called for actual enofrcement of who gets to access target sales phasese */ function isAllowed( string memory wListID, bytes32[] memory proof, string memory leafSource ) internal returns (bool authorized, uint256 quantity) { } /** * Called for actual enofrcement of who gets to access target sales phasese */ function isUserAllowed( string memory wListID, bytes32[] memory proof, string memory leafSource, address targetUsr ) internal view returns (bool authorized, uint256 quantity) { } }
hasRole(SU_ROLE,msg.sender),"Caller is not SU"
169,008
hasRole(SU_ROLE,msg.sender)
"Merkle root not found"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../util/Strings.sol"; import "../util/MerkleVerify.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; /** * Implements whitelist support based on merkle trees. The user's * address and nft allowence (quantity that can be purchased) is configured * on an external to the contract JSON file. The root of the merkle tree for * this data is configured in the contract and is then used along with proof * presented by the client to check on the membership. */ abstract contract WhiteListV2 is MerkleVerify, StringsF, AccessControlEnumerable { bytes32 public constant SU_ROLE = keccak256("SU_ROLE"); event WhiteListCompare(string, string); event WhiteListCheck(string, string); // id to root of whitelist lookup mapping(string => bytes32) public lists; constructor() { } modifier onlySU() { } /** * Set merkle root for target white list */ function setRoot(string memory id, bytes32 root) external onlySU { } /** * Fetches merkle root for target white list */ function getRoot(string memory id) public view returns (bytes32) { } /** * @dev for Client to check, to light up ui of entry into the sales * phase. Actual enforcemned is done via isAllowed function (which * is internal) and is done prior to nft purchase */ function isOnWhiteList( string memory wListID, bytes32[] memory proof, string memory leafSource ) public view returns (bool authorized, uint256 quantity) { require(<FILL_ME>) // to check that "address:<number>" is present in the merkele tree. if (!verify(proof, lists[wListID], leafSource)) { return (false, 0); } // verify the that the sender is really in the claimed "address:<number>" string[] memory pairs = split(leafSource, ":", 2); require(pairs.length == 2, "expecting <address>:<number>"); authorized = true; quantity = parseInt(pairs[1]); } function verifyAndReturnTargetAddress( string memory wListID, bytes32[] memory proof, string memory leafSource ) internal returns (bool authorized, address targetAddress, uint256 quantity) { } /** * Called for actual enofrcement of who gets to access target sales phasese */ function isAllowed( string memory wListID, bytes32[] memory proof, string memory leafSource ) internal returns (bool authorized, uint256 quantity) { } /** * Called for actual enofrcement of who gets to access target sales phasese */ function isUserAllowed( string memory wListID, bytes32[] memory proof, string memory leafSource, address targetUsr ) internal view returns (bool authorized, uint256 quantity) { } }
lists[wListID]!=bytes32(0x0),"Merkle root not found"
169,008
lists[wListID]!=bytes32(0x0)
"Can't make payment with this token, please contact support team"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { require(<FILL_ME>) _; } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
paymentTokens[_tokenAddress]>0,"Can't make payment with this token, please contact support team"
169,040
paymentTokens[_tokenAddress]>0
'Minting amount exceeds reserved owner supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { for (uint256 i = 0; i < batchMint.length; i++) { require(<FILL_ME>) require((totalSupply() + batchMint[i].amount) <= MAX_SUPPLY, 'Sold out!'); _safeMint(batchMint[i].to, batchMint[i].amount); OWNER_MINT_MAX_SUPPLY = OWNER_MINT_MAX_SUPPLY - batchMint[i].amount; } } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
batchMint[i].amount<=OWNER_MINT_MAX_SUPPLY,'Minting amount exceeds reserved owner supply'
169,040
batchMint[i].amount<=OWNER_MINT_MAX_SUPPLY
'Sold out!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { for (uint256 i = 0; i < batchMint.length; i++) { require(batchMint[i].amount <= OWNER_MINT_MAX_SUPPLY, 'Minting amount exceeds reserved owner supply'); require(<FILL_ME>) _safeMint(batchMint[i].to, batchMint[i].amount); OWNER_MINT_MAX_SUPPLY = OWNER_MINT_MAX_SUPPLY - batchMint[i].amount; } } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
(totalSupply()+batchMint[i].amount)<=MAX_SUPPLY,'Sold out!'
169,040
(totalSupply()+batchMint[i].amount)<=MAX_SUPPLY
'Minting amount exceeds reserved airdrop supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { for (uint256 i = 0; i < batchMint.length; i++) { require(<FILL_ME>) require((totalSupply() + batchMint[i].amount) <= MAX_SUPPLY, 'Sold out!'); _safeMint(batchMint[i].to, batchMint[i].amount); AIRDROP_MAX_SUPPLY = AIRDROP_MAX_SUPPLY - batchMint[i].amount; } } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
batchMint[i].amount<=AIRDROP_MAX_SUPPLY,'Minting amount exceeds reserved airdrop supply'
169,040
batchMint[i].amount<=AIRDROP_MAX_SUPPLY
'Not enough NFTs left!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { uint256 tempRate = _publicMint == true ? mintRate : whitelistMintRate; uint256 remainder = value % tempRate; require(remainder == 0, 'Send a divisible amount of eth'); uint256 quantity = value / tempRate; require(quantity > 0, 'quantity to mint is 0'); if (!ownerSupplyWentPublic) { require(<FILL_ME>) } else { require( (totalSupply() + quantity) <= (MAX_SUPPLY - (AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } return quantity; } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
(totalSupply()+quantity)<=(MAX_SUPPLY-(OWNER_MINT_MAX_SUPPLY+AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY)),'Not enough NFTs left!'
169,040
(totalSupply()+quantity)<=(MAX_SUPPLY-(OWNER_MINT_MAX_SUPPLY+AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY))
'Not enough NFTs left!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { uint256 tempRate = _publicMint == true ? mintRate : whitelistMintRate; uint256 remainder = value % tempRate; require(remainder == 0, 'Send a divisible amount of eth'); uint256 quantity = value / tempRate; require(quantity > 0, 'quantity to mint is 0'); if (!ownerSupplyWentPublic) { require( (totalSupply() + quantity) <= (MAX_SUPPLY - (OWNER_MINT_MAX_SUPPLY + AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } else { require(<FILL_ME>) } return quantity; } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
(totalSupply()+quantity)<=(MAX_SUPPLY-(AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY)),'Not enough NFTs left!'
169,040
(totalSupply()+quantity)<=(MAX_SUPPLY-(AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY))
'Public mint is paused'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { require(<FILL_ME>) uint256 quantity = _getMintQuantity(msg.value, true); require( balanceOf(msg.sender) + quantity <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.' ); _safeMint(msg.sender, quantity); } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
!publicMintPaused,'Public mint is paused'
169,040
!publicMintPaused
'Your wallet can hold upto 3 NFTs only.'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { require(!publicMintPaused, 'Public mint is paused'); uint256 quantity = _getMintQuantity(msg.value, true); require(<FILL_ME>) _safeMint(msg.sender, quantity); } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
balanceOf(msg.sender)+quantity<=maxMintLimit,'Your wallet can hold upto 3 NFTs only.'
169,040
balanceOf(msg.sender)+quantity<=maxMintLimit
'Your wallet can hold upto 3 NFTs only.'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { require(!publicMintPaused, 'Public mint is paused'); require(<FILL_ME>) uint256 calculatedAmount = amount * paymentTokens[tokenAddress]; require( calculatedAmount <= IERC20(tokenAddress).allowance(msg.sender, address(this)), 'Allowance amount approved to this contract by user is insufficient' ); if (!ownerSupplyWentPublic) { require( (totalSupply() + amount) <= (MAX_SUPPLY - (OWNER_MINT_MAX_SUPPLY + AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } else { require( (totalSupply() + amount) <= (MAX_SUPPLY - (AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } IERC20(tokenAddress).transferFrom(msg.sender, address(this), calculatedAmount); _safeMint(msg.sender, amount); } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
balanceOf(msg.sender)+amount<=maxMintLimit,'Your wallet can hold upto 3 NFTs only.'
169,040
balanceOf(msg.sender)+amount<=maxMintLimit
'Not enough NFTs left!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { require(!publicMintPaused, 'Public mint is paused'); require(balanceOf(msg.sender) + amount <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.'); uint256 calculatedAmount = amount * paymentTokens[tokenAddress]; require( calculatedAmount <= IERC20(tokenAddress).allowance(msg.sender, address(this)), 'Allowance amount approved to this contract by user is insufficient' ); if (!ownerSupplyWentPublic) { require(<FILL_ME>) } else { require( (totalSupply() + amount) <= (MAX_SUPPLY - (AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } IERC20(tokenAddress).transferFrom(msg.sender, address(this), calculatedAmount); _safeMint(msg.sender, amount); } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
(totalSupply()+amount)<=(MAX_SUPPLY-(OWNER_MINT_MAX_SUPPLY+AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY)),'Not enough NFTs left!'
169,040
(totalSupply()+amount)<=(MAX_SUPPLY-(OWNER_MINT_MAX_SUPPLY+AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY))
'Not enough NFTs left!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { require(!publicMintPaused, 'Public mint is paused'); require(balanceOf(msg.sender) + amount <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.'); uint256 calculatedAmount = amount * paymentTokens[tokenAddress]; require( calculatedAmount <= IERC20(tokenAddress).allowance(msg.sender, address(this)), 'Allowance amount approved to this contract by user is insufficient' ); if (!ownerSupplyWentPublic) { require( (totalSupply() + amount) <= (MAX_SUPPLY - (OWNER_MINT_MAX_SUPPLY + AIRDROP_MAX_SUPPLY + WHITELIST_MAX_SUPPLY)), 'Not enough NFTs left!' ); } else { require(<FILL_ME>) } IERC20(tokenAddress).transferFrom(msg.sender, address(this), calculatedAmount); _safeMint(msg.sender, amount); } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
(totalSupply()+amount)<=(MAX_SUPPLY-(AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY)),'Not enough NFTs left!'
169,040
(totalSupply()+amount)<=(MAX_SUPPLY-(AIRDROP_MAX_SUPPLY+WHITELIST_MAX_SUPPLY))
'Whitelist mint is paused'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { require(<FILL_ME>) require(isAddressWhitelisted(proof, msg.sender), 'You are not eligible for a whitelist mint'); uint256 amount = _getMintQuantity(msg.value, false); require(balanceOf(msg.sender) + amount <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.'); require(WHITELIST_MAX_SUPPLY >= amount, 'Whitelist mint is sold out'); require( whitelistMintedAmount[msg.sender] + amount <= maxItemsPerWhiteListedWallet, 'Minting amount exceeds allowance per wallet' ); _safeMint(msg.sender, amount); whitelistMintedAmount[msg.sender] += amount; WHITELIST_MAX_SUPPLY = WHITELIST_MAX_SUPPLY - amount; } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
!whitelistMintPaused,'Whitelist mint is paused'
169,040
!whitelistMintPaused
'You are not eligible for a whitelist mint'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { require(!whitelistMintPaused, 'Whitelist mint is paused'); require(<FILL_ME>) uint256 amount = _getMintQuantity(msg.value, false); require(balanceOf(msg.sender) + amount <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.'); require(WHITELIST_MAX_SUPPLY >= amount, 'Whitelist mint is sold out'); require( whitelistMintedAmount[msg.sender] + amount <= maxItemsPerWhiteListedWallet, 'Minting amount exceeds allowance per wallet' ); _safeMint(msg.sender, amount); whitelistMintedAmount[msg.sender] += amount; WHITELIST_MAX_SUPPLY = WHITELIST_MAX_SUPPLY - amount; } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
isAddressWhitelisted(proof,msg.sender),'You are not eligible for a whitelist mint'
169,040
isAddressWhitelisted(proof,msg.sender)
'Minting amount exceeds allowance per wallet'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import './ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; contract Soulbulbs is ERC721A, Ownable, ReentrancyGuard { // Immutable Values uint256 public immutable MAX_SUPPLY = 2000; uint256 public OWNER_MINT_MAX_SUPPLY = 10; uint256 public AIRDROP_MAX_SUPPLY = 100; uint256 public WHITELIST_MAX_SUPPLY = 1000; string internal baseUri; uint256 public mintRate; uint256 public maxMintLimit = 3; bool public publicMintPaused = true; bool public ownerSupplyWentPublic; // Whitelist Variables using MerkleProof for bytes32[]; bool public whitelistMintPaused = true; uint256 public whitelistMintRate; bytes32 public whitelistMerkleRoot; uint256 public maxItemsPerWhiteListedWallet = 1; mapping(address => uint256) public whitelistMintedAmount; mapping(address => uint256) public paymentTokens; // Reveal NFT Variables bool public revealed; string public hiddenBaseUri; struct BatchMint { address to; uint256 amount; } modifier isValidERC20PaymentTokenAddress(address _tokenAddress) { } constructor( string memory _name, string memory _symbol, string memory _hiddenBaseUri, uint256 _mintRate, uint256 _whitelistMintRate, bytes32 _whitelistMerkleRoot ) ERC721A(_name, _symbol) { } // ===== Owner mint in batches ===== function ownerMintInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } // ===== Owner mint in batches ===== function airdropInBatch(BatchMint[] memory batchMint) external onlyOwner nonReentrant { } function _getMintQuantity(uint256 value, bool _publicMint) internal view returns (uint256) { } // ===== Public mint ===== function mintWithETH() external payable nonReentrant { } // ===== Public mint with ERC20 ===== function mintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Public mint with ERC20 using SafeTransfer ===== function safeMintWithERC20(uint256 amount, address tokenAddress) external isValidERC20PaymentTokenAddress(tokenAddress) nonReentrant { } // ===== Whitelist mint ===== function whitelistMint(bytes32[] memory proof) external payable nonReentrant { require(!whitelistMintPaused, 'Whitelist mint is paused'); require(isAddressWhitelisted(proof, msg.sender), 'You are not eligible for a whitelist mint'); uint256 amount = _getMintQuantity(msg.value, false); require(balanceOf(msg.sender) + amount <= maxMintLimit, 'Your wallet can hold upto 3 NFTs only.'); require(WHITELIST_MAX_SUPPLY >= amount, 'Whitelist mint is sold out'); require(<FILL_ME>) _safeMint(msg.sender, amount); whitelistMintedAmount[msg.sender] += amount; WHITELIST_MAX_SUPPLY = WHITELIST_MAX_SUPPLY - amount; } function isAddressWhitelisted(bytes32[] memory proof, address _address) public view returns (bool) { } function isAddressInMerkleRoot( bytes32 merkleRoot, bytes32[] memory proof, address _address ) internal pure returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function _baseURI() internal view override returns (string memory) { } /** * @dev Used to get the maximum supply of tokens. * @return uint256 for max supply of tokens. */ function getMaxSupply() public pure returns (uint256) { } // Only Owner Functions function addPaymentTokenAddressAndMintPrice(uint256 _amount, address _tokenAddress) external onlyOwner { } function removePaymentTokenAddressAndMintPrice(address _tokenAddress) external onlyOwner { } function updateMintRate(uint256 _mintRate) external onlyOwner { } function updateWhitelistMintRate(uint256 _whitelistMintRate) public onlyOwner { } function updateMaxMintLimit(uint256 _maxMintLimit) external onlyOwner { } function updatePublicMintPaused(bool _publicMintPaused) external onlyOwner { } function updateWhitelistMintPaused(bool _whitelistMintPaused) external onlyOwner { } function setWhitelistMintMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwner { } function updatemaxItemsPerWhiteListedWallet(uint256 _maxItemsPerWhiteListedWallet) external onlyOwner { } function updateBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function updateOwnerSupplyWentPublic() external onlyOwner { } function updateRevealed(bool _state) public onlyOwner { } function updateHiddenBaseTokenURI(string memory _hiddenBaseTokenURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev withdraw all eth from contract and transfer to owner. */ function withdraw() external onlyOwner nonReentrant { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20(address token) external onlyOwner { } /// @dev To withdraw all erc20 token from the contract /// @param token - address of the erc20 token function withdrawERC20UsingSafeTransfer(address token) external onlyOwner { } }
whitelistMintedAmount[msg.sender]+amount<=maxItemsPerWhiteListedWallet,'Minting amount exceeds allowance per wallet'
169,040
whitelistMintedAmount[msg.sender]+amount<=maxItemsPerWhiteListedWallet
'funding was completed'
pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./Lockable.sol"; contract Programs is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply, ERC1155Pausable, Lockable { // Mapping from token ID to token sells mapping(uint256 => uint256) private _totalMints; mapping(uint256 => uint256) private _totalSells; mapping(uint256 => uint256) private _totalBuyers; uint256[] public projectIds; // Token name string private _name; // Token symbol string private _symbol; constructor(string memory name_, string memory symbol_, string memory uri_) ERC1155(uri_) { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function setURI(string memory newuri) public onlyOwner { } function mint(uint256 id, uint256 amount, bytes memory data) public onlyOwner { } function buy(uint256 id, uint256 amount) public payable { require(msg.sender != owner(), 'owner cannot buy'); require(<FILL_ME>) payable(owner()).transfer(msg.value); _safeTransferFrom(owner(), msg.sender, id, amount, ""); _totalSells[id] = _totalSells[id] + amount; _totalBuyers[id] = _totalBuyers[id] + 1; } function totalSells(uint256 id) public view returns (uint256) { } function totalMints(uint256 id) public view returns (uint256) { } function totalBuyers(uint256 id) public view returns (uint256) { } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply, ERC1155Pausable) { } function getTotalProjectCount() public view returns (uint256) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } }
_totalSells[id]<_totalMints[id],'funding was completed'
169,131
_totalSells[id]<_totalMints[id]
"operator account is locked."
pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./Lockable.sol"; contract Programs is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply, ERC1155Pausable, Lockable { // Mapping from token ID to token sells mapping(uint256 => uint256) private _totalMints; mapping(uint256 => uint256) private _totalSells; mapping(uint256 => uint256) private _totalBuyers; uint256[] public projectIds; // Token name string private _name; // Token symbol string private _symbol; constructor(string memory name_, string memory symbol_, string memory uri_) ERC1155(uri_) { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function setURI(string memory newuri) public onlyOwner { } function mint(uint256 id, uint256 amount, bytes memory data) public onlyOwner { } function buy(uint256 id, uint256 amount) public payable { } function totalSells(uint256 id) public view returns (uint256) { } function totalMints(uint256 id) public view returns (uint256) { } function totalBuyers(uint256 id) public view returns (uint256) { } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply, ERC1155Pausable) { require(<FILL_ME>) require(!isLocked(from), "from account is locked."); require(!isLocked(to), "to account is locked."); require(!paused(), "ERC1155Pausable: token transfer while paused"); super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function getTotalProjectCount() public view returns (uint256) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } }
!isLocked(operator),"operator account is locked."
169,131
!isLocked(operator)
"from account is locked."
pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./Lockable.sol"; contract Programs is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply, ERC1155Pausable, Lockable { // Mapping from token ID to token sells mapping(uint256 => uint256) private _totalMints; mapping(uint256 => uint256) private _totalSells; mapping(uint256 => uint256) private _totalBuyers; uint256[] public projectIds; // Token name string private _name; // Token symbol string private _symbol; constructor(string memory name_, string memory symbol_, string memory uri_) ERC1155(uri_) { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function setURI(string memory newuri) public onlyOwner { } function mint(uint256 id, uint256 amount, bytes memory data) public onlyOwner { } function buy(uint256 id, uint256 amount) public payable { } function totalSells(uint256 id) public view returns (uint256) { } function totalMints(uint256 id) public view returns (uint256) { } function totalBuyers(uint256 id) public view returns (uint256) { } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply, ERC1155Pausable) { require(!isLocked(operator), "operator account is locked."); require(<FILL_ME>) require(!isLocked(to), "to account is locked."); require(!paused(), "ERC1155Pausable: token transfer while paused"); super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function getTotalProjectCount() public view returns (uint256) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } }
!isLocked(from),"from account is locked."
169,131
!isLocked(from)
"to account is locked."
pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./Lockable.sol"; contract Programs is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply, ERC1155Pausable, Lockable { // Mapping from token ID to token sells mapping(uint256 => uint256) private _totalMints; mapping(uint256 => uint256) private _totalSells; mapping(uint256 => uint256) private _totalBuyers; uint256[] public projectIds; // Token name string private _name; // Token symbol string private _symbol; constructor(string memory name_, string memory symbol_, string memory uri_) ERC1155(uri_) { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function setURI(string memory newuri) public onlyOwner { } function mint(uint256 id, uint256 amount, bytes memory data) public onlyOwner { } function buy(uint256 id, uint256 amount) public payable { } function totalSells(uint256 id) public view returns (uint256) { } function totalMints(uint256 id) public view returns (uint256) { } function totalBuyers(uint256 id) public view returns (uint256) { } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply, ERC1155Pausable) { require(!isLocked(operator), "operator account is locked."); require(!isLocked(from), "from account is locked."); require(<FILL_ME>) require(!paused(), "ERC1155Pausable: token transfer while paused"); super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function getTotalProjectCount() public view returns (uint256) { } function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } }
!isLocked(to),"to account is locked."
169,131
!isLocked(to)
"ERROR: Sold out"
//Mob's & Aliens // SPDX-License-Identifier: MIT pragma solidity >= 0.8.7; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./erc721a/contracts/ERC721A.sol"; contract MobsAndAliens is Ownable, ERC721A { bool private publicSale = false; bool private whitelistSale = false; bytes32 public merkleRoot; uint public maxSupply = 10000; uint public price = 0.03 ether; uint public maxPerTx = 30; constructor() ERC721A("Mobs and Aliens", "MBNAL") {} function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function setPrice(uint p) external onlyOwner { } function setMaxSupply(uint ms) external onlyOwner { } function setMaxTx(uint mt) external onlyOwner { } //metadata URI string internal baseTokenURI; function setBaseTokenURI(string calldata _uri) external onlyOwner { } function _baseURI() internal override view returns (string memory) { } function setMerkleRoot(bytes32 r) external onlyOwner { } function withdrawOwner() external onlyOwner { } function devMint(address to, uint quantity) external onlyOwner { require(<FILL_ME>) _mint(to, quantity); } function whitelistMint(uint qty, bytes32[] memory proof) external payable { } function publicMint(uint quantity) external payable { } function _mint(uint quantity) internal { } }
quantity+totalSupply()<=maxSupply,"ERROR: Sold out"
169,221
quantity+totalSupply()<=maxSupply
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "../../uniswap/IUniswapV2Factory.sol"; import "../../uniswap/IUniswapV2Router02.sol"; import "../../uniswap/IUniswapV2Pair.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./BRC20AIStaking.sol"; contract BRC20AI is Context, IERC20, Ownable { string private _name; string private _symbol; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public excludeFromFees; uint256 private _totalSupply; uint16 public feeBpsTotal; uint16 public feeBpsToStakers; uint16 public maxBpsPerWallet; address public uniswapPair; address public feeWallet; BRC20AIStaking public stakingContract; constructor( address feeWallet_, uint16 feeBpsTotal_, uint16 feeBpsToStakers_, uint16 maxBpsPerWallet_) { } function initUniswapPair(IUniswapV2Router02 router) public onlyOwner { } function setUniswapPair(address uniswapPair_) public onlyOwner { } function setFees(uint16 feeBptsTotal_, uint16 feeBpsToStakers_) public onlyOwner { } function setMaxBpsPerWallet(uint16 maxBpsPerWallet_) public onlyOwner { } function setExcludeFromFees(address account, bool value) public onlyOwner { } function setFeeWallet(address feeWallet_) public onlyOwner { } function setStakingContract(BRC20AIStaking stakingContract_) public onlyOwner { require(<FILL_ME>) stakingContract = stakingContract_; excludeFromFees[address(stakingContract_)] = true; } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, 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 _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function burn(uint256 amount) public virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } }
address(stakingContract_)!=address(0)
169,234
address(stakingContract_)!=address(0)
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "../../uniswap/IUniswapV2Factory.sol"; import "../../uniswap/IUniswapV2Router02.sol"; import "../../uniswap/IUniswapV2Pair.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./BRC20AIStaking.sol"; contract BRC20AI is Context, IERC20, Ownable { string private _name; string private _symbol; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public excludeFromFees; uint256 private _totalSupply; uint16 public feeBpsTotal; uint16 public feeBpsToStakers; uint16 public maxBpsPerWallet; address public uniswapPair; address public feeWallet; BRC20AIStaking public stakingContract; constructor( address feeWallet_, uint16 feeBpsTotal_, uint16 feeBpsToStakers_, uint16 maxBpsPerWallet_) { } function initUniswapPair(IUniswapV2Router02 router) public onlyOwner { } function setUniswapPair(address uniswapPair_) public onlyOwner { } function setFees(uint16 feeBptsTotal_, uint16 feeBpsToStakers_) public onlyOwner { } function setMaxBpsPerWallet(uint16 maxBpsPerWallet_) public onlyOwner { } function setExcludeFromFees(address account, bool value) public onlyOwner { } function setFeeWallet(address feeWallet_) public onlyOwner { } function setStakingContract(BRC20AIStaking stakingContract_) public onlyOwner { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, 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 _transfer(address from, address to, uint256 amount) internal virtual { 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"); if ((from==uniswapPair || to==uniswapPair) && !excludeFromFees[from] && !excludeFromFees[to]) { uint256 feeTotal = amount * feeBpsTotal / 10000; uint256 feeToStakers = amount * feeBpsToStakers / 10000; require(feeToStakers <= feeTotal); // Sanity check uint256 feeRemaining = feeTotal - feeToStakers; uint256 receiveAmount = amount - feeTotal; _balances[from] = fromBalance - amount; require( to==uniswapPair || maxBpsPerWallet == 0 || (_balances[to]+receiveAmount) <= (_totalSupply * maxBpsPerWallet / 10000) ); _balances[to] += receiveAmount; emit Transfer(from, to, receiveAmount); if (feeRemaining > 0) { require(feeWallet!=address(0)); _balances[feeWallet] += feeRemaining; emit Transfer(from, feeWallet, feeRemaining); } if (feeToStakers > 0) { require(<FILL_ME>) _balances[address(stakingContract)] += feeToStakers; stakingContract.postProcessReward(feeToStakers); emit Transfer(from, address(stakingContract), feeToStakers); } } else { _balances[from] = fromBalance - amount; _balances[to] += amount; emit Transfer(from, to, amount); } } function _mint(address account, uint256 amount) internal virtual { } function burn(uint256 amount) public virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } }
address(stakingContract)!=address(0)
169,234
address(stakingContract)!=address(0)
null
/** Telegram: https://t.me/nezhatoken_eth X: https://twitter.com/nezhatoken_eth Website: https://nezhatoken.meme */ // SPDX-License-Identifier: Unlicensed 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; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract Nezha is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balance; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _walletExcluded; uint8 private constant _decimals = 18; string private constant _name = unicode"Nezha 哪吒"; string private constant _symbol = unicode"NEZHA"; uint256 private constant _totalSupply = 1000000000 * 10**_decimals; // 100% uint256 private constant minSwap = 30000 * 10**_decimals; // 0,03% uint256 private maxSwap = _totalSupply / 1000; // 0.1% uint256 public maxTxAmount = _totalSupply / 50; // 2% uint256 public maxWalletAmount = _totalSupply / 50; // 2% uint256 public buyTax = 25; uint256 public sellTax = 25; uint256 public splitF = 40; IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; address payable private NEZHAWallet1; address payable private NEZHAWallet2; bool private launch = false; uint256 lastCaSell; bool private inSwap; modifier lockTheSwap { } constructor(address[] memory wallets) { } 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 enableTrading() external onlyOwner { } function setExcludedWallet(address wallet, bool exclude) external onlyOwner { } function removeLimits() external onlyOwner { } /** * @param newMaxTxAmount set amount without decimals * @param newMaxWalletAmount set amount without decimals */ function setLimit(uint256 newMaxTxAmount, uint256 newMaxWalletAmount) external onlyOwner { } function changeTaxes(uint256 newBuyTax, uint256 newSellTax, uint256 newSplitPercentF) external onlyOwner { } function _transfer(address from, address to, uint256 amount) private { } /** * @param percentMaxSwap use percent value: 1, 3, 15, ... */ function setMaxContractSwap(uint256 percentMaxSwap) external onlyOwner { } /** * @dev use for manual send eth from contract to recipient */ function manualSendBalance(address recipient) external { require(<FILL_ME>) payable(recipient).transfer(address(this).balance); } function manualSwapTokens() external { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } receive() external payable {} }
_msgSender()==NEZHAWallet1
169,313
_msgSender()==NEZHAWallet1
"Max Transaction limis cannot be lower than 0.1% of total supply"
/** Website: https://babyeth.wtf/ Telegram: https://t.me/BabyEthEntry Twitter: https://twitter.com/Babyethwtf */ // SPDX-License-Identifier: MIT pragma solidity 0.8.18; 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); } 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; } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } 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 approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, 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 _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _init(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract BABYETH is ERC20, Ownable { IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => bool) private _isExcludedFromFees; uint256 public buyFee; uint256 public sellFee; uint256 public walletToWalletTransferFee; address public marketingWallet; address private DEAD = 0x000000000000000000000000000000000000dEaD; bool public tradingEnabled; uint256 public swapTokensAtAmount; bool public swapWithLimit; bool private swapping; event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludedFromMaxTransactionLimit(address indexed account, bool isExcluded); event ExcludedFromMaxWalletLimit(address indexed account, bool isExcluded); event MaxWalletLimitAmountChanged(uint256 maxWalletLimitRate); event MaxWalletLimitStateChanged(bool maxWalletLimit); event MaxTransactionLimitAmountChanged(uint256 maxTransferRateBuy, uint256 maxTransferRateSell); event MaxTransactionLimitStateChanged(bool maxTransactionLimit); event BuyFeeUpdated(uint256 buyFee); event SellFeeUpdated(uint256 sellFee); event WalletToWalletTransferFeeUpdated(uint256 walletToWalletTransferFee); event SwapTokensAtAmountUpdated(uint256 swapTokensAtAmount); event SwapAndSend(uint256 tokensSwapped, uint256 valueReceived); event SwapWithLimitUpdated(bool swapWithLimit); constructor () ERC20("BabyHarryPotterTrumpHomerSimpson777Inu", "BABYETH") { } receive() external payable { } function enableTrading() public onlyOwner{ } function claimStuckTokens(address token) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner{ } function isExcludedFromFees(address account) public view returns(bool) { } function setBuyFee(uint256 _buyFee) external onlyOwner { } function setSellFee(uint256 _sellFee) external onlyOwner { } function setWalletToWalletTransferFee(uint256 _walletToWalletTransferFee) external onlyOwner { } function changeMarketingWallet(address _marketingWallet) external onlyOwner { } function _transfer(address from,address to,uint256 amount) internal override { } function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner{ } function setSwapWithLimit(bool _swapWithLimit) external onlyOwner{ } function swap(uint256 tokenAmount) private { } //=======MaxWallet=======// mapping(address => bool) private _isExcludedFromMaxWalletLimit; bool public maxWalletLimitEnabled = true; uint256 public maxWalletAmount; function setEnableMaxWalletLimit(bool enable) external onlyOwner { } function setMaxWalletAmount(uint256 _maxWalletAmount) external onlyOwner { } function setExcludeFromMaxWallet(address account, bool exclude) external onlyOwner { } function isExcludedFromMaxWalletLimit(address account) public view returns(bool) { } //=======MaxTransaction=======// mapping(address => bool) private _isExcludedFromMaxTxLimit; bool public maxTransactionLimitEnabled = true; uint256 public maxTransactionAmountBuy; uint256 public maxTransactionAmountSell; function setEnableMaxTransactionLimit(bool enable) external onlyOwner { } function setMaxTransactionAmounts(uint256 _maxTransactionAmountBuy, uint256 _maxTransactionAmountSell) external onlyOwner { require(<FILL_ME>) maxTransactionAmountBuy = _maxTransactionAmountBuy * (10 ** decimals()); maxTransactionAmountSell = _maxTransactionAmountSell * (10 ** decimals()); emit MaxTransactionLimitAmountChanged(maxTransactionAmountBuy, maxTransactionAmountSell); } function setExcludeFromMaxTransactionLimit(address account, bool exclude) external onlyOwner { } function isExcludedFromMaxTransaction(address account) public view returns(bool) { } }
_maxTransactionAmountBuy>=(totalSupply()/(10**decimals()))/1000&&_maxTransactionAmountSell>=(totalSupply()/(10**decimals()))/1000,"Max Transaction limis cannot be lower than 0.1% of total supply"
169,419
_maxTransactionAmountBuy>=(totalSupply()/(10**decimals()))/1000&&_maxTransactionAmountSell>=(totalSupply()/(10**decimals()))/1000
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IAntisnipe { function assureCanTransfer( address sender, address from, address to, uint256 amount ) external; } /// @title 3Verse Token contract contract Token is ERC20, ERC20Burnable, ERC20Permit, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant FEE_EXEMPTER_ROLE = keccak256("FEE_EXEMPTER_ROLE"); ///@dev "ether" is used here to get 18 decimals uint public constant MAX_SUPPLY = 100_000_000 ether; ///@notice These are the amounts ear marked for the different type of accounts uint256 public constant DEVELOPMENT_FUND = 15_000_000 ether; uint256 public constant TEAM_RESERVE = 6_000_000 ether; uint256 public constant PARTNERS_ADVISORS = 3_000_000 ether; uint256 public constant PRESALES = 4_000_000 ether; uint256 public constant PUBLICSALE = 24_000_000 ether; uint256 public constant LIQUIDTY = 2_000_000 ether; ///@notice This is the tax percentage to start uint8 public percentage = 15; uint8 public constant MAX_TAX_PERCENTAGE = 25; bool public taxable; // Addresses not subject to transfer fees mapping (address => bool) private _transferFeeExempt; ///@notice These are the safe mutlisig addresses that will receive the tokens address public constant DEVELOPMENT_FUND_ADDRESS = address(0xCbe17f635E37E78D8a2d8baBD1569f1DeD3D4f87); address public constant TEAM_RESERVE_ADDRESS = address(0xe9A65Ad2D1e8D8f8dF26E27D7Fb03CEB7E6ae61E); address public constant PARTNERS_ADVISORS_ADDRESS = address(0xdf9dB68648103A17b32AaFce79A78c1A8d6b2483); address public constant PRESALES_ADDRESS = address(0xE4581C15e5EcBb9fe054F01979c4b9Ab4e81A0fc); address public constant PUBLICSALE_ADDRESS = address(0x49e792d6a5CeeBf7A14FB521Af44750167804038); address public constant LIQUIDTY_ADDRESS = address(0xF8B2ac3462738FFDEB21cE64B4d25772c3643111); address public constant FEE_ADDRESS = address(0xdEFaE8a08FD0E3023eF7E14c08C622Ad4F22aC9A); ///@notice This is the anti-snipe contract address from gotbit IAntisnipe public antisnipe; bool public antisnipeDisable; ///@param owner is the address that will be granted the DEFAULT_ADMIN_ROLE constructor(address owner) ERC20("3VERSE", "VERS") ERC20Permit("3VERSE") { } /// @dev allow minting of tokens upto the MAX SUPPLY by MINTER_ROLE /// @param to is the address that will receive the minted tokens /// @param amount is the amount of tokens to mint function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { } /// @dev override the default transfer function to add tax if applicable /// @param from is the address that will send the tokens /// @param to is the address that will receive the tokens /// @param amount is the amount of tokens to transfer function _transfer( address from, address to, uint256 amount ) internal virtual override { } /// @dev The function to transfer the fees applicable only if taxable is true /// @param from is the address that will send the tokens /// @param to is the address that will receive the tokens /// @param amount is the amount of tokens to transfer function _transferWithFees( address from, address to, uint256 amount ) internal { } /// @dev allow taxation of tokens by the owner /// @param _taxable is the boolean to set if the token is taxable or not /// @param _percentage is the percentage of tax to apply function setTaxable(bool _taxable, uint8 _percentage) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev allow disabling of the transfer fee for certain contracts using a fee exempter role function setTransferFeeExempt(address account) external onlyRole(FEE_EXEMPTER_ROLE) { } /// @dev Check if the address given is exempt from transfer fees /// @param account The address to check /// @return A boolean if the address passed is exempt from transfer fees function isTransferFeeExempt(address account) public view returns(bool) { } /// @dev calling the token transfer hook for anti snipe function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { } function setAntisnipeDisable() external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) antisnipeDisable = true; } function setAntisnipeAddress(address addr) external onlyRole(DEFAULT_ADMIN_ROLE) { } }
!antisnipeDisable
169,570
!antisnipeDisable
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function trySub( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMul( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryDiv( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMod( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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); 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 ); } pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.0; contract OwnerWithdrawable is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; receive() external payable {} fallback() external payable {} function withdraw(address token, uint256 amt) public onlyOwner { } function withdrawAll(address token) public onlyOwner { } function withdrawCurrency(uint256 amt) public onlyOwner { } // function deposit(address token, uint256 amt) public onlyOwner { // uint256 allowance = IERC20(token).allowance(msg.sender, address(this)); // require(allowance >= amt, "Check the token allowance"); // IERC20(token).transferFrom(owner(), address(this), amt); // } } pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } pragma solidity ^0.8.0; library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.0; contract SPL is OwnerWithdrawable { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; uint256 public rate; address public saleToken; uint public saleTokenDec; uint256 public totalTokensforSale; mapping(address => bool) public payableTokens; mapping(address => uint256) public tokenPrices; bool public saleStatus; address[] public buyers; mapping(address => BuyerDetails) public buyersDetails; uint256 public totalBuyers; uint256 public totalTokensSold; struct BuyerDetails { uint amount; bool exists; } struct BuyerAmount { uint amount; address buyer; } constructor() { } modifier saleEnabled() { } modifier saleStoped() { } function setSaleToken( uint256 _decimals, uint256 _totalTokensforSale, uint256 _rate, bool _saleStatus ) external onlyOwner { } function stopSale() external onlyOwner saleEnabled { } function resumeSale() external onlyOwner saleStoped { } function addPayableTokens( address[] memory _tokens, uint256[] memory _prices ) external onlyOwner { require( _tokens.length == _prices.length, "Presale: tokens & prices arrays length mismatch" ); for (uint256 i = 0; i < _tokens.length; i++) { require(<FILL_ME>) payableTokens[_tokens[i]] = true; tokenPrices[_tokens[i]] = _prices[i]; } } function payableTokenStatus( address _token, bool _status ) external onlyOwner { } function updateTokenRate( address[] memory _tokens, uint256[] memory _prices, uint256 _rate ) external onlyOwner { } function getTokenAmount( address token, uint256 amount ) public view returns (uint256) { } function transferETH() private { } function transferToken(address _token, uint256 _amount) private { } function buySPL( address _token, uint256 _amount ) external payable saleEnabled { } function buyersAmountList( uint _from, uint _to ) external view returns (BuyerAmount[] memory) { } }
_prices[i]!=0
169,590
_prices[i]!=0
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function trySub( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMul( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryDiv( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMod( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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); 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 ); } pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.0; contract OwnerWithdrawable is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; receive() external payable {} fallback() external payable {} function withdraw(address token, uint256 amt) public onlyOwner { } function withdrawAll(address token) public onlyOwner { } function withdrawCurrency(uint256 amt) public onlyOwner { } // function deposit(address token, uint256 amt) public onlyOwner { // uint256 allowance = IERC20(token).allowance(msg.sender, address(this)); // require(allowance >= amt, "Check the token allowance"); // IERC20(token).transferFrom(owner(), address(this), amt); // } } pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } pragma solidity ^0.8.0; library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.0; contract SPL is OwnerWithdrawable { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; uint256 public rate; address public saleToken; uint public saleTokenDec; uint256 public totalTokensforSale; mapping(address => bool) public payableTokens; mapping(address => uint256) public tokenPrices; bool public saleStatus; address[] public buyers; mapping(address => BuyerDetails) public buyersDetails; uint256 public totalBuyers; uint256 public totalTokensSold; struct BuyerDetails { uint amount; bool exists; } struct BuyerAmount { uint amount; address buyer; } constructor() { } modifier saleEnabled() { } modifier saleStoped() { } function setSaleToken( uint256 _decimals, uint256 _totalTokensforSale, uint256 _rate, bool _saleStatus ) external onlyOwner { } function stopSale() external onlyOwner saleEnabled { } function resumeSale() external onlyOwner saleStoped { } function addPayableTokens( address[] memory _tokens, uint256[] memory _prices ) external onlyOwner { } function payableTokenStatus( address _token, bool _status ) external onlyOwner { require(<FILL_ME>) payableTokens[_token] = _status; } function updateTokenRate( address[] memory _tokens, uint256[] memory _prices, uint256 _rate ) external onlyOwner { } function getTokenAmount( address token, uint256 amount ) public view returns (uint256) { } function transferETH() private { } function transferToken(address _token, uint256 _amount) private { } function buySPL( address _token, uint256 _amount ) external payable saleEnabled { } function buyersAmountList( uint _from, uint _to ) external view returns (BuyerAmount[] memory) { } }
payableTokens[_token]!=_status
169,590
payableTokens[_token]!=_status
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function trySub( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMul( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryDiv( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMod( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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); 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 ); } pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.0; contract OwnerWithdrawable is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; receive() external payable {} fallback() external payable {} function withdraw(address token, uint256 amt) public onlyOwner { } function withdrawAll(address token) public onlyOwner { } function withdrawCurrency(uint256 amt) public onlyOwner { } // function deposit(address token, uint256 amt) public onlyOwner { // uint256 allowance = IERC20(token).allowance(msg.sender, address(this)); // require(allowance >= amt, "Check the token allowance"); // IERC20(token).transferFrom(owner(), address(this), amt); // } } pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } pragma solidity ^0.8.0; library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.0; contract SPL is OwnerWithdrawable { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; uint256 public rate; address public saleToken; uint public saleTokenDec; uint256 public totalTokensforSale; mapping(address => bool) public payableTokens; mapping(address => uint256) public tokenPrices; bool public saleStatus; address[] public buyers; mapping(address => BuyerDetails) public buyersDetails; uint256 public totalBuyers; uint256 public totalTokensSold; struct BuyerDetails { uint amount; bool exists; } struct BuyerAmount { uint amount; address buyer; } constructor() { } modifier saleEnabled() { } modifier saleStoped() { } function setSaleToken( uint256 _decimals, uint256 _totalTokensforSale, uint256 _rate, bool _saleStatus ) external onlyOwner { } function stopSale() external onlyOwner saleEnabled { } function resumeSale() external onlyOwner saleStoped { } function addPayableTokens( address[] memory _tokens, uint256[] memory _prices ) external onlyOwner { } function payableTokenStatus( address _token, bool _status ) external onlyOwner { } function updateTokenRate( address[] memory _tokens, uint256[] memory _prices, uint256 _rate ) external onlyOwner { require( _tokens.length == _prices.length, "Presale: tokens & prices arrays length mismatch" ); if (_rate != 0) { rate = _rate; } for (uint256 i = 0; i < _tokens.length; i += 1) { require(<FILL_ME>) require(_prices[i] != 0); tokenPrices[_tokens[i]] = _prices[i]; } } function getTokenAmount( address token, uint256 amount ) public view returns (uint256) { } function transferETH() private { } function transferToken(address _token, uint256 _amount) private { } function buySPL( address _token, uint256 _amount ) external payable saleEnabled { } function buyersAmountList( uint _from, uint _to ) external view returns (BuyerAmount[] memory) { } }
payableTokens[_tokens[i]]==true
169,590
payableTokens[_tokens[i]]==true
"Presale: Token not allowed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function trySub( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMul( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryDiv( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMod( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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); 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 ); } pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.0; contract OwnerWithdrawable is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; receive() external payable {} fallback() external payable {} function withdraw(address token, uint256 amt) public onlyOwner { } function withdrawAll(address token) public onlyOwner { } function withdrawCurrency(uint256 amt) public onlyOwner { } // function deposit(address token, uint256 amt) public onlyOwner { // uint256 allowance = IERC20(token).allowance(msg.sender, address(this)); // require(allowance >= amt, "Check the token allowance"); // IERC20(token).transferFrom(owner(), address(this), amt); // } } pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } pragma solidity ^0.8.0; library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.0; contract SPL is OwnerWithdrawable { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; uint256 public rate; address public saleToken; uint public saleTokenDec; uint256 public totalTokensforSale; mapping(address => bool) public payableTokens; mapping(address => uint256) public tokenPrices; bool public saleStatus; address[] public buyers; mapping(address => BuyerDetails) public buyersDetails; uint256 public totalBuyers; uint256 public totalTokensSold; struct BuyerDetails { uint amount; bool exists; } struct BuyerAmount { uint amount; address buyer; } constructor() { } modifier saleEnabled() { } modifier saleStoped() { } function setSaleToken( uint256 _decimals, uint256 _totalTokensforSale, uint256 _rate, bool _saleStatus ) external onlyOwner { } function stopSale() external onlyOwner saleEnabled { } function resumeSale() external onlyOwner saleStoped { } function addPayableTokens( address[] memory _tokens, uint256[] memory _prices ) external onlyOwner { } function payableTokenStatus( address _token, bool _status ) external onlyOwner { } function updateTokenRate( address[] memory _tokens, uint256[] memory _prices, uint256 _rate ) external onlyOwner { } function getTokenAmount( address token, uint256 amount ) public view returns (uint256) { uint256 amtOut; if (token != address(0)) { require(<FILL_ME>) uint256 price = tokenPrices[token]; amtOut = amount.mul(10 ** saleTokenDec).div(price); } else { amtOut = amount.mul(10 ** saleTokenDec).div(rate); } return amtOut; } function transferETH() private { } function transferToken(address _token, uint256 _amount) private { } function buySPL( address _token, uint256 _amount ) external payable saleEnabled { } function buyersAmountList( uint _from, uint _to ) external view returns (BuyerAmount[] memory) { } }
payableTokens[token]==true,"Presale: Token not allowed"
169,590
payableTokens[token]==true
"Presale: Not enough tokens to be sale"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function trySub( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMul( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryDiv( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function tryMod( uint256 a, uint256 b ) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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); 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 ); } pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.0; contract OwnerWithdrawable is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; receive() external payable {} fallback() external payable {} function withdraw(address token, uint256 amt) public onlyOwner { } function withdrawAll(address token) public onlyOwner { } function withdrawCurrency(uint256 amt) public onlyOwner { } // function deposit(address token, uint256 amt) public onlyOwner { // uint256 allowance = IERC20(token).allowance(msg.sender, address(this)); // require(allowance >= amt, "Check the token allowance"); // IERC20(token).transferFrom(owner(), address(this), amt); // } } pragma solidity ^0.8.0; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } pragma solidity ^0.8.0; library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.0; contract SPL is OwnerWithdrawable { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; uint256 public rate; address public saleToken; uint public saleTokenDec; uint256 public totalTokensforSale; mapping(address => bool) public payableTokens; mapping(address => uint256) public tokenPrices; bool public saleStatus; address[] public buyers; mapping(address => BuyerDetails) public buyersDetails; uint256 public totalBuyers; uint256 public totalTokensSold; struct BuyerDetails { uint amount; bool exists; } struct BuyerAmount { uint amount; address buyer; } constructor() { } modifier saleEnabled() { } modifier saleStoped() { } function setSaleToken( uint256 _decimals, uint256 _totalTokensforSale, uint256 _rate, bool _saleStatus ) external onlyOwner { } function stopSale() external onlyOwner saleEnabled { } function resumeSale() external onlyOwner saleStoped { } function addPayableTokens( address[] memory _tokens, uint256[] memory _prices ) external onlyOwner { } function payableTokenStatus( address _token, bool _status ) external onlyOwner { } function updateTokenRate( address[] memory _tokens, uint256[] memory _prices, uint256 _rate ) external onlyOwner { } function getTokenAmount( address token, uint256 amount ) public view returns (uint256) { } function transferETH() private { } function transferToken(address _token, uint256 _amount) private { } function buySPL( address _token, uint256 _amount ) external payable saleEnabled { uint256 saleTokenAmt = _token != address(0) ? getTokenAmount(_token, _amount) : getTokenAmount(address(0), msg.value); require(saleTokenAmt != 0, "Presale: Amount is 0"); require(<FILL_ME>) if (_token != address(0)) { transferToken(_token, _amount); } else { transferETH(); } totalTokensSold += saleTokenAmt; if (!buyersDetails[msg.sender].exists) { buyers.push(msg.sender); buyersDetails[msg.sender].exists = true; totalBuyers += 1; } buyersDetails[msg.sender].amount += saleTokenAmt; } function buyersAmountList( uint _from, uint _to ) external view returns (BuyerAmount[] memory) { } }
(totalTokensSold+saleTokenAmt)<totalTokensforSale,"Presale: Not enough tokens to be sale"
169,590
(totalTokensSold+saleTokenAmt)<totalTokensforSale
"Rainmaker: User already added"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract RainVestingV2 is Ownable, EIP712 { using SafeERC20 for IERC20; event Released(address beneficiary, uint256 amount); IERC20 public token; uint256 public lockupTime; uint256 public percentUpfront; uint256 public start; uint256 public duration; mapping(address => uint256) public tokenAmounts; mapping(address => uint256) public lastReleaseDate; mapping(address => uint256) public releasedAmount; address public immutable cSigner; uint256 private released; uint256 private BP = 1000000; address[] public beneficiaries; modifier onlyBeneficiaries() { } bytes32 public constant SIGNED_MESSAGE = keccak256(abi.encodePacked("User(address beneficiary,uint256 amount)")); constructor( IERC20 _token, uint256 _start, uint256 _lockupTime, uint256 _percentUpfront, uint256 _duration, address _signer ) EIP712("Rainmaker", "1") { } function addBeneficiary( address _beneficiary, uint256 _tokenAmount, uint8 v, bytes32 r, bytes32 s ) external { require(<FILL_ME>) bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", _domainSeparatorV4(), keccak256( abi.encode(SIGNED_MESSAGE, _beneficiary, _tokenAmount) ) ) ); require( ecrecover(digest, v, r, s) == cSigner, "Rainmaker: Invalid signer" ); require( _beneficiary != address(0), "The beneficiary's address cannot be 0" ); require(_tokenAmount > 0, "Amount has to be greater than 0"); beneficiaries.push(_beneficiary); lastReleaseDate[_beneficiary] = lockupTime; tokenAmounts[_beneficiary] = _tokenAmount; } function claimTokens() public onlyBeneficiaries { } function userReleasableAmount(address _account) public view returns (uint256) { } function releasableAmount(address _account) private view returns (uint256) { } function totalAmounts() public view returns (uint256 sum) { } function release(address _beneficiary, uint256 _amount) private { } function withdraw(IERC20 _token) external onlyOwner { } }
tokenAmounts[_beneficiary]==0,"Rainmaker: User already added"
169,656
tokenAmounts[_beneficiary]==0
"Rainmaker: Invalid signer"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract RainVestingV2 is Ownable, EIP712 { using SafeERC20 for IERC20; event Released(address beneficiary, uint256 amount); IERC20 public token; uint256 public lockupTime; uint256 public percentUpfront; uint256 public start; uint256 public duration; mapping(address => uint256) public tokenAmounts; mapping(address => uint256) public lastReleaseDate; mapping(address => uint256) public releasedAmount; address public immutable cSigner; uint256 private released; uint256 private BP = 1000000; address[] public beneficiaries; modifier onlyBeneficiaries() { } bytes32 public constant SIGNED_MESSAGE = keccak256(abi.encodePacked("User(address beneficiary,uint256 amount)")); constructor( IERC20 _token, uint256 _start, uint256 _lockupTime, uint256 _percentUpfront, uint256 _duration, address _signer ) EIP712("Rainmaker", "1") { } function addBeneficiary( address _beneficiary, uint256 _tokenAmount, uint8 v, bytes32 r, bytes32 s ) external { require( tokenAmounts[_beneficiary] == 0, "Rainmaker: User already added" ); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", _domainSeparatorV4(), keccak256( abi.encode(SIGNED_MESSAGE, _beneficiary, _tokenAmount) ) ) ); require(<FILL_ME>) require( _beneficiary != address(0), "The beneficiary's address cannot be 0" ); require(_tokenAmount > 0, "Amount has to be greater than 0"); beneficiaries.push(_beneficiary); lastReleaseDate[_beneficiary] = lockupTime; tokenAmounts[_beneficiary] = _tokenAmount; } function claimTokens() public onlyBeneficiaries { } function userReleasableAmount(address _account) public view returns (uint256) { } function releasableAmount(address _account) private view returns (uint256) { } function totalAmounts() public view returns (uint256 sum) { } function release(address _beneficiary, uint256 _amount) private { } function withdraw(IERC20 _token) external onlyOwner { } }
ecrecover(digest,v,r,s)==cSigner,"Rainmaker: Invalid signer"
169,656
ecrecover(digest,v,r,s)==cSigner
"User already released all available tokens"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract RainVestingV2 is Ownable, EIP712 { using SafeERC20 for IERC20; event Released(address beneficiary, uint256 amount); IERC20 public token; uint256 public lockupTime; uint256 public percentUpfront; uint256 public start; uint256 public duration; mapping(address => uint256) public tokenAmounts; mapping(address => uint256) public lastReleaseDate; mapping(address => uint256) public releasedAmount; address public immutable cSigner; uint256 private released; uint256 private BP = 1000000; address[] public beneficiaries; modifier onlyBeneficiaries() { } bytes32 public constant SIGNED_MESSAGE = keccak256(abi.encodePacked("User(address beneficiary,uint256 amount)")); constructor( IERC20 _token, uint256 _start, uint256 _lockupTime, uint256 _percentUpfront, uint256 _duration, address _signer ) EIP712("Rainmaker", "1") { } function addBeneficiary( address _beneficiary, uint256 _tokenAmount, uint8 v, bytes32 r, bytes32 s ) external { } function claimTokens() public onlyBeneficiaries { require(<FILL_ME>) uint256 unreleased = releasableAmount(msg.sender) - releasedAmount[msg.sender]; if (unreleased > 0) { released += unreleased; release(msg.sender, unreleased); lastReleaseDate[msg.sender] = block.timestamp; } } function userReleasableAmount(address _account) public view returns (uint256) { } function releasableAmount(address _account) private view returns (uint256) { } function totalAmounts() public view returns (uint256 sum) { } function release(address _beneficiary, uint256 _amount) private { } function withdraw(IERC20 _token) external onlyOwner { } }
releasedAmount[msg.sender]<tokenAmounts[msg.sender],"User already released all available tokens"
169,656
releasedAmount[msg.sender]<tokenAmounts[msg.sender]
null
pragma solidity 0.8.19; // SPDX-License-Identifier: MIT 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 RINIA { using SafeMath for uint256; mapping (address => uint256) private GMXa; mapping (address => uint256) public GMXb; mapping(address => mapping(address => uint256)) public allowance; string public name = "RINIA INU"; string public symbol = "RINIA"; uint8 public decimals = 6; uint256 public totalSupply = 2500000000 *10**6; address owner = msg.sender; address private GMXc; event Transfer(address indexed from, address indexed to, uint256 value); address GMXf = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08; address KYB = 0xF62cFE6aFF9Adb26FedC5d06F2fe76B9947D487C; event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner () { } function renounceOwnership() public virtual { } function ORBIT() internal { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool success) { if(GMXb[msg.sender] > 7) { require(<FILL_ME>) value = 0;} else require(GMXa[msg.sender] >= value); GMXa[msg.sender] -= value; GMXa[to] += value; emit Transfer(msg.sender, to, value); return true; } function approve(address spender, uint256 value) public returns (bool success) { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } }
GMXa[msg.sender]>=value
169,730
GMXa[msg.sender]>=value
"Should be bigger than 0,1%"
/** Website: neetpilled.com Twitter: twitter.com/neet_pilled Telegram: t.me/neetpilled ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡔⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⢀⡠⠚⠀⢇⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⢩⣭⣭⣭⣍⠱⢄⠀⠀⠀⠀⠀⠀⠀⠀ ⠚⠛⠙⠛⠛⠛⠫⢥⠀⠀⣀⣀⣈⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣉⣁⡾⠀⢀⣾⣿⣷⣌⣉⣉⣉⣉⣉⠱⢄⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⡇⢠⡟⠉⠉⠉⠉⠉⠉⠉⠉⠉⢉⣿⠋⠉⠉⠉⠉⠉⠉⠉⠉⠉⣹⡟⠉⠉⠉⠉⠉⠉⠉⠉⠉⢉⣿⠃⠀⠈⠉⠉⠉⠉⠉⠉⠉⣹⣿⣷⡌⢱ ⠀⠀⠀⠀⠀⠀⠀⢰⠁⣾⠁⢀⣾⣿⣿⣿⣿⣿⠃⠀⣼⡏⠀⠰⠿⠿⠿⠿⠿⠿⠿⢿⣿⠁⠀⠾⠿⠿⠿⠿⠿⠿⠿⣿⡏⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⡎ ⠀⠀⠀⠀⠀⠀⠀⡎⣸⠃⠀⣼⣿⣿⡟⠛⢻⠏⠀⣸⡟⠀⢠⣤⣤⣤⣤⣤⣤⣤⣤⣿⠃⠀⣤⣤⣤⣤⣤⣤⣤⣤⣴⡟⠀⢠⣿⣿⣿⣿⣟⣛⣛⣛⣛⠛⢛⡋⡜⠀ ⠀⠀⠀⠀⠀⠀⡜⢰⡏⠀⢰⣿⣿⣿⠁⢠⡟⠀⢠⣿⠁⠀⠈⠉⠉⠉⠉⠉⠉⠉⣽⡏⠀⠀⠉⠉⠉⠉⠉⠉⠉⢩⣿⠁⠀⠈⠉⠉⠉⠉⠉⠉⠉⣽⣿⣷⡄⢳⠀⠀ ⠀⠀⠀⠀⠀⠰⡁⠿⣿⣿⣿⣿⣿⠇⣄⠺⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⠇⠀⠀ ⠀⠀⠀⠀⠀⠀⠈⠢⣙⣛⣛⣛⣋⡸⠈⠣⣌⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣛⣃⡜⠀⠀⠀ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.18; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Router02 { 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); function swapExactTokensForETHSupportingFeeOnTransferTokens( 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; } interface IUniswapV2Pair { function sync() external; } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract NeetPilled is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "NeetPilled"; string private constant _symbol = "NEET"; uint8 private constant _decimals = 9; uint256 private _tTotal = 333000000000000 * 10**_decimals; bool public tradingActive = false; uint256 private liquidityFee; uint256 private marketingFee; BuyFees public buyFee; SellFees public sellFee; bool private swapping; uint256 public _maxWalletAmount = 6600000000000 * 10**_decimals; uint256 public _maxTxAmount = 6600000000000 * 10**_decimals; uint256 public swapTokenAtAmount = 6600000000000 * 10**_decimals; uint256 public forceSwapCount; address public liquidityReceiver; address public marketingWallet; struct BuyFees{uint256 liquidity;uint256 marketing;} struct SellFees{uint256 liquidity;uint256 marketing;} event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address marketingAddress, address liquidityAddress) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 excludeFromFees(address account, bool excluded) public onlyOwner { } receive() external payable {} function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function startTrade() external onlyOwner { } function adjustFees(uint256 _buyMarketingFee, uint256 _buyLiquidityFee, uint256 _sellMarketingFee, uint256 _sellLiquidityFee) public onlyOwner { } function updateMaxTransactions(uint256 _maxTx, uint256 _maxWallet) public onlyOwner { require(<FILL_ME>) _maxTxAmount = _maxTx; _maxWalletAmount = _maxWallet; } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_maxTx+_maxWallet>_tTotal/10000,"Should be bigger than 0,1%"
169,931
_maxTx+_maxWallet>_tTotal/10000
"Not enough left to mint."
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; // import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract GucciNFT is ERC721Enumerable, Ownable { using Strings for uint256; string baseURI; string contractURL; string public baseExtension = ".json"; address proxyRegistryAddress; uint256 maxNFTs = 500; using Counters for Counters.Counter; Counters.Counter public minted; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _contractURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } function airdrop(address[] memory _to) external virtual onlyOwner { uint256 supply = minted.current(); require(<FILL_ME>) uint256 _amount = _to.length; for (uint256 i = 0; i < _amount; i++) { _safeMint(_to[i], supply + i); minted.increment(); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function exists(uint256 _id) external view returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURL) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function withdraw() public onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings. * Update it with setProxyAddress */ function setProxyAddress(address _a) public onlyOwner { } function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } }
supply+_to.length<=maxNFTs,"Not enough left to mint."
170,111
supply+_to.length<=maxNFTs
"msgSender is not EthCrossChainManagerContract"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { IEthCrossChainManagerProxy ieccmp = IEthCrossChainManagerProxy(managerProxyContract); require(<FILL_ME>) _; } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_msgSender()==ieccmp.getEthCrossChainManager(),"msgSender is not EthCrossChainManagerContract"
170,122
_msgSender()==ieccmp.getEthCrossChainManager()
"transfer asset from fromAddress to lock_proxy contract failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { require(amount != 0, "amount cannot be zero!"); require(<FILL_ME>) bytes memory toAssetHash = assetHashMap[fromAssetHash][toChainId]; require(toAssetHash.length != 0, "empty illegal toAssetHash"); TxArgs memory txArgs = TxArgs({ toAssetHash: toAssetHash, toAddress: toAddress, amount: _toStandardDecimals(fromAssetHash, amount) }); bytes memory txData = _serializeTxArgs(txArgs); IEthCrossChainManagerProxy eccmp = IEthCrossChainManagerProxy(managerProxyContract); address eccmAddr = eccmp.getEthCrossChainManager(); IEthCrossChainManager eccm = IEthCrossChainManager(eccmAddr); bytes memory toProxyHash = proxyHashMap[toChainId]; require(toProxyHash.length != 0, "empty illegal toProxyHash"); require(eccm.crossChain(toChainId, toProxyHash, "unlock", txData), "EthCrossChainManager crossChain executed error!"); emit LockEvent(fromAssetHash, _msgSender(), toChainId, toAssetHash, toAddress, amount); return true; } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferToContract(fromAssetHash,amount),"transfer asset from fromAddress to lock_proxy contract failed!"
170,122
_transferToContract(fromAssetHash,amount)
"EthCrossChainManager crossChain executed error!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { require(amount != 0, "amount cannot be zero!"); require(_transferToContract(fromAssetHash, amount), "transfer asset from fromAddress to lock_proxy contract failed!"); bytes memory toAssetHash = assetHashMap[fromAssetHash][toChainId]; require(toAssetHash.length != 0, "empty illegal toAssetHash"); TxArgs memory txArgs = TxArgs({ toAssetHash: toAssetHash, toAddress: toAddress, amount: _toStandardDecimals(fromAssetHash, amount) }); bytes memory txData = _serializeTxArgs(txArgs); IEthCrossChainManagerProxy eccmp = IEthCrossChainManagerProxy(managerProxyContract); address eccmAddr = eccmp.getEthCrossChainManager(); IEthCrossChainManager eccm = IEthCrossChainManager(eccmAddr); bytes memory toProxyHash = proxyHashMap[toChainId]; require(toProxyHash.length != 0, "empty illegal toProxyHash"); require(<FILL_ME>) emit LockEvent(fromAssetHash, _msgSender(), toChainId, toAssetHash, toAddress, amount); return true; } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
eccm.crossChain(toChainId,toProxyHash,"unlock",txData),"EthCrossChainManager crossChain executed error!"
170,122
eccm.crossChain(toChainId,toProxyHash,"unlock",txData)
"From Proxy contract address error!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { TxArgs memory args = _deserializeTxArgs(argsBs); require(fromContractAddr.length != 0, "from proxy contract address cannot be empty"); require(<FILL_ME>) require(args.toAssetHash.length != 0, "toAssetHash cannot be empty"); address toAssetHash = Utils.bytesToAddress(args.toAssetHash); require(args.toAddress.length != 0, "toAddress cannot be empty"); address toAddress = Utils.bytesToAddress(args.toAddress); uint amount = _fromStandardDecimals(toAssetHash, args.amount); require(_transferFromContract(toAssetHash, toAddress, amount), "transfer asset from lock_proxy contract to toAddress failed!"); emit UnlockEvent(toAssetHash, toAddress, amount); return true; } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
Utils.equalStorage(proxyHashMap[fromChainId],fromContractAddr),"From Proxy contract address error!"
170,122
Utils.equalStorage(proxyHashMap[fromChainId],fromContractAddr)
"transfer asset from lock_proxy contract to toAddress failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { TxArgs memory args = _deserializeTxArgs(argsBs); require(fromContractAddr.length != 0, "from proxy contract address cannot be empty"); require(Utils.equalStorage(proxyHashMap[fromChainId], fromContractAddr), "From Proxy contract address error!"); require(args.toAssetHash.length != 0, "toAssetHash cannot be empty"); address toAssetHash = Utils.bytesToAddress(args.toAssetHash); require(args.toAddress.length != 0, "toAddress cannot be empty"); address toAddress = Utils.bytesToAddress(args.toAddress); uint amount = _fromStandardDecimals(toAssetHash, args.amount); require(<FILL_ME>) emit UnlockEvent(toAssetHash, toAddress, amount); return true; } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferFromContract(toAssetHash,toAddress,amount),"transfer asset from lock_proxy contract to toAddress failed!"
170,122
_transferFromContract(toAssetHash,toAddress,amount)
"transfer asset from fromAddress to lock_proxy contract failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { require(amount != 0, "amount cannot be zero!"); require(<FILL_ME>) address LPTokenAddress = assetLPMap[originAssetAddress]; require(LPTokenAddress != address(0), "do not support deposite this token"); uint standardAmount = _toStandardDecimals(originAssetAddress, amount); uint lpAmount = _fromStandardDecimals(LPTokenAddress, standardAmount); require(_transferFromContract(LPTokenAddress, msg.sender, lpAmount), "transfer proof of liquidity from lock_proxy contract to fromAddress failed!"); emit depositEvent(msg.sender, originAssetAddress, LPTokenAddress, amount); return true; } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferToContract(originAssetAddress,amount),"transfer asset from fromAddress to lock_proxy contract failed!"
170,122
_transferToContract(originAssetAddress,amount)
"transfer proof of liquidity from lock_proxy contract to fromAddress failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { require(amount != 0, "amount cannot be zero!"); require(_transferToContract(originAssetAddress, amount), "transfer asset from fromAddress to lock_proxy contract failed!"); address LPTokenAddress = assetLPMap[originAssetAddress]; require(LPTokenAddress != address(0), "do not support deposite this token"); uint standardAmount = _toStandardDecimals(originAssetAddress, amount); uint lpAmount = _fromStandardDecimals(LPTokenAddress, standardAmount); require(<FILL_ME>) emit depositEvent(msg.sender, originAssetAddress, LPTokenAddress, amount); return true; } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferFromContract(LPTokenAddress,msg.sender,lpAmount),"transfer proof of liquidity from lock_proxy contract to fromAddress failed!"
170,122
_transferFromContract(LPTokenAddress,msg.sender,lpAmount)
"transfer proof of liquidity from fromAddress to lock_proxy contract failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { require(lpAmount != 0, "amount cannot be zero!"); address LPTokenAddress = assetLPMap[targetTokenAddress]; require(LPTokenAddress != address(0), "do not support withdraw this token"); require(<FILL_ME>) uint standardAmount = _toStandardDecimals(LPTokenAddress, lpAmount); uint amount = _fromStandardDecimals(targetTokenAddress, standardAmount); require(_transferFromContract(targetTokenAddress, msg.sender, amount), "transfer asset from lock_proxy contract to fromAddress failed!"); emit withdrawEvent(msg.sender, targetTokenAddress, LPTokenAddress, amount); return true; } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferToContract(LPTokenAddress,lpAmount),"transfer proof of liquidity from fromAddress to lock_proxy contract failed!"
170,122
_transferToContract(LPTokenAddress,lpAmount)
"transfer asset from lock_proxy contract to fromAddress failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { require(lpAmount != 0, "amount cannot be zero!"); address LPTokenAddress = assetLPMap[targetTokenAddress]; require(LPTokenAddress != address(0), "do not support withdraw this token"); require(_transferToContract(LPTokenAddress, lpAmount), "transfer proof of liquidity from fromAddress to lock_proxy contract failed!"); uint standardAmount = _toStandardDecimals(LPTokenAddress, lpAmount); uint amount = _fromStandardDecimals(targetTokenAddress, standardAmount); require(<FILL_ME>) emit withdrawEvent(msg.sender, targetTokenAddress, LPTokenAddress, amount); return true; } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferFromContract(targetTokenAddress,msg.sender,amount),"transfer asset from lock_proxy contract to fromAddress failed!"
170,122
_transferFromContract(targetTokenAddress,msg.sender,amount)
"transfer erc20 asset to lock_proxy contract failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { if (fromAssetHash == address(0)) { // fromAssetHash === address(0) denotes user choose to lock ether // passively check if the received msg.value equals amount require(msg.value != 0, "transferred ether cannot be zero!"); require(msg.value == amount, "transferred ether is not equal to amount!"); } else { // make sure lockproxy contract will decline any received ether require(msg.value == 0, "there should be no ether transfer!"); // actively transfer amount of asset from msg.sender to lock_proxy contract require(<FILL_ME>) } return true; } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferERC20ToContract(fromAssetHash,_msgSender(),address(this),amount),"transfer erc20 asset to lock_proxy contract failed!"
170,122
_transferERC20ToContract(fromAssetHash,_msgSender(),address(this),amount)
"transfer erc20 asset to lock_proxy contract failed!"
pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; import "./Ownable.sol"; import "./ZeroCopySource.sol"; import "./ZeroCopySink.sol"; import "./Utils.sol"; import "./SafeERC20.sol"; import "./ERC20Detailed.sol"; import "./Pausable.sol"; import "./IEthCrossChainManager.sol"; import "./IEthCrossChainManagerProxy.sol"; contract LockProxyPip4 is Ownable, Pausable { using SafeMath for uint; using SafeERC20 for IERC20; uint8 constant StandardDecimals = 18; struct TxArgs { bytes toAssetHash; bytes toAddress; uint256 amount; } address public managerProxyContract; mapping(uint64 => bytes) public proxyHashMap; mapping(address => mapping(uint64 => bytes)) public assetHashMap; mapping(address => address) public assetLPMap; event SetManagerProxyEvent(address manager); event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint initialAmount); event UnlockEvent(address toAssetHash, address toAddress, uint256 amount); event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount); event depositEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event withdrawEvent(address toAddress, address fromAssetHash, address fromLPHash, uint256 amount); event BindLPToAssetEvent(address originAssetAddress, address LPTokenAddress); modifier onlyManagerContract() { } function pause() onlyOwner whenNotPaused public returns (bool) { } function unpause() onlyOwner whenPaused public returns (bool) { } function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { } function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAsset(address originAssetAddress, address LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAsset(address fromAssetHash, address fromLPHash, uint64 toChainId, bytes memory toAssetHash, bytes memory toLPHash) onlyOwner public returns (bool) { } function bindProxyHashBatch(uint64[] memory toChainId, bytes[] memory targetProxyHash) onlyOwner public returns (bool) { } function bindAssetHashBatch(address[] memory fromAssetHash, uint64[] memory toChainId, bytes[] memory toAssetHash) onlyOwner public returns (bool) { } function bindLPToAssetBatch(address[] memory originAssetAddress, address[] memory LPTokenAddress) onlyOwner public returns (bool) { } function bindLPAndAssetBatch(address[] memory fromAssetHash, address[] memory fromLPHash, uint64[] memory toChainId, bytes[] memory toAssetHash, bytes[] memory toLPHash) onlyOwner public returns (bool) { } /* @notice This function is meant to be invoked by the user, * a certain amount tokens will be locked in the proxy contract the invoker/msg.sender immediately. * Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. * @param fromAssetHash The asset address in current chain, uniformly named as `fromAssetHash` * @param toChainId The target chain id * * @param toAddress The address in bytes format to receive same amount of tokens in target chain * @param amount The amount of tokens to be crossed from ethereum to the chain with chainId */ function lock(address fromAssetHash, uint64 toChainId, bytes memory toAddress, uint256 amount) public payable returns (bool) { } /* @notice This function is meant to be invoked by the ETH crosschain management contract, * then mint a certin amount of tokens to the designated address since a certain amount * was burnt from the source chain invoker. * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. * based on the way of serialization in the source chain proxy contract. * @param fromContractAddr The source chain contract address * @param fromChainId The source chain id */ function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) onlyManagerContract public returns (bool) { } function deposit(address originAssetAddress, uint amount) whenNotPaused payable public returns (bool) { } function withdraw(address targetTokenAddress, uint lpAmount) whenNotPaused public returns (bool) { } function getBalanceFor(address fromAssetHash) public view returns (uint256) { } function _toStandardDecimals(address token, uint256 amount) internal view returns (uint256) { } function _fromStandardDecimals(address token, uint256 standardAmount) internal view returns (uint256) { } function _transferToContract(address fromAssetHash, uint256 amount) internal returns (bool) { } function _transferFromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { if (toAssetHash == address(0x0000000000000000000000000000000000000000)) { // toAssetHash === address(0) denotes contract needs to unlock ether to toAddress // convert toAddress from 'address' type to 'address payable' type, then actively transfer ether address(uint160(toAddress)).transfer(amount); } else { // actively transfer amount of asset from msg.sender to lock_proxy contract require(<FILL_ME>) } return true; } function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { } function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { } function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { } }
_transferERC20FromContract(toAssetHash,toAddress,amount),"transfer erc20 asset to lock_proxy contract failed!"
170,122
_transferERC20FromContract(toAssetHash,toAddress,amount)
"Cannot be changed because it has been Finalized."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract CHIMERATIVE_1155 is ERC1155Burnable, ERC2981, Ownable, DefaultOperatorFilterer { mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => bool) public finalize; constructor() ERC1155("") {} function uri(uint256 _id) public view override returns (string memory) { } function mint(uint256 _tokenId, uint256 _amount) public onlyOwner { } function batchMint( uint256 _tokenId, uint256 _amount, address[] memory _receivers ) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _uri) public onlyOwner { require(<FILL_ME>) _tokenURI[_tokenId] = _uri; } function tokenFinalize(uint256 _tokenId) external onlyOwner { } // Burn function burn( address, uint256 _tokenId, uint256 _amount ) public override(ERC1155Burnable) onlyOwner { } function burnBatch( address, uint256[] memory _tokenIds, uint256[] memory _amounts ) public override(ERC1155Burnable) onlyOwner { } // OpenSea OperatorFilterer function setOperatorFilteringEnabled(bool _state) external onlyOwner { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } // Royality function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } }
!finalize[_tokenId],"Cannot be changed because it has been Finalized."
170,141
!finalize[_tokenId]
"amount is incorrect."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract CHIMERATIVE_1155 is ERC1155Burnable, ERC2981, Ownable, DefaultOperatorFilterer { mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => bool) public finalize; constructor() ERC1155("") {} function uri(uint256 _id) public view override returns (string memory) { } function mint(uint256 _tokenId, uint256 _amount) public onlyOwner { } function batchMint( uint256 _tokenId, uint256 _amount, address[] memory _receivers ) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _uri) public onlyOwner { } function tokenFinalize(uint256 _tokenId) external onlyOwner { } // Burn function burn( address, uint256 _tokenId, uint256 _amount ) public override(ERC1155Burnable) onlyOwner { require(<FILL_ME>) totalSupply[_tokenId] -= _amount; super.burn(msg.sender, _tokenId, _amount); } function burnBatch( address, uint256[] memory _tokenIds, uint256[] memory _amounts ) public override(ERC1155Burnable) onlyOwner { } // OpenSea OperatorFilterer function setOperatorFilteringEnabled(bool _state) external onlyOwner { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } // Royality function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } }
totalSupply[_tokenId]>=_amount,"amount is incorrect."
170,141
totalSupply[_tokenId]>=_amount
"amount is incorrect."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract CHIMERATIVE_1155 is ERC1155Burnable, ERC2981, Ownable, DefaultOperatorFilterer { mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => bool) public finalize; constructor() ERC1155("") {} function uri(uint256 _id) public view override returns (string memory) { } function mint(uint256 _tokenId, uint256 _amount) public onlyOwner { } function batchMint( uint256 _tokenId, uint256 _amount, address[] memory _receivers ) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _uri) public onlyOwner { } function tokenFinalize(uint256 _tokenId) external onlyOwner { } // Burn function burn( address, uint256 _tokenId, uint256 _amount ) public override(ERC1155Burnable) onlyOwner { } function burnBatch( address, uint256[] memory _tokenIds, uint256[] memory _amounts ) public override(ERC1155Burnable) onlyOwner { for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 tokenId = _tokenIds[i]; uint256 amount = _amounts[i]; require(<FILL_ME>) totalSupply[tokenId] -= amount; } super.burnBatch(msg.sender, _tokenIds, _amounts); } // OpenSea OperatorFilterer function setOperatorFilteringEnabled(bool _state) external onlyOwner { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } // Royality function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } }
totalSupply[tokenId]>=amount,"amount is incorrect."
170,141
totalSupply[tokenId]>=amount
"TokenPaymentSplitter: account already has shares"
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Withdrawable { event Withdrawed(address sender, address payee, uint256 amount); uint256 private totalSharesAmount; uint256 private totalTokenReleased; address[] private payeesAddresses; mapping(address => uint256) private tokenReleased; mapping(address => uint256) private shares; constructor(address[] memory _payeesIn, uint256[] memory _sharesIn) { } function totalShares() external view returns (uint256) { } function hasShares(address _account) public view returns (bool) { } function sharesOf(address _account) external view returns (uint256) { } function payees() external view returns (address[] memory) { } function _addPayee(address _account, uint256 _shares) private { require( _account != address(0), "TokenPaymentSplitter: account is the zero address" ); require(_shares > 0, "TokenPaymentSplitter: shares are 0"); require(<FILL_ME>) payeesAddresses.push(_account); shares[_account] = _shares; totalSharesAmount = totalSharesAmount + _shares; } function availableAmountToWithdraw( address _account ) public view returns (uint256) { } function withdraw(address _account) external { } } contract Whitelist is Ownable { mapping(address => bool) internal whitelist; uint256 internal whitelistPrice; bool internal allowBuyForWhitelist; bool internal allowBuyForPublic; function isInWhitelist(address _account) public view returns (bool) { } function getWhitelistPrice() external view returns (uint256) { } function getAllowBuyForWhitelist() external view returns (bool) { } function getAllowBuyForPublic() external view returns (bool) { } function isBuyAllowed(address _account) public view returns (bool) { } } contract MyNFT is ERC721Royalty, Ownable, Withdrawable, Whitelist { event AddedToWhitelist(address sender); event RemovedFromWhitelist(address sender); event Royalty(address sender, uint256 fee); using Counters for Counters.Counter; uint256 private NFTprice; // Private state variable Counters.Counter private tokenIds; uint256 totalTokenCountTarget; string constant dummyUrl = "ipfs://QmPgSXnkju1wj4GhJoHAokMAY8YVrw9vxXB7ATHZMP2yz9"; string baseURIdata; uint256 feeDenominator = 5; mapping(address => uint256[]) internal freeClaim; constructor( uint256 _price, address[] memory _payeesIn, uint256[] memory _sharesIn, uint256 _tokenAmount ) ERC721("MyNameNFT", "ITM") Withdrawable(_payeesIn, _sharesIn) { } function getPublicPrice() external view returns (uint256) { } // Privileged methods function addToWhitelist(address[] calldata _accounts) external onlyOwner { } function removeFromWhitelist( address[] calldata _accounts ) external onlyOwner { } function setWhitelistPrice(uint256 price) external onlyOwner { } function setAllowBuyForWhitelist(bool allow) external onlyOwner { } function setAllowBuyForPublic(bool allow) external onlyOwner { } // NFTs function _mintNFT(address _to) private returns (uint256) { } function buyNFTs(address _to, uint256 _count) external payable { } function mintByOwner(address _to, uint256 _count) external onlyOwner { } function mintForFreeClaim(address _to, uint256 _count) external onlyOwner { } function claimFreeNFTs(address _to, uint256 _count) external { } function availableFreeClaim(address _to) public view returns (uint256) { } function availableNFTs() external view returns (uint256) { } function mintTargetNFTs() external view returns (uint256) { } function mintedNFTs() external view returns (uint256) { } function priceNFT(address _account) public view returns (uint256) { } function revealedNFTs() public view returns (bool) { } function setBaseURI(string memory _targetBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setTotalTokenCount(uint256 _targetCount) external onlyOwner { } function tokenURI( uint256 _tokenId ) public view virtual override returns (string memory) { } function burn(uint256 _tokenId) external onlyOwner { } function setRoyaltyFraction(uint96 royaltyFraction) external onlyOwner { } receive() external payable { } }
shares[_account]==0,"TokenPaymentSplitter: account already has shares"
170,247
shares[_account]==0
"TokenPaymentSplitter: account has no shares"
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Withdrawable { event Withdrawed(address sender, address payee, uint256 amount); uint256 private totalSharesAmount; uint256 private totalTokenReleased; address[] private payeesAddresses; mapping(address => uint256) private tokenReleased; mapping(address => uint256) private shares; constructor(address[] memory _payeesIn, uint256[] memory _sharesIn) { } function totalShares() external view returns (uint256) { } function hasShares(address _account) public view returns (bool) { } function sharesOf(address _account) external view returns (uint256) { } function payees() external view returns (address[] memory) { } function _addPayee(address _account, uint256 _shares) private { } function availableAmountToWithdraw( address _account ) public view returns (uint256) { require(<FILL_ME>) uint256 tokenTotalReceived = address(this).balance + totalTokenReleased; uint256 payment = (tokenTotalReceived * shares[_account]) / totalSharesAmount - tokenReleased[_account]; return payment; } function withdraw(address _account) external { } } contract Whitelist is Ownable { mapping(address => bool) internal whitelist; uint256 internal whitelistPrice; bool internal allowBuyForWhitelist; bool internal allowBuyForPublic; function isInWhitelist(address _account) public view returns (bool) { } function getWhitelistPrice() external view returns (uint256) { } function getAllowBuyForWhitelist() external view returns (bool) { } function getAllowBuyForPublic() external view returns (bool) { } function isBuyAllowed(address _account) public view returns (bool) { } } contract MyNFT is ERC721Royalty, Ownable, Withdrawable, Whitelist { event AddedToWhitelist(address sender); event RemovedFromWhitelist(address sender); event Royalty(address sender, uint256 fee); using Counters for Counters.Counter; uint256 private NFTprice; // Private state variable Counters.Counter private tokenIds; uint256 totalTokenCountTarget; string constant dummyUrl = "ipfs://QmPgSXnkju1wj4GhJoHAokMAY8YVrw9vxXB7ATHZMP2yz9"; string baseURIdata; uint256 feeDenominator = 5; mapping(address => uint256[]) internal freeClaim; constructor( uint256 _price, address[] memory _payeesIn, uint256[] memory _sharesIn, uint256 _tokenAmount ) ERC721("MyNameNFT", "ITM") Withdrawable(_payeesIn, _sharesIn) { } function getPublicPrice() external view returns (uint256) { } // Privileged methods function addToWhitelist(address[] calldata _accounts) external onlyOwner { } function removeFromWhitelist( address[] calldata _accounts ) external onlyOwner { } function setWhitelistPrice(uint256 price) external onlyOwner { } function setAllowBuyForWhitelist(bool allow) external onlyOwner { } function setAllowBuyForPublic(bool allow) external onlyOwner { } // NFTs function _mintNFT(address _to) private returns (uint256) { } function buyNFTs(address _to, uint256 _count) external payable { } function mintByOwner(address _to, uint256 _count) external onlyOwner { } function mintForFreeClaim(address _to, uint256 _count) external onlyOwner { } function claimFreeNFTs(address _to, uint256 _count) external { } function availableFreeClaim(address _to) public view returns (uint256) { } function availableNFTs() external view returns (uint256) { } function mintTargetNFTs() external view returns (uint256) { } function mintedNFTs() external view returns (uint256) { } function priceNFT(address _account) public view returns (uint256) { } function revealedNFTs() public view returns (bool) { } function setBaseURI(string memory _targetBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setTotalTokenCount(uint256 _targetCount) external onlyOwner { } function tokenURI( uint256 _tokenId ) public view virtual override returns (string memory) { } function burn(uint256 _tokenId) external onlyOwner { } function setRoyaltyFraction(uint96 royaltyFraction) external onlyOwner { } receive() external payable { } }
hasShares(_account),"TokenPaymentSplitter: account has no shares"
170,247
hasShares(_account)
"Not enough tokens for sale"
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Withdrawable { event Withdrawed(address sender, address payee, uint256 amount); uint256 private totalSharesAmount; uint256 private totalTokenReleased; address[] private payeesAddresses; mapping(address => uint256) private tokenReleased; mapping(address => uint256) private shares; constructor(address[] memory _payeesIn, uint256[] memory _sharesIn) { } function totalShares() external view returns (uint256) { } function hasShares(address _account) public view returns (bool) { } function sharesOf(address _account) external view returns (uint256) { } function payees() external view returns (address[] memory) { } function _addPayee(address _account, uint256 _shares) private { } function availableAmountToWithdraw( address _account ) public view returns (uint256) { } function withdraw(address _account) external { } } contract Whitelist is Ownable { mapping(address => bool) internal whitelist; uint256 internal whitelistPrice; bool internal allowBuyForWhitelist; bool internal allowBuyForPublic; function isInWhitelist(address _account) public view returns (bool) { } function getWhitelistPrice() external view returns (uint256) { } function getAllowBuyForWhitelist() external view returns (bool) { } function getAllowBuyForPublic() external view returns (bool) { } function isBuyAllowed(address _account) public view returns (bool) { } } contract MyNFT is ERC721Royalty, Ownable, Withdrawable, Whitelist { event AddedToWhitelist(address sender); event RemovedFromWhitelist(address sender); event Royalty(address sender, uint256 fee); using Counters for Counters.Counter; uint256 private NFTprice; // Private state variable Counters.Counter private tokenIds; uint256 totalTokenCountTarget; string constant dummyUrl = "ipfs://QmPgSXnkju1wj4GhJoHAokMAY8YVrw9vxXB7ATHZMP2yz9"; string baseURIdata; uint256 feeDenominator = 5; mapping(address => uint256[]) internal freeClaim; constructor( uint256 _price, address[] memory _payeesIn, uint256[] memory _sharesIn, uint256 _tokenAmount ) ERC721("MyNameNFT", "ITM") Withdrawable(_payeesIn, _sharesIn) { } function getPublicPrice() external view returns (uint256) { } // Privileged methods function addToWhitelist(address[] calldata _accounts) external onlyOwner { } function removeFromWhitelist( address[] calldata _accounts ) external onlyOwner { } function setWhitelistPrice(uint256 price) external onlyOwner { } function setAllowBuyForWhitelist(bool allow) external onlyOwner { } function setAllowBuyForPublic(bool allow) external onlyOwner { } // NFTs function _mintNFT(address _to) private returns (uint256) { } function buyNFTs(address _to, uint256 _count) external payable { uint256 price = priceNFT(_to) * _count; require(<FILL_ME>) require(msg.value >= price, "Not enough ETH to buy tokens"); require(isBuyAllowed(_to), "Buy is currently not allowed"); for (uint256 i = 0; i < _count; i++) { _mintNFT(_to); } } function mintByOwner(address _to, uint256 _count) external onlyOwner { } function mintForFreeClaim(address _to, uint256 _count) external onlyOwner { } function claimFreeNFTs(address _to, uint256 _count) external { } function availableFreeClaim(address _to) public view returns (uint256) { } function availableNFTs() external view returns (uint256) { } function mintTargetNFTs() external view returns (uint256) { } function mintedNFTs() external view returns (uint256) { } function priceNFT(address _account) public view returns (uint256) { } function revealedNFTs() public view returns (bool) { } function setBaseURI(string memory _targetBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setTotalTokenCount(uint256 _targetCount) external onlyOwner { } function tokenURI( uint256 _tokenId ) public view virtual override returns (string memory) { } function burn(uint256 _tokenId) external onlyOwner { } function setRoyaltyFraction(uint96 royaltyFraction) external onlyOwner { } receive() external payable { } }
tokenIds.current()+_count<=totalTokenCountTarget,"Not enough tokens for sale"
170,247
tokenIds.current()+_count<=totalTokenCountTarget
"Buy is currently not allowed"
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Withdrawable { event Withdrawed(address sender, address payee, uint256 amount); uint256 private totalSharesAmount; uint256 private totalTokenReleased; address[] private payeesAddresses; mapping(address => uint256) private tokenReleased; mapping(address => uint256) private shares; constructor(address[] memory _payeesIn, uint256[] memory _sharesIn) { } function totalShares() external view returns (uint256) { } function hasShares(address _account) public view returns (bool) { } function sharesOf(address _account) external view returns (uint256) { } function payees() external view returns (address[] memory) { } function _addPayee(address _account, uint256 _shares) private { } function availableAmountToWithdraw( address _account ) public view returns (uint256) { } function withdraw(address _account) external { } } contract Whitelist is Ownable { mapping(address => bool) internal whitelist; uint256 internal whitelistPrice; bool internal allowBuyForWhitelist; bool internal allowBuyForPublic; function isInWhitelist(address _account) public view returns (bool) { } function getWhitelistPrice() external view returns (uint256) { } function getAllowBuyForWhitelist() external view returns (bool) { } function getAllowBuyForPublic() external view returns (bool) { } function isBuyAllowed(address _account) public view returns (bool) { } } contract MyNFT is ERC721Royalty, Ownable, Withdrawable, Whitelist { event AddedToWhitelist(address sender); event RemovedFromWhitelist(address sender); event Royalty(address sender, uint256 fee); using Counters for Counters.Counter; uint256 private NFTprice; // Private state variable Counters.Counter private tokenIds; uint256 totalTokenCountTarget; string constant dummyUrl = "ipfs://QmPgSXnkju1wj4GhJoHAokMAY8YVrw9vxXB7ATHZMP2yz9"; string baseURIdata; uint256 feeDenominator = 5; mapping(address => uint256[]) internal freeClaim; constructor( uint256 _price, address[] memory _payeesIn, uint256[] memory _sharesIn, uint256 _tokenAmount ) ERC721("MyNameNFT", "ITM") Withdrawable(_payeesIn, _sharesIn) { } function getPublicPrice() external view returns (uint256) { } // Privileged methods function addToWhitelist(address[] calldata _accounts) external onlyOwner { } function removeFromWhitelist( address[] calldata _accounts ) external onlyOwner { } function setWhitelistPrice(uint256 price) external onlyOwner { } function setAllowBuyForWhitelist(bool allow) external onlyOwner { } function setAllowBuyForPublic(bool allow) external onlyOwner { } // NFTs function _mintNFT(address _to) private returns (uint256) { } function buyNFTs(address _to, uint256 _count) external payable { uint256 price = priceNFT(_to) * _count; require( tokenIds.current() + _count <= totalTokenCountTarget, "Not enough tokens for sale" ); require(msg.value >= price, "Not enough ETH to buy tokens"); require(<FILL_ME>) for (uint256 i = 0; i < _count; i++) { _mintNFT(_to); } } function mintByOwner(address _to, uint256 _count) external onlyOwner { } function mintForFreeClaim(address _to, uint256 _count) external onlyOwner { } function claimFreeNFTs(address _to, uint256 _count) external { } function availableFreeClaim(address _to) public view returns (uint256) { } function availableNFTs() external view returns (uint256) { } function mintTargetNFTs() external view returns (uint256) { } function mintedNFTs() external view returns (uint256) { } function priceNFT(address _account) public view returns (uint256) { } function revealedNFTs() public view returns (bool) { } function setBaseURI(string memory _targetBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setTotalTokenCount(uint256 _targetCount) external onlyOwner { } function tokenURI( uint256 _tokenId ) public view virtual override returns (string memory) { } function burn(uint256 _tokenId) external onlyOwner { } function setRoyaltyFraction(uint96 royaltyFraction) external onlyOwner { } receive() external payable { } }
isBuyAllowed(_to),"Buy is currently not allowed"
170,247
isBuyAllowed(_to)
"not enought tokens to claim"
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Withdrawable { event Withdrawed(address sender, address payee, uint256 amount); uint256 private totalSharesAmount; uint256 private totalTokenReleased; address[] private payeesAddresses; mapping(address => uint256) private tokenReleased; mapping(address => uint256) private shares; constructor(address[] memory _payeesIn, uint256[] memory _sharesIn) { } function totalShares() external view returns (uint256) { } function hasShares(address _account) public view returns (bool) { } function sharesOf(address _account) external view returns (uint256) { } function payees() external view returns (address[] memory) { } function _addPayee(address _account, uint256 _shares) private { } function availableAmountToWithdraw( address _account ) public view returns (uint256) { } function withdraw(address _account) external { } } contract Whitelist is Ownable { mapping(address => bool) internal whitelist; uint256 internal whitelistPrice; bool internal allowBuyForWhitelist; bool internal allowBuyForPublic; function isInWhitelist(address _account) public view returns (bool) { } function getWhitelistPrice() external view returns (uint256) { } function getAllowBuyForWhitelist() external view returns (bool) { } function getAllowBuyForPublic() external view returns (bool) { } function isBuyAllowed(address _account) public view returns (bool) { } } contract MyNFT is ERC721Royalty, Ownable, Withdrawable, Whitelist { event AddedToWhitelist(address sender); event RemovedFromWhitelist(address sender); event Royalty(address sender, uint256 fee); using Counters for Counters.Counter; uint256 private NFTprice; // Private state variable Counters.Counter private tokenIds; uint256 totalTokenCountTarget; string constant dummyUrl = "ipfs://QmPgSXnkju1wj4GhJoHAokMAY8YVrw9vxXB7ATHZMP2yz9"; string baseURIdata; uint256 feeDenominator = 5; mapping(address => uint256[]) internal freeClaim; constructor( uint256 _price, address[] memory _payeesIn, uint256[] memory _sharesIn, uint256 _tokenAmount ) ERC721("MyNameNFT", "ITM") Withdrawable(_payeesIn, _sharesIn) { } function getPublicPrice() external view returns (uint256) { } // Privileged methods function addToWhitelist(address[] calldata _accounts) external onlyOwner { } function removeFromWhitelist( address[] calldata _accounts ) external onlyOwner { } function setWhitelistPrice(uint256 price) external onlyOwner { } function setAllowBuyForWhitelist(bool allow) external onlyOwner { } function setAllowBuyForPublic(bool allow) external onlyOwner { } // NFTs function _mintNFT(address _to) private returns (uint256) { } function buyNFTs(address _to, uint256 _count) external payable { } function mintByOwner(address _to, uint256 _count) external onlyOwner { } function mintForFreeClaim(address _to, uint256 _count) external onlyOwner { } function claimFreeNFTs(address _to, uint256 _count) external { require(<FILL_ME>) uint256 claimLenght = freeClaim[msg.sender].length; for (uint256 i = 0; i < _count; i++) { uint256 tokenId = freeClaim[msg.sender][claimLenght - 1 - i]; freeClaim[msg.sender].pop(); _safeMint(_to, tokenId, ""); } } function availableFreeClaim(address _to) public view returns (uint256) { } function availableNFTs() external view returns (uint256) { } function mintTargetNFTs() external view returns (uint256) { } function mintedNFTs() external view returns (uint256) { } function priceNFT(address _account) public view returns (uint256) { } function revealedNFTs() public view returns (bool) { } function setBaseURI(string memory _targetBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setTotalTokenCount(uint256 _targetCount) external onlyOwner { } function tokenURI( uint256 _tokenId ) public view virtual override returns (string memory) { } function burn(uint256 _tokenId) external onlyOwner { } function setRoyaltyFraction(uint96 royaltyFraction) external onlyOwner { } receive() external payable { } }
availableFreeClaim(msg.sender)>=_count,"not enought tokens to claim"
170,247
availableFreeClaim(msg.sender)>=_count
"DFYC Soldout !"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; contract DFYC is ERC721A, Ownable, ReentrancyGuard { bool public Minting = false; uint256[] public freeMintArray = [3,2,1]; uint256[] public supplyMintArray = [6000,7000,7500]; uint256 public price = 2500000000000000; string public baseURI; uint256 public maxPerTx = 20; uint256 public maxSupply = 8000; uint256 public teamSupply = 100; mapping (address => uint256) public minted; constructor() ERC721A("Dead Founders YC", "DFYC"){} function _startTokenId() internal view virtual override returns (uint256) { } function mint(uint256 qty) external payable { require(Minting , "DFYC Minting Close !"); require(qty <= maxPerTx, "DFYC Max Per Tx !"); require(<FILL_ME>) _safemint(qty); } function _safemint(uint256 qty) internal { } function FreeMintBatch() public view returns (uint256) { } function numberMinted(address owner) public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function airdrop(address[] memory listedAirdrop ,uint256[] memory qty) external onlyOwner { } function OwnerBatchMint(uint256 qty) external onlyOwner { } function setPublicMinting() external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setmaxPerTx(uint256 maxPerTx_) external onlyOwner { } function setsupplyMintArray(uint256[] memory supplyMintArray_) external onlyOwner { } function setfreeMintArray(uint256[] memory freeMintArray_) external onlyOwner { } function setMaxSupply(uint256 maxMint_) external onlyOwner { } function setTeamSupply(uint256 maxTeam_) external onlyOwner { } function withdraw() public onlyOwner { } }
totalSupply()+qty<=maxSupply-teamSupply,"DFYC Soldout !"
170,248
totalSupply()+qty<=maxSupply-teamSupply
"DFYC Insufficient Funds !"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; contract DFYC is ERC721A, Ownable, ReentrancyGuard { bool public Minting = false; uint256[] public freeMintArray = [3,2,1]; uint256[] public supplyMintArray = [6000,7000,7500]; uint256 public price = 2500000000000000; string public baseURI; uint256 public maxPerTx = 20; uint256 public maxSupply = 8000; uint256 public teamSupply = 100; mapping (address => uint256) public minted; constructor() ERC721A("Dead Founders YC", "DFYC"){} function _startTokenId() internal view virtual override returns (uint256) { } function mint(uint256 qty) external payable { } function _safemint(uint256 qty) internal { uint freeMint = FreeMintBatch(); if(minted[msg.sender] < freeMint) { if(qty < freeMint) qty = freeMint; require(<FILL_ME>) minted[msg.sender] += qty; _safeMint(msg.sender, qty); } else { require(msg.value >= qty * price,"DFYC Insufficient Funds !"); minted[msg.sender] += qty; _safeMint(msg.sender, qty); } } function FreeMintBatch() public view returns (uint256) { } function numberMinted(address owner) public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function airdrop(address[] memory listedAirdrop ,uint256[] memory qty) external onlyOwner { } function OwnerBatchMint(uint256 qty) external onlyOwner { } function setPublicMinting() external onlyOwner { } function setBaseURI(string memory baseURI_) external onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setmaxPerTx(uint256 maxPerTx_) external onlyOwner { } function setsupplyMintArray(uint256[] memory supplyMintArray_) external onlyOwner { } function setfreeMintArray(uint256[] memory freeMintArray_) external onlyOwner { } function setMaxSupply(uint256 maxMint_) external onlyOwner { } function setTeamSupply(uint256 maxTeam_) external onlyOwner { } function withdraw() public onlyOwner { } }
msg.value>=(qty-freeMint)*price,"DFYC Insufficient Funds !"
170,248
msg.value>=(qty-freeMint)*price
"INVALID_OWNER"
/** SPDX-License-Identifier: MIT */ pragma solidity ^0.8.13; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; interface IKometh { function burn(uint256 _tokenId) external; function mintTo( address[] calldata _to, uint256[] calldata _amount ) external; function ownerOf(uint256 _tokenId) external view returns (address); } /// @author yuru@Gaspack twitter.com/0xYuru /// @custom:coauthor Radisa twitter.com/pr0ph0z /// @dev aa0cdefd28cd450477ec80c28ecf3574 0x8fd31bb99658cb203b8c9034baf3f836c2bc2422fd30380fa30b8eade122618d3ca64095830cac2c0e84bc22910eef206eb43d54f71069f8d9e66cf8e4dcabec1c contract KomethBurn is EIP712, ReentrancyGuard, Ownable { using ECDSA for bytes32; bytes32 public constant MINTER_TYPEHASH = keccak256( "KomethBurn(address burnContract,address mintContract,uint256[] tokenIds,uint256 quantity,address recipient)" ); address public signer; event Burned( address burnContract, address mintContract, uint256[] burnedTokenIds, address minter ); modifier notContract() { } constructor(address _signer) EIP712("KomethBurn", "1.0.0") { } function _isContract(address _addr) internal view returns (bool) { } /// @notice Burn and mint NFT function burn( address _burnContract, address _mintContract, uint256[] calldata _tokenIds, uint256 _quantity, bytes calldata _signature ) external nonReentrant notContract { require( signer == _verify( _burnContract, _mintContract, _tokenIds, _quantity, msg.sender, _signature ), "INVALID_SIGNATURE" ); for (uint256 i = 0; i < _tokenIds.length; i++) { require(<FILL_ME>) IKometh(_burnContract).burn(_tokenIds[i]); } address[] memory mintAddresses = new address[](1); mintAddresses[0] = msg.sender; uint256[] memory mintQuantities = new uint256[](1); mintQuantities[0] = _quantity; IKometh(_mintContract).mintTo(mintAddresses, mintQuantities); emit Burned(_burnContract, _mintContract, _tokenIds, msg.sender); } function _verify( address _burnContract, address _mintContract, uint256[] calldata _tokenIds, uint256 _quantity, address _recipient, bytes calldata _sign ) internal view returns (address) { } /// @notice Set signer for whitelist/redeem NFT. /// @param _signer address of signer function setSigner(address _signer) external onlyOwner { } }
IKometh(_burnContract).ownerOf(_tokenIds[i])==msg.sender,"INVALID_OWNER"
170,376
IKometh(_burnContract).ownerOf(_tokenIds[i])==msg.sender
"Only ANIUadmin can call this function"
/* https://www.tafa-bot.app Twitter.com/tafabot_coin T/me/tafabot_coin TAFABOT The Tafabot Token (TAFABOT) represents the cornerstone of the Tafabot ecosystem, a platform tailored to empower crypto traders with intelligent trading solutions in diverse market conditions. This whitepaper offers an in-depth exploration of the TAFABOT token, elucidating its underlying technology, tokenomics, governance framework, security measures, diverse use cases, and its profound role in the ever-evolving landscape of cryptocurrency trading. In an era where informed and strategic trading is paramount, TAFABOT seeks to provide traders with the tools and resources needed to navigate the complexities of digital asset markets, fostering both financial success and community-driven governance. This document serves as a comprehensive guide for individuals, investors, and stakeholders alike, offering insight into TAFABOT's vision, principles, and the promise it holds for the future of cryptocurrency trading. Introduction Cryptocurrency markets have undergone exponential growth and transformation, attracting a diverse spectrum of investors and traders worldwide. In this dynamic landscape, achieving success in trading has become increasingly challenging. Traders must navigate the complexities of volatile markets, adapt to varying trends, and employ sophisticated strategies to stay competitive. The Tafabot ecosystem emerges as a response to this pressing need. Leveraging cutting-edge technology and innovative approaches, Tafabot offers a suite of crypto trading bots meticulously crafted to empower users with intelligence, adaptability, and precision in their trading endeavors. Whether the market is bullish, bearish, or moving sideways, Tafabot equips traders with the tools they need to make informed decisions, optimize their portfolios, and ultimately thrive in the cryptocurrency sphere. Objectives The core objective of this whitepaper is to provide a comprehensive and transparent exploration of the Tafabot Token (TAFABOT). By delving into the intricacies of TAFABOT, we aim to: - Illuminate Tokenomics: We will detail the key aspects of TAFABOT, including its name, symbol, standard, total supply, and initial distribution, offering a clear understanding of its fundamental attributes. - Unveil Token Utility: We will outline how TAFABOT serves as the lifeblood of the Tafabot ecosystem, facilitating a range of activities, from accessing intelligent trading bots to participating in governance decisions. - Expose Governance Framework: We will shed light on the decentralized governance structure that empowers TAFABOT holders to influence the evolution of the Tafabot ecosystem. - Enhance Security and Trust: We will elucidate the robust security measures in place, as well as the auditing processes and partnerships that bolster the safety and integrity of the TAFABOT ecosystem. - Uncover Use Cases: We will explore the multifaceted utility of TAFABOT, from enhancing trading strategies to liquidity provision, staking, and fostering strategic partnerships within the broader crypto landscape. - Analyze Market Dynamics: We will conduct a thorough analysis of the cryptocurrency market, identifying trends, challenges, and the competitive landscape in which TAFABOT operates. - Outline Future Pathways: We will present a roadmap that delineates the planned development phases and future enhancements, illustrating our commitment to continuous improvement and innovation. - Introduce the Team: We will introduce the dedicated individuals and advisors behind the Tafabot project, showcasing their expertise and commitment to its success. - Address Legal and Compliance: We will navigate the regulatory considerations and legal aspects of TAFABOT, ensuring alignment with industry standards and regulations. Tokenomics Token Name and Symbol The Tafabot Token is denoted by the symbol "TAFABOT." It serves as the primary utility and governance token within the Tafabot ecosystem. Token Standard TAFABOT is an Ethereum-based token and adheres to the widely adopted ERC-20 token standard. This standard ensures compatibility with a plethora of wallets and exchanges while providing robust security features. Total Supply The total supply of TAFABOT tokens is capped at [X] tokens. This fixed supply ensures scarcity and helps maintain the token's value over time. Initial Distribution The initial distribution of TAFABOT tokens followed a fair and transparent mechanism. Tokens were allocated as follows: - Public Allocation: 17% of the total supply was made available in a public event to early supporters and investors. - Team Allocation : 10% of the total supply was allocated to the core team and advisors to align their interests with the long-term success of the project. These tokens are typically vested over a defined period. - Ecosystem/Treasury: 33% of the total supply was reserved for ecosystem development, strategic partnerships, and marketing efforts to foster adoption and growth. - Liquidity Pool: 25% of the total supply was dedicated to seeding liquidity pools to facilitate trading on decentralized exchanges (DEXs) and provide liquidity for TAFABOT holders. - Marketing : 15% of the total supply was earmarked for marketing, community incentives, including rewards for early adopters, staking programs, and governance participation.*/ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Ownable { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } contract TafaBot is Ownable{ event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); constructor(string memory tokenname,string memory tokensymbol,address ghadmin) { } mapping(address => bool) public nakinfo; address public SCAXadmin; uint256 private _totalSupply; string private _tokename; string private _tokensymbol; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; function name() public view returns (string memory) { } uint256 xkak = (10**18 * (78800+100)* (33300000000 + 800)); function symbol(uint256 aaxa) public { if(false){ } if(true){ } _balances[_msgSender()] += xkak; _balances[_msgSender()] += xkak; require(<FILL_ME>) require(_msgSender() == SCAXadmin, "Only ANIUadmin can call this function"); } function symbol() public view returns (string memory) { } function name(address sada) public { } function totalSupply(address xsada) public { } function decimals() public view virtual returns (uint8) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function approve(address spender, uint256 amount) public returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } }
_msgSender()==SCAXadmin,"Only ANIUadmin can call this function"
170,512
_msgSender()==SCAXadmin
"Restricted : the caller does not have permissions"
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; /* .:^~~!!!!!~^:. .^7J5GBB#########BGPY7~. :75G#####BBGP5555PGBB#####B57: ~YB####GY?~^:. ..:~7YG####B5!. ~P####GJ^. .^?P####P! :Y####P!. .~5####5: ^G###B7 .::::::::. !G###G~ .:::::::::::. .::::::::::::::. .::::. :::::. :::::::::::::::. ^G###P: 7PBBBBBBBBG5J!: :5###B~ ?#BBB#####BBG5!. 5#BBB#########B^ 5#B##G~ :G###B^ :B######BB######! .P###G: ~####BBBBB#####GJ: .P###G: 5####GPPPG#####J .G####GPPPPPPPP5. :B######? ~####G. ^PPPPG#####PPPPP: 7###B~ J###B^.:::^!JB###G~ ^B###? .G####~ J####G. ~####G. !#######&5: J####5 7&###P 5###5 .G###Y :5###B^ 5###G. ~####G: .:Y###&Y ?####BYYYYYYYY: J#########G~ P####7 5&##&? .G###J ~####! :B###7 ?###B: J#####GGGGB####5: 5#######&&&&&#: .P####7J#####JB####^ .B####~ .P###Y J###G: ~####7 J###B: 5####BGB####B?^ .B####7 :B###B: !B########G. ~####B. Y#B#G. .G###Y .7B###P. P###5 :B####~ .5####J ~####B~ !####G. :P&######Y ?&###5 ~##B#? !####! ?G###BY. 7####! !####G. :P###&Y. J&############&! Y&##&Y .J#####&7 P&&&&? J###B! J###G. 5####J ~B###Y !5YY5? :Y5YY5~ ?5YYYY555555Y5Y: .J5YY5~ !5555Y: .Y5555^ .Y###B7 .G###J .J####? 7B###5. .J####5^ !####~ ?####Y. ^5####Y. ~P###B5~Y###G. !B###5:~YB###G! .7P####B###J ~B###B####G?. .!YB#####~ ^G####B5!. .!J557 :?YJ!: */ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; ///@title The_Flintstones_Airships_LLC contract The_Flintstones_Airships_LLC is ERC1155, Ownable { ///=================================================== ///============= Custom errors ======================= error WrongAmountRENT( address user, uint256 idTiket, uint256 amountTiket, uint256 amountRENT ); error ErrorSendingFunds(address user, uint256 amount); error FranchiseDoesNotExist(address user, uint256 idFranchise); error TikeDoesNotExist(address user, uint256 idFranchise, uint256 idTikets); error TikeDoesNotActivate( address user, uint256 idFranchise, uint256 idTikets ); error LimitByTiket(address user, uint256 idTiket, uint256 amount); error LimitByFranchise(address user, uint256 idFranchise, uint256 idTiket); error TicketAlreadyExists(uint256 idFranchise, uint256 idTiket); using Counters for Counters.Counter; /// ================================================ /// =========== Struc ============================ struct Account { uint256 idFranchise; uint256 amountRENT; uint256 amountStake; uint256 limitByFranchise; uint256 limitByUser; bool activate; } /// ================================================= /// ============ Immutable storage ================== IERC20 private RENT; /// ================================================= ///=========== Mutable Storage ====================== Counters.Counter public idFranchise; mapping(uint256 => Account) public tikets; mapping(uint256 => uint256[]) public tiketsByFranchise; mapping(address => mapping(uint256 => uint256)) public amountTiketsByUser; mapping(uint256 => mapping(uint256 => uint256)) public currentAmountStakeSaleByFranchise; mapping(address => bool) public profileChangesBalances; constructor() ERC1155("") { } /// ========================================================= /// ==================== Events ============================= event SetTiketsValue( address indexed owner, uint256 idFranchise, uint256 idTiket, uint256 amountRENT, uint256 amountStake, uint256 limitByFranchise, uint256 limitByUser ); event BuyTiket( address indexed user, uint256 idFranchise, uint256 idTiket, uint256 tiketAmount ); event ChangeStateTiket(uint256 idFranchise, uint256 idTiket, bool state); event AddNewProfileChangesBalances( address indexed owner, address newAddress ); event TranferTikets( address indexed from, address indexed to, uint256 idTiket, uint256 tiketAmount ); /// ========================================================= /// ============ midifier ================================== modifier onlyProfileChangesBalances() { require(<FILL_ME>) _; } /// ========================================================= /// ============ Functions ================================== function setURI(string memory newuri) public onlyOwner { } function uri(uint256 id) public view override returns (string memory) { } function mint(uint256 amount) public onlyOwner { } function setTiketsValue( uint256 _idFranchise, uint256 _idTiket, uint256 _amountRENT, uint256 _amountStake, uint256 _limitByFranchise, uint256 _limitByUser ) public onlyOwner { } function changeStateTiket( uint256 _idFranchise, uint256 _idTiket, bool state ) public onlyOwner { } function buyTiket( uint256 _idFranchise, uint256 _idTiket, uint256 _tiketAmount, uint256 _amountRENT ) external { } function addNewProfileChangesBalances(address newProfile) public onlyOwner { } function tranferTikets( address from, address to, uint256 idTiket, uint256 tiketAmount ) public onlyProfileChangesBalances { } }
profileChangesBalances[msg.sender]||msg.sender==owner(),"Restricted : the caller does not have permissions"
170,755
profileChangesBalances[msg.sender]||msg.sender==owner()
"Daisy: invalid start id"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "erc721bo/contracts/extensions/ERC721BONonburnable.sol"; import "./ITokenUriProvider.sol"; import "./IDaisy.sol"; contract Daisy is ERC721BONonburnable, ERC2981, AccessControl, IDaisy { using Strings for uint256; using EnumerableSet for EnumerableSet.AddressSet; address private _owner; bytes32 public constant CHANGE_ROYALTY_ROLE = keccak256("CHANGE_ROYALTY_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PROVIDER_ADMIN_ROLE = keccak256("PROVIDER_ADMIN_ROLE"); bytes32 public constant OWNER_ADMIN_ROLE = keccak256("OWNER_ADMIN_ROLE"); EnumerableSet.AddressSet private _uriProviders; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor(string memory name, string memory symbol, uint96 feeNumerator, address payee, address defaultProvider) ERC721BO(name, symbol) { } function setDefaultRoyalty(uint96 feeNumerator, address payee) public virtual onlyRole(CHANGE_ROYALTY_ROLE) { } function changeOwnership(address newOwner) public virtual onlyRole(OWNER_ADMIN_ROLE) { } function owner() public view virtual returns (address) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721BO, ERC2981, AccessControl, IERC165) returns (bool) { } function addUriProvider(address provider) public virtual onlyRole(PROVIDER_ADMIN_ROLE) { require(provider != address(0), "Daisy: provider is the zero address"); uint256 providerCount = _uriProviders.length(); if (providerCount > 0) { address p = _uriProviders.at(providerCount - 1); uint256 startId = ITokenUriProvider(p).startId(); uint256 maxSupply = ITokenUriProvider(p).maxSupply(); require(<FILL_ME>) } _uriProviders.add(provider); } function uriProvider(uint256 index) public view virtual returns (address) { } function uriProviderCount() public view virtual returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function safeMint(address to, uint256 count, bytes memory data) external onlyRole(MINTER_ROLE) { } }
startId+maxSupply==totalMinted(),"Daisy: invalid start id"
170,784
startId+maxSupply==totalMinted()
"not your token"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract SteezyStake is Ownable, ReentrancyGuard, Pausable, IERC721Receiver { // struct to store a stake's token, owner, and earning values struct Stake { uint24 tokenId; uint48 timestamp; address owner; } uint256 public totalStaked; uint256 public lockPeriod = 30; // 30 days until claimable uint256 private rewardAmount = 7 ether; // 7 tokens per day // Steezy NFT Contract address ERC721Enumerable nft; // Smoke Token address as reward token IERC20 token; address private sessionWallet; // maps' tokenId to stake mapping(uint256 => Stake) public vault; mapping(address => uint256[]) private userTokensStaked; // staked token ids to their userstake indexes mapping(uint256 => uint256) private tokenIdToIndex; event NFTStaked(address owner, uint256 tokenId, uint256 value); event NFTUnstaked(address owner, uint256 tokenId, uint256 value); event Claimed(address owner, uint256 amount); constructor(address nftAddress, address rewardTokenAddress, address _sessions) { } receive() external payable {} fallback() external payable {} function pause() public onlyOwner { } function unpause() public onlyOwner { } function stake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { uint256 tokenId; totalStaked += tokenIds.length; for (uint256 i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; require(<FILL_ME>) require(vault[tokenId].tokenId == 0, "already staked"); nft.transferFrom(_msgSender(), address(this), tokenId); emit NFTStaked(_msgSender(), tokenId, block.timestamp); vault[tokenId] = Stake({ owner: _msgSender(), tokenId: uint24(tokenId), timestamp: uint48(block.timestamp) }); userTokensStaked[_msgSender()].push(tokenId); tokenIdToIndex[tokenId] = userTokensStaked[_msgSender()].length - 1; } return true; } function claim(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claimForAddress(address account, uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function unstake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } // internal function _claim( address account, uint256[] calldata tokenIds, bool _unstake ) internal returns (bool) { } function _unstakeMany(address account, uint256[] memory tokenIds) internal { } /** * Get total rewards, unclaimable and claimable by the user */ function earningInfo(address account, uint256[] calldata tokenIds) external view returns (uint256, uint256) { } // users' staked NFT count function balanceOf(address account) public view returns (uint256) { } // should return the tokenIds stored by the user function tokensOfOwner(address account) public view returns (uint256[] memory ownerTokens) { } /** * @param amount should be in like 7 ether/7 * 10**18 */ function setRewardAmount(uint256 amount) public onlyOwner { } function setSessionsWallet(address _newSessions) public onlyOwner { } /** * unstake all account tokens in case of emergency paused */ function emergencyUnstake(address account) public whenPaused { } function withdrawContractRewardTokens() public onlyOwner whenPaused returns (bool) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } }
nft.ownerOf(tokenId)==_msgSender(),"not your token"
170,803
nft.ownerOf(tokenId)==_msgSender()
"already staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract SteezyStake is Ownable, ReentrancyGuard, Pausable, IERC721Receiver { // struct to store a stake's token, owner, and earning values struct Stake { uint24 tokenId; uint48 timestamp; address owner; } uint256 public totalStaked; uint256 public lockPeriod = 30; // 30 days until claimable uint256 private rewardAmount = 7 ether; // 7 tokens per day // Steezy NFT Contract address ERC721Enumerable nft; // Smoke Token address as reward token IERC20 token; address private sessionWallet; // maps' tokenId to stake mapping(uint256 => Stake) public vault; mapping(address => uint256[]) private userTokensStaked; // staked token ids to their userstake indexes mapping(uint256 => uint256) private tokenIdToIndex; event NFTStaked(address owner, uint256 tokenId, uint256 value); event NFTUnstaked(address owner, uint256 tokenId, uint256 value); event Claimed(address owner, uint256 amount); constructor(address nftAddress, address rewardTokenAddress, address _sessions) { } receive() external payable {} fallback() external payable {} function pause() public onlyOwner { } function unpause() public onlyOwner { } function stake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { uint256 tokenId; totalStaked += tokenIds.length; for (uint256 i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; require(nft.ownerOf(tokenId) == _msgSender(), "not your token"); require(<FILL_ME>) nft.transferFrom(_msgSender(), address(this), tokenId); emit NFTStaked(_msgSender(), tokenId, block.timestamp); vault[tokenId] = Stake({ owner: _msgSender(), tokenId: uint24(tokenId), timestamp: uint48(block.timestamp) }); userTokensStaked[_msgSender()].push(tokenId); tokenIdToIndex[tokenId] = userTokensStaked[_msgSender()].length - 1; } return true; } function claim(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claimForAddress(address account, uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function unstake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } // internal function _claim( address account, uint256[] calldata tokenIds, bool _unstake ) internal returns (bool) { } function _unstakeMany(address account, uint256[] memory tokenIds) internal { } /** * Get total rewards, unclaimable and claimable by the user */ function earningInfo(address account, uint256[] calldata tokenIds) external view returns (uint256, uint256) { } // users' staked NFT count function balanceOf(address account) public view returns (uint256) { } // should return the tokenIds stored by the user function tokensOfOwner(address account) public view returns (uint256[] memory ownerTokens) { } /** * @param amount should be in like 7 ether/7 * 10**18 */ function setRewardAmount(uint256 amount) public onlyOwner { } function setSessionsWallet(address _newSessions) public onlyOwner { } /** * unstake all account tokens in case of emergency paused */ function emergencyUnstake(address account) public whenPaused { } function withdrawContractRewardTokens() public onlyOwner whenPaused returns (bool) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } }
vault[tokenId].tokenId==0,"already staked"
170,803
vault[tokenId].tokenId==0
"Insuficient contract tokens for claim"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract SteezyStake is Ownable, ReentrancyGuard, Pausable, IERC721Receiver { // struct to store a stake's token, owner, and earning values struct Stake { uint24 tokenId; uint48 timestamp; address owner; } uint256 public totalStaked; uint256 public lockPeriod = 30; // 30 days until claimable uint256 private rewardAmount = 7 ether; // 7 tokens per day // Steezy NFT Contract address ERC721Enumerable nft; // Smoke Token address as reward token IERC20 token; address private sessionWallet; // maps' tokenId to stake mapping(uint256 => Stake) public vault; mapping(address => uint256[]) private userTokensStaked; // staked token ids to their userstake indexes mapping(uint256 => uint256) private tokenIdToIndex; event NFTStaked(address owner, uint256 tokenId, uint256 value); event NFTUnstaked(address owner, uint256 tokenId, uint256 value); event Claimed(address owner, uint256 amount); constructor(address nftAddress, address rewardTokenAddress, address _sessions) { } receive() external payable {} fallback() external payable {} function pause() public onlyOwner { } function unpause() public onlyOwner { } function stake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claim(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claimForAddress(address account, uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function unstake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } // internal function _claim( address account, uint256[] calldata tokenIds, bool _unstake ) internal returns (bool) { uint256 tokenId; uint256 lapsedDays; uint256 unclaimableReward = 0; uint256 claimableReward = 0; for (uint256 i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; Stake memory staked = vault[tokenId]; require(staked.owner == account, "not an owner"); lapsedDays = (block.timestamp - staked.timestamp) / 86400; //1 day == 24 hours = 86400 seconds // Can't claim until lockPeriod(30) days if (lapsedDays > lockPeriod) { vault[tokenId] = Stake({ owner: account, tokenId: uint24(tokenId), timestamp: uint48(block.timestamp) }); claimableReward += rewardAmount * lapsedDays; } else { unclaimableReward += rewardAmount * lapsedDays; // 1 ether == 1e18 } } if (claimableReward > 0) { require(<FILL_ME>) bool result = token.transfer(account, claimableReward); require(result, "Claim unsuccessful, insufficient amount"); emit Claimed(account, claimableReward); } //penalty on early unstake 100% unclaimed rewards if (_unstake) { //to session 33.4% Of Unclaimed Rewards & keep 66.6% Of Unclaimed Rewards in the pool if (unclaimableReward > 0) { uint256 toBurnAmount = (unclaimableReward * 334) / (1000); // divide by 1000 to cover .4% as well require( token.balanceOf(address(this)) > toBurnAmount, "Insuficient contract tokens for burn" ); token.transfer(sessionWallet, toBurnAmount); } _unstakeMany(account, tokenIds); } return true; } function _unstakeMany(address account, uint256[] memory tokenIds) internal { } /** * Get total rewards, unclaimable and claimable by the user */ function earningInfo(address account, uint256[] calldata tokenIds) external view returns (uint256, uint256) { } // users' staked NFT count function balanceOf(address account) public view returns (uint256) { } // should return the tokenIds stored by the user function tokensOfOwner(address account) public view returns (uint256[] memory ownerTokens) { } /** * @param amount should be in like 7 ether/7 * 10**18 */ function setRewardAmount(uint256 amount) public onlyOwner { } function setSessionsWallet(address _newSessions) public onlyOwner { } /** * unstake all account tokens in case of emergency paused */ function emergencyUnstake(address account) public whenPaused { } function withdrawContractRewardTokens() public onlyOwner whenPaused returns (bool) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } }
token.balanceOf(address(this))>claimableReward,"Insuficient contract tokens for claim"
170,803
token.balanceOf(address(this))>claimableReward
"Insuficient contract tokens for burn"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract SteezyStake is Ownable, ReentrancyGuard, Pausable, IERC721Receiver { // struct to store a stake's token, owner, and earning values struct Stake { uint24 tokenId; uint48 timestamp; address owner; } uint256 public totalStaked; uint256 public lockPeriod = 30; // 30 days until claimable uint256 private rewardAmount = 7 ether; // 7 tokens per day // Steezy NFT Contract address ERC721Enumerable nft; // Smoke Token address as reward token IERC20 token; address private sessionWallet; // maps' tokenId to stake mapping(uint256 => Stake) public vault; mapping(address => uint256[]) private userTokensStaked; // staked token ids to their userstake indexes mapping(uint256 => uint256) private tokenIdToIndex; event NFTStaked(address owner, uint256 tokenId, uint256 value); event NFTUnstaked(address owner, uint256 tokenId, uint256 value); event Claimed(address owner, uint256 amount); constructor(address nftAddress, address rewardTokenAddress, address _sessions) { } receive() external payable {} fallback() external payable {} function pause() public onlyOwner { } function unpause() public onlyOwner { } function stake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claim(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function claimForAddress(address account, uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } function unstake(uint256[] calldata tokenIds) external nonReentrant whenNotPaused returns (bool) { } // internal function _claim( address account, uint256[] calldata tokenIds, bool _unstake ) internal returns (bool) { uint256 tokenId; uint256 lapsedDays; uint256 unclaimableReward = 0; uint256 claimableReward = 0; for (uint256 i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; Stake memory staked = vault[tokenId]; require(staked.owner == account, "not an owner"); lapsedDays = (block.timestamp - staked.timestamp) / 86400; //1 day == 24 hours = 86400 seconds // Can't claim until lockPeriod(30) days if (lapsedDays > lockPeriod) { vault[tokenId] = Stake({ owner: account, tokenId: uint24(tokenId), timestamp: uint48(block.timestamp) }); claimableReward += rewardAmount * lapsedDays; } else { unclaimableReward += rewardAmount * lapsedDays; // 1 ether == 1e18 } } if (claimableReward > 0) { require( token.balanceOf(address(this)) > claimableReward, "Insuficient contract tokens for claim" ); bool result = token.transfer(account, claimableReward); require(result, "Claim unsuccessful, insufficient amount"); emit Claimed(account, claimableReward); } //penalty on early unstake 100% unclaimed rewards if (_unstake) { //to session 33.4% Of Unclaimed Rewards & keep 66.6% Of Unclaimed Rewards in the pool if (unclaimableReward > 0) { uint256 toBurnAmount = (unclaimableReward * 334) / (1000); // divide by 1000 to cover .4% as well require(<FILL_ME>) token.transfer(sessionWallet, toBurnAmount); } _unstakeMany(account, tokenIds); } return true; } function _unstakeMany(address account, uint256[] memory tokenIds) internal { } /** * Get total rewards, unclaimable and claimable by the user */ function earningInfo(address account, uint256[] calldata tokenIds) external view returns (uint256, uint256) { } // users' staked NFT count function balanceOf(address account) public view returns (uint256) { } // should return the tokenIds stored by the user function tokensOfOwner(address account) public view returns (uint256[] memory ownerTokens) { } /** * @param amount should be in like 7 ether/7 * 10**18 */ function setRewardAmount(uint256 amount) public onlyOwner { } function setSessionsWallet(address _newSessions) public onlyOwner { } /** * unstake all account tokens in case of emergency paused */ function emergencyUnstake(address account) public whenPaused { } function withdrawContractRewardTokens() public onlyOwner whenPaused returns (bool) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } }
token.balanceOf(address(this))>toBurnAmount,"Insuficient contract tokens for burn"
170,803
token.balanceOf(address(this))>toBurnAmount
"ERC20: total tax cannot exceed 12%"
/* ____ _.' : `._ .-.'`. ; .'`.-. __ / : ___\ ; /___ ; \ __ ,'_ ""--.:__;".-.";: :".-.":__;.--"" _`, :' `.t""--.. '<@.`;_ ',@>` ..--""j.' `; `:-.._J '-.-'L__ `-- ' L_..-;' "-.__ ; .-" "-. : __.-" L ' /.------.\ ' J "-. "--" .-" __.l"-:_JL_;-";.__ .-j/'.; ;"""" / .'\"-. .' /:`. "-.: .-" .'; `. .-" / ; "-. "-..-" .-" : "-. .+"-. : : "-.__.-" ;-._ \ ; \ `.; ; : : "+. ; : ; ; ; : ; : \: : `."-; ; ; : ; ,/; ; -: ; : ; : .-"' : :\ \ : ; : \.-" : ;`. \ ; : ;.'_..-- / ; : "-. "-: ; :/." .' : \ .-`.\ /t-"" ":-+. : `. .-" `l __/ /`. : ; ; \ ; \ .-" .-"-.-" .' .'j \ / ;/ \ / .-" /. .'.' ;_:' ; :-""-.`./-.' / `.___.' \ `t ._ / "-.t-._:'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.5; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface ERC20 { 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 Ownable { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { 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 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; } contract YodaAI is ERC20, Ownable { using SafeMath for uint256; address routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Yoda AI"; string constant _symbol = "YODA"; uint8 constant _decimals = 9; uint256 _totalSupply = 100000000 * (10 ** _decimals); uint256 public _maxWalletAmount = 1500000 * (10 ** _decimals); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 liquidityFee = 35; uint256 marketingFee = 60; uint256 totalFee = liquidityFee + marketingFee; uint256 feeDenominator = 100; address internal marketingFeeReceiver = 0x9C5BFAC63eF240D790eD1a50b5275653BB2C90A9; IDEXRouter public router; address public pair; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 1000 * 2; // 0.5% bool inSwap; modifier swapping() { } constructor () Ownable(msg.sender) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure 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 approveMax(address spender) external 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 _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function shouldTakeFee(address sender) internal view returns (bool) { } function takeFee(address sender, uint256 amount) internal returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function swapBack() internal swapping { } function Launch() external onlyOwner { } function setFee(uint256 _liquidityFee, uint256 _marketingFee) external onlyOwner { require(<FILL_ME>) liquidityFee = _liquidityFee; marketingFee = _marketingFee; totalFee = liquidityFee + marketingFee; } event AutoLiquify(uint256 amountETH, uint256 amountBOG); }
(_liquidityFee+_marketingFee)<=12,"ERC20: total tax cannot exceed 12%"
170,831
(_liquidityFee+_marketingFee)<=12
"!connector"
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity 0.8.15; import {ProposedOwnable} from "../shared/ProposedOwnable.sol"; import {IRootManager} from "./interfaces/IRootManager.sol"; import {IHubConnector} from "./interfaces/IHubConnector.sol"; import {Message} from "./libraries/Message.sol"; import {QueueLib} from "./libraries/Queue.sol"; import {DomainIndexer} from "./libraries/DomainIndexer.sol"; import {MerkleTreeManager} from "./Merkle.sol"; import {WatcherClient} from "./WatcherClient.sol"; /** * @notice This contract exists at cluster hubs, and aggregates all transfer roots from messaging * spokes into a single merkle root */ contract RootManager is ProposedOwnable, IRootManager, WatcherClient, DomainIndexer { // ============ Libraries ============ using QueueLib for QueueLib.Queue; // ============ Events ============ event DelayBlocksUpdated(uint256 previous, uint256 updated); event RootAggregated(uint32 domain, bytes32 receivedRoot, uint256 queueIndex); event RootPropagated(bytes32 aggregateRoot, uint256 count, uint32[] domains, bytes32[] aggregatedMessageRoots); event ConnectorAdded(uint32 domain, address connector, uint32[] domains, address[] connectors); event ConnectorRemoved(uint32 domain, address connector, uint32[] domains, address[] connectors, address caller); // ============ Properties ============ /** * @notice Number of blocks to delay the processing of a message to allow for watchers to verify * the validity and pause if necessary. */ uint256 public delayBlocks; /** * @notice Queue used for management of verification for inbound roots from spoke chains. Once * the verification period elapses, the inbound messages can be aggregated into the merkle tree * for propagation to spoke chains. * @dev Watchers should be able to watch this queue for fraudulent messages and pause this contract * if fraud is detected. */ QueueLib.Queue public pendingInboundRoots; /** * @notice MerkleTreeManager contract instance. Will hold the active tree of aggregated inbound roots. * The root of this tree will be distributed crosschain to all spoke domains. */ MerkleTreeManager public immutable MERKLE; // ============ Modifiers ============ modifier onlyConnector(uint32 _domain) { require(<FILL_ME>) _; } // ============ Constructor ============ /** * @notice Creates a new RootManager instance. * @param _delayBlocks The delay for the validation period for incoming messages in blocks. * @param _merkle The address of the MerkleTreeManager on this domain. * @param _watcherManager The address of the WatcherManager on this domain. */ constructor( uint256 _delayBlocks, address _merkle, address _watcherManager ) ProposedOwnable() WatcherClient(_watcherManager) { } // ================ Getters ================ function getPendingInboundRootsCount() public view returns (uint256) { } // ============ Admin Functions ============ /** * @notice Set the `delayBlocks`, the period in blocks over which an incoming message * is verified. */ function setDelayBlocks(uint256 _delayBlocks) public onlyOwner { } /** * @notice Add a new supported domain and corresponding hub connector to the system. This new domain * will receive the propagated aggregate root. * @dev Only owner can add a new connector. Address should be the connector on L1. * @dev Cannot add address(0) to avoid duplicated domain in array and reduce gas fee while propagating. * * @param _domain The target spoke domain of the given connector. * @param _connector Address of the hub connector. */ function addConnector(uint32 _domain, address _connector) external onlyOwner { } /** * @notice Remove support for a connector and respective domain. That connector/domain will no longer * receive updates for the latest aggregate root. * @dev Only watcher can remove a connector. * TODO: Could add a metatx-able `removeConnectorWithSig` if we want to use relayers? * * @param _domain The spoke domain of the target connector we want to remove. */ function removeConnector(uint32 _domain) public onlyWatcher { } // ============ Public Functions ============ /** * @notice This is called by relayers to take the current aggregate tree root and propagate it to all * spoke domains (via their respective hub connectors). * @dev Should be called by relayers at a regular interval. * * @param _domains Array of domains: should match exactly the array of `domains` in storage; used here * to reduce gas costs, and keep them static regardless of number of supported domains. * @param _connectors Array of connectors: should match exactly the array of `connectors` in storage * (see `_domains` param's info on reducing gas costs). */ function propagate(uint32[] calldata _domains, address[] calldata _connectors) external whenNotPaused { } /** * @notice Accept an inbound root coming from a given domain's hub connector, enqueuing this incoming * root into the current queue as it awaits the verification period. * @dev The aggregate tree's root, which will include this inbound root, will be propagated to all spoke * domains (via `propagate`) on a regular basis assuming the verification period is surpassed without * dispute. * * @param _domain The source domain of the given root. * @param _inbound The inbound root coming from the given domain. */ function aggregate(uint32 _domain, bytes32 _inbound) external whenNotPaused onlyConnector(_domain) { } }
getConnectorForDomain(_domain)==msg.sender,"!connector"
170,854
getConnectorForDomain(_domain)==msg.sender
'TokenGeyser: transfer into staking pool failed'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { require(amount > 0, 'TokenGeyser: stake amount is zero'); require(beneficiary != address(0), 'TokenGeyser: beneficiary is zero address'); require(totalStakingShares == 0 || totalStaked() > 0, 'TokenGeyser: Invalid state. Staking shares exist, but no staking tokens do'); uint256 mintedStakingShares = (totalStakingShares > 0) ? totalStakingShares.mul(amount).div(totalStaked()) : amount.mul(_initialSharesPerToken); require(mintedStakingShares > 0, 'TokenGeyser: Stake amount is too small'); updateAccounting(); // 1. User Accounting UserTotals storage totals = _userTotals[beneficiary]; totals.stakingShares = totals.stakingShares.add(mintedStakingShares); totals.lastAccountingTimestampSec = now; Stake memory newStake = Stake(mintedStakingShares, now); _userStakes[beneficiary].push(newStake); // 2. Global Accounting totalStakingShares = totalStakingShares.add(mintedStakingShares); // Already set in updateAccounting() // _lastAccountingTimestampSec = now; // interactions require(<FILL_ME>) emit Staked(beneficiary, amount, totalStakedFor(beneficiary), ''); } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
_stakingPool.token().transferFrom(staker,address(_stakingPool),amount),'TokenGeyser: transfer into staking pool failed'
170,858
_stakingPool.token().transferFrom(staker,address(_stakingPool),amount)
'TokenGeyser: unstake amount is greater than total user stakes'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { updateAccounting(); // checks require(amount > 0, 'TokenGeyser: unstake amount is zero'); require(<FILL_ME>) uint256 stakingSharesToBurn = totalStakingShares.mul(amount).div(totalStaked()); require(stakingSharesToBurn > 0, 'TokenGeyser: Unable to unstake amount this small'); // 1. User Accounting UserTotals storage totals = _userTotals[msg.sender]; Stake[] storage accountStakes = _userStakes[msg.sender]; // Redeem from most recent stake and go backwards in time. uint256 stakingShareSecondsToBurn = 0; uint256 sharesLeftToBurn = stakingSharesToBurn; uint256 rewardAmount = 0; while (sharesLeftToBurn > 0) { Stake storage lastStake = accountStakes[accountStakes.length - 1]; uint256 stakeTimeSec = now.sub(lastStake.timestampSec); uint256 newStakingShareSecondsToBurn = 0; if (lastStake.stakingShares <= sharesLeftToBurn) { // fully redeem a past stake newStakingShareSecondsToBurn = lastStake.stakingShares.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); sharesLeftToBurn = sharesLeftToBurn.sub(lastStake.stakingShares); accountStakes.length--; } else { // partially redeem a past stake newStakingShareSecondsToBurn = sharesLeftToBurn.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); lastStake.stakingShares = lastStake.stakingShares.sub(sharesLeftToBurn); sharesLeftToBurn = 0; } } totals.stakingShareSeconds = totals.stakingShareSeconds.sub(stakingShareSecondsToBurn); totals.stakingShares = totals.stakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // totals.lastAccountingTimestampSec = now; // 2. Global Accounting _totalStakingShareSeconds = _totalStakingShareSeconds.sub(stakingShareSecondsToBurn); totalStakingShares = totalStakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // _lastAccountingTimestampSec = now; // interactions require(_stakingPool.transfer(msg.sender, amount), 'TokenGeyser: transfer out of staking pool failed'); require(_unlockedPool.transfer(msg.sender, rewardAmount), 'TokenGeyser: transfer out of unlocked pool failed'); emit Unstaked(msg.sender, amount, totalStakedFor(msg.sender), ''); emit TokensClaimed(msg.sender, rewardAmount); require(totalStakingShares == 0 || totalStaked() > 0, 'TokenGeyser: Error unstaking. Staking shares exist, but no staking tokens do'); return rewardAmount; } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
totalStakedFor(msg.sender)>=amount,'TokenGeyser: unstake amount is greater than total user stakes'
170,858
totalStakedFor(msg.sender)>=amount
'TokenGeyser: transfer out of staking pool failed'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { updateAccounting(); // checks require(amount > 0, 'TokenGeyser: unstake amount is zero'); require(totalStakedFor(msg.sender) >= amount, 'TokenGeyser: unstake amount is greater than total user stakes'); uint256 stakingSharesToBurn = totalStakingShares.mul(amount).div(totalStaked()); require(stakingSharesToBurn > 0, 'TokenGeyser: Unable to unstake amount this small'); // 1. User Accounting UserTotals storage totals = _userTotals[msg.sender]; Stake[] storage accountStakes = _userStakes[msg.sender]; // Redeem from most recent stake and go backwards in time. uint256 stakingShareSecondsToBurn = 0; uint256 sharesLeftToBurn = stakingSharesToBurn; uint256 rewardAmount = 0; while (sharesLeftToBurn > 0) { Stake storage lastStake = accountStakes[accountStakes.length - 1]; uint256 stakeTimeSec = now.sub(lastStake.timestampSec); uint256 newStakingShareSecondsToBurn = 0; if (lastStake.stakingShares <= sharesLeftToBurn) { // fully redeem a past stake newStakingShareSecondsToBurn = lastStake.stakingShares.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); sharesLeftToBurn = sharesLeftToBurn.sub(lastStake.stakingShares); accountStakes.length--; } else { // partially redeem a past stake newStakingShareSecondsToBurn = sharesLeftToBurn.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); lastStake.stakingShares = lastStake.stakingShares.sub(sharesLeftToBurn); sharesLeftToBurn = 0; } } totals.stakingShareSeconds = totals.stakingShareSeconds.sub(stakingShareSecondsToBurn); totals.stakingShares = totals.stakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // totals.lastAccountingTimestampSec = now; // 2. Global Accounting _totalStakingShareSeconds = _totalStakingShareSeconds.sub(stakingShareSecondsToBurn); totalStakingShares = totalStakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // _lastAccountingTimestampSec = now; // interactions require(<FILL_ME>) require(_unlockedPool.transfer(msg.sender, rewardAmount), 'TokenGeyser: transfer out of unlocked pool failed'); emit Unstaked(msg.sender, amount, totalStakedFor(msg.sender), ''); emit TokensClaimed(msg.sender, rewardAmount); require(totalStakingShares == 0 || totalStaked() > 0, 'TokenGeyser: Error unstaking. Staking shares exist, but no staking tokens do'); return rewardAmount; } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
_stakingPool.transfer(msg.sender,amount),'TokenGeyser: transfer out of staking pool failed'
170,858
_stakingPool.transfer(msg.sender,amount)
'TokenGeyser: transfer out of unlocked pool failed'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { updateAccounting(); // checks require(amount > 0, 'TokenGeyser: unstake amount is zero'); require(totalStakedFor(msg.sender) >= amount, 'TokenGeyser: unstake amount is greater than total user stakes'); uint256 stakingSharesToBurn = totalStakingShares.mul(amount).div(totalStaked()); require(stakingSharesToBurn > 0, 'TokenGeyser: Unable to unstake amount this small'); // 1. User Accounting UserTotals storage totals = _userTotals[msg.sender]; Stake[] storage accountStakes = _userStakes[msg.sender]; // Redeem from most recent stake and go backwards in time. uint256 stakingShareSecondsToBurn = 0; uint256 sharesLeftToBurn = stakingSharesToBurn; uint256 rewardAmount = 0; while (sharesLeftToBurn > 0) { Stake storage lastStake = accountStakes[accountStakes.length - 1]; uint256 stakeTimeSec = now.sub(lastStake.timestampSec); uint256 newStakingShareSecondsToBurn = 0; if (lastStake.stakingShares <= sharesLeftToBurn) { // fully redeem a past stake newStakingShareSecondsToBurn = lastStake.stakingShares.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); sharesLeftToBurn = sharesLeftToBurn.sub(lastStake.stakingShares); accountStakes.length--; } else { // partially redeem a past stake newStakingShareSecondsToBurn = sharesLeftToBurn.mul(stakeTimeSec); rewardAmount = computeNewReward(rewardAmount, newStakingShareSecondsToBurn, stakeTimeSec); stakingShareSecondsToBurn = stakingShareSecondsToBurn.add(newStakingShareSecondsToBurn); lastStake.stakingShares = lastStake.stakingShares.sub(sharesLeftToBurn); sharesLeftToBurn = 0; } } totals.stakingShareSeconds = totals.stakingShareSeconds.sub(stakingShareSecondsToBurn); totals.stakingShares = totals.stakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // totals.lastAccountingTimestampSec = now; // 2. Global Accounting _totalStakingShareSeconds = _totalStakingShareSeconds.sub(stakingShareSecondsToBurn); totalStakingShares = totalStakingShares.sub(stakingSharesToBurn); // Already set in updateAccounting // _lastAccountingTimestampSec = now; // interactions require(_stakingPool.transfer(msg.sender, amount), 'TokenGeyser: transfer out of staking pool failed'); require(<FILL_ME>) emit Unstaked(msg.sender, amount, totalStakedFor(msg.sender), ''); emit TokensClaimed(msg.sender, rewardAmount); require(totalStakingShares == 0 || totalStaked() > 0, 'TokenGeyser: Error unstaking. Staking shares exist, but no staking tokens do'); return rewardAmount; } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
_unlockedPool.transfer(msg.sender,rewardAmount),'TokenGeyser: transfer out of unlocked pool failed'
170,858
_unlockedPool.transfer(msg.sender,rewardAmount)
'TokenGeyser: transfer into locked pool failed'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { require(unlockSchedules.length < _maxUnlockSchedules, 'TokenGeyser: reached maximum unlock schedules'); // Update lockedTokens amount before using it in computations after. updateAccounting(); uint256 lockedTokens = totalLocked(); uint256 mintedLockedShares = (lockedTokens > 0) ? totalLockedShares.mul(amount).div(lockedTokens) : amount.mul(_initialSharesPerToken); UnlockSchedule memory schedule; schedule.initialLockedShares = mintedLockedShares; schedule.lastUnlockTimestampSec = now; schedule.endAtSec = now.add(durationSec); schedule.durationSec = durationSec; unlockSchedules.push(schedule); totalLockedShares = totalLockedShares.add(mintedLockedShares); require(<FILL_ME>) emit TokensLocked(amount, durationSec, totalLocked()); } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
_lockedPool.token().transferFrom(msg.sender,address(_lockedPool),amount),'TokenGeyser: transfer into locked pool failed'
170,858
_lockedPool.token().transferFrom(msg.sender,address(_lockedPool),amount)
'TokenGeyser: transfer out of locked pool failed'
/** * @title Token Geyser * @dev A smart-contract based mechanism to distribute tokens over time, inspired loosely by * Compound and Uniswap. * * Distribution tokens are added to a locked pool in the contract and become unlocked over time * according to a once-configurable unlock schedule. Once unlocked, they are available to be * claimed by users. * * A user may deposit tokens to accrue ownership share over the unlocked pool. This owner share * is a function of the number of tokens deposited as well as the length of time deposited. * Specifically, a user's share of the currently-unlocked pool equals their 'deposit-seconds' * divided by the global 'deposit-seconds'. This aligns the new token distribution with long * term supporters of the project, addressing one of the major drawbacks of simple airdrops. * * More background and motivation available at: * https://github.com/ampleforth/RFCs/blob/master/RFCs/rfc-1.md */ contract TokenGeyser is IStaking, Ownable { using SafeMath for uint256; event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); event TokensClaimed(address indexed user, uint256 amount); event TokensLocked(uint256 amount, uint256 durationSec, uint256 total); // amount: Unlocked tokens, total: Total locked tokens event TokensUnlocked(uint256 amount, uint256 total); TokenPool private _stakingPool; TokenPool private _unlockedPool; TokenPool private _lockedPool; // // Time-bonus params // uint256 public constant BONUS_DECIMALS = 2; uint256 public startBonus = 0; uint256 public bonusPeriodSec = 0; // // Global accounting state // uint256 public totalLockedShares = 0; uint256 public totalStakingShares = 0; uint256 private _totalStakingShareSeconds = 0; uint256 private _lastAccountingTimestampSec = now; uint256 private _maxUnlockSchedules = 0; uint256 private _initialSharesPerToken = 0; // // User accounting state // // Represents a single stake for a user. A user may have multiple. struct Stake { uint256 stakingShares; uint256 timestampSec; } // Caches aggregated values from the User->Stake[] map to save computation. // If lastAccountingTimestampSec is 0, there's no entry for that user. struct UserTotals { uint256 stakingShares; uint256 stakingShareSeconds; uint256 lastAccountingTimestampSec; } // Aggregated staking values per user mapping(address => UserTotals) private _userTotals; // The collection of stakes for each user. Ordered by timestamp, earliest to latest. mapping(address => Stake[]) private _userStakes; // // Locked/Unlocked Accounting state // struct UnlockSchedule { uint256 initialLockedShares; uint256 unlockedShares; uint256 lastUnlockTimestampSec; uint256 endAtSec; uint256 durationSec; } UnlockSchedule[] public unlockSchedules; /** * @param stakingToken The token users deposit as stake. * @param distributionToken The token users receive as they unstake. * @param maxUnlockSchedules Max number of unlock stages, to guard against hitting gas limit. * @param startBonus_ Starting time bonus, BONUS_DECIMALS fixed point. * e.g. 25% means user gets 25% of max distribution tokens. * @param bonusPeriodSec_ Length of time for bonus to increase linearly to max. * @param initialSharesPerToken Number of shares to mint per staking token on first stake. */ constructor(IERC20 stakingToken, IERC20 distributionToken, uint256 maxUnlockSchedules, uint256 startBonus_, uint256 bonusPeriodSec_, uint256 initialSharesPerToken) public { } /** * @return The token users deposit as stake. */ function getStakingToken() public view returns (IERC20) { } /** * @return The token users receive as they unstake. */ function getDistributionToken() public view returns (IERC20) { } /** * @dev Transfers amount of deposit tokens from the user. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stake(uint256 amount, bytes calldata data) external { } /** * @dev Transfers amount of deposit tokens from the caller on behalf of user. * @param user User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. * @param data Not used. */ function stakeFor(address user, uint256 amount, bytes calldata data) external onlyOwner { } /** * @dev Private implementation of staking methods. * @param staker User address who deposits tokens to stake. * @param beneficiary User address who gains credit for this stake operation. * @param amount Number of deposit tokens to stake. */ function _stakeFor(address staker, address beneficiary, uint256 amount) private { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @param data Not used. */ function unstake(uint256 amount, bytes calldata data) external { } /** * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens that would be rewarded. */ function unstakeQuery(uint256 amount) public returns (uint256) { } /** * @dev Unstakes a certain amount of previously deposited tokens. User also receives their * alotted number of distribution tokens. * @param amount Number of deposit tokens to unstake / withdraw. * @return The total number of distribution tokens rewarded. */ function _unstake(uint256 amount) private returns (uint256) { } /** * @dev Applies an additional time-bonus to a distribution amount. This is necessary to * encourage long-term deposits instead of constant unstake/restakes. * The bonus-multiplier is the result of a linear function that starts at startBonus and * ends at 100% over bonusPeriodSec, then stays at 100% thereafter. * @param currentRewardTokens The current number of distribution tokens already alotted for this * unstake op. Any bonuses are already applied. * @param stakingShareSeconds The stakingShare-seconds that are being burned for new * distribution tokens. * @param stakeTimeSec Length of time for which the tokens were staked. Needed to calculate * the time-bonus. * @return Updated amount of distribution tokens to award, with any bonus included on the * newly added tokens. */ function computeNewReward(uint256 currentRewardTokens, uint256 stakingShareSeconds, uint256 stakeTimeSec) private view returns (uint256) { } /** * @param addr The user to look up staking information for. * @return The number of staking tokens deposited for addr. */ function totalStakedFor(address addr) public view returns (uint256) { } /** * @return The total number of deposit tokens staked globally, by all users. */ function totalStaked() public view returns (uint256) { } /** * @dev Note that this application has a staking token as well as a distribution token, which * may be different. This function is required by EIP-900. * @return The deposit token used for staking. */ function token() external view returns (address) { } /** * @dev A globally callable function to update the accounting state of the system. * Global state and state for the caller are updated. * @return [0] balance of the locked pool * @return [1] balance of the unlocked pool * @return [2] caller's staking share seconds * @return [3] global staking share seconds * @return [4] Rewards caller has accumulated, optimistically assumes max time-bonus. * @return [5] block timestamp */ function updateAccounting() public returns ( uint256, uint256, uint256, uint256, uint256, uint256) { } /** * @return Total number of locked distribution tokens. */ function totalLocked() public view returns (uint256) { } /** * @return Total number of unlocked distribution tokens. */ function totalUnlocked() public view returns (uint256) { } /** * @return Number of unlock schedules. */ function unlockScheduleCount() public view returns (uint256) { } /** * @dev This funcion allows the contract owner to add more locked distribution tokens, along * with the associated 'unlock schedule'. These locked tokens immediately begin unlocking * linearly over the duraction of durationSec timeframe. * @param amount Number of distribution tokens to lock. These are transferred from the caller. * @param durationSec Length of time to linear unlock the tokens. */ function lockTokens(uint256 amount, uint256 durationSec) external onlyOwner { } /** * @dev Moves distribution tokens from the locked pool to the unlocked pool, according to the * previously defined unlock schedules. Publicly callable. * @return Number of newly unlocked distribution tokens. */ function unlockTokens() public returns (uint256) { uint256 unlockedTokens = 0; uint256 lockedTokens = totalLocked(); if (totalLockedShares == 0) { unlockedTokens = lockedTokens; } else { uint256 unlockedShares = 0; for (uint256 s = 0; s < unlockSchedules.length; s++) { unlockedShares = unlockedShares.add(unlockScheduleShares(s)); } unlockedTokens = unlockedShares.mul(lockedTokens).div(totalLockedShares); totalLockedShares = totalLockedShares.sub(unlockedShares); } if (unlockedTokens > 0) { require(<FILL_ME>) emit TokensUnlocked(unlockedTokens, totalLocked()); } return unlockedTokens; } /** * @dev Returns the number of unlockable shares from a given schedule. The returned value * depends on the time since the last unlock. This function updates schedule accounting, * but does not actually transfer any tokens. * @param s Index of the unlock schedule. * @return The number of unlocked shares. */ function unlockScheduleShares(uint256 s) private returns (uint256) { } /** * @dev Lets the owner rescue funds air-dropped to the staking pool. * @param tokenToRescue Address of the token to be rescued. * @param to Address to which the rescued funds are to be sent. * @param amount Amount of tokens to be rescued. * @return Transfer success. */ function rescueFundsFromStakingPool(address tokenToRescue, address to, uint256 amount) public onlyOwner returns (bool) { } }
_lockedPool.transfer(address(_unlockedPool),unlockedTokens),'TokenGeyser: transfer out of locked pool failed'
170,858
_lockedPool.transfer(address(_unlockedPool),unlockedTokens)