comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Resource already exists"
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol"; /** * @title Controller * @author Set Protocol * * Contract that houses state for approvals and system contracts such as added Sets, * modules, factories, resources (like price oracles), and protocol fee configurations. */ contract Controller is Ownable { using AddressArrayUtils for address[]; /* ============ Events ============ */ event FactoryAdded(address indexed _factory); event FactoryRemoved(address indexed _factory); event FeeEdited(address indexed _module, uint256 indexed _feeType, uint256 _feePercentage); event FeeRecipientChanged(address _newFeeRecipient); event ModuleAdded(address indexed _module); event ModuleRemoved(address indexed _module); event ResourceAdded(address indexed _resource, uint256 _id); event ResourceRemoved(address indexed _resource, uint256 _id); event SetAdded(address indexed _setToken, address indexed _factory); event SetRemoved(address indexed _setToken); /* ============ Modifiers ============ */ /** * Throws if function is called by any address other than a valid factory. */ modifier onlyFactory() { } modifier onlyInitialized() { } /* ============ State Variables ============ */ // List of enabled Sets address[] public sets; // List of enabled factories of SetTokens address[] public factories; // List of enabled Modules; Modules extend the functionality of SetTokens address[] public modules; // List of enabled Resources; Resources provide data, functionality, or // permissions that can be drawn upon from Module, SetTokens or factories address[] public resources; // Mappings to check whether address is valid Set, Factory, Module or Resource mapping(address => bool) public isSet; mapping(address => bool) public isFactory; mapping(address => bool) public isModule; mapping(address => bool) public isResource; // Mapping of modules to fee types to fee percentage. A module can have multiple feeTypes // Fee is denominated in precise unit percentages (100% = 1e18, 1% = 1e16) mapping(address => mapping(uint256 => uint256)) public fees; // Mapping of resource ID to resource address, which allows contracts to fetch the correct // resource while providing an ID mapping(uint256 => address) public resourceId; // Recipient of protocol fees address public feeRecipient; // Return true if the controller is initialized bool public isInitialized; /* ============ Constructor ============ */ /** * Initializes the initial fee recipient on deployment. * * @param _feeRecipient Address of the initial protocol fee recipient */ constructor(address _feeRecipient) public { } /* ============ External Functions ============ */ /** * Initializes any predeployed factories, modules, and resources post deployment. Note: This function can * only be called by the owner once to batch initialize the initial system contracts. * * @param _factories List of factories to add * @param _modules List of modules to add * @param _resources List of resources to add * @param _resourceIds List of resource IDs associated with the resources */ function initialize( address[] memory _factories, address[] memory _modules, address[] memory _resources, uint256[] memory _resourceIds ) external onlyOwner { } /** * PRIVILEGED FACTORY FUNCTION. Adds a newly deployed SetToken as an enabled SetToken. * * @param _setToken Address of the SetToken contract to add */ function addSet(address _setToken) external onlyInitialized onlyFactory { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Set * * @param _setToken Address of the SetToken contract to remove */ function removeSet(address _setToken) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a factory * * @param _factory Address of the factory contract to add */ function addFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a factory * * @param _factory Address of the factory contract to remove */ function removeFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a module * * @param _module Address of the module contract to add */ function addModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a module * * @param _module Address of the module contract to remove */ function removeModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a resource * * @param _resource Address of the resource contract to add * @param _id New ID of the resource contract */ function addResource(address _resource, uint256 _id) external onlyInitialized onlyOwner { require(<FILL_ME>) require(resourceId[_id] == address(0), "Resource ID already exists"); isResource[_resource] = true; resourceId[_id] = _resource; resources.push(_resource); emit ResourceAdded(_resource, _id); } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a resource * * @param _id ID of the resource contract to remove */ function removeResource(uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a fee to a module * * @param _module Address of the module contract to add fee to * @param _feeType Type of the fee to add in the module * @param _newFeePercentage Percentage of fee to add in the module (denominated in preciseUnits eg 1% = 1e16) */ function addFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit a fee in an existing module * * @param _module Address of the module contract to edit fee * @param _feeType Type of the fee to edit in the module * @param _newFeePercentage Percentage of fee to edit in the module (denominated in preciseUnits eg 1% = 1e16) */ function editFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient * * @param _newFeeRecipient Address of the new protocol fee recipient */ function editFeeRecipient(address _newFeeRecipient) external onlyInitialized onlyOwner { } /* ============ External Getter Functions ============ */ function getModuleFee( address _moduleAddress, uint256 _feeType ) external view returns (uint256) { } function getFactories() external view returns (address[] memory) { } function getModules() external view returns (address[] memory) { } function getResources() external view returns (address[] memory) { } function getSets() external view returns (address[] memory) { } /** * Check if a contract address is a module, Set, resource, factory or controller * * @param _contractAddress The contract address to check */ function isSystemContract(address _contractAddress) external view returns (bool) { } }
!isResource[_resource],"Resource already exists"
118,230
!isResource[_resource]
"Resource ID already exists"
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol"; /** * @title Controller * @author Set Protocol * * Contract that houses state for approvals and system contracts such as added Sets, * modules, factories, resources (like price oracles), and protocol fee configurations. */ contract Controller is Ownable { using AddressArrayUtils for address[]; /* ============ Events ============ */ event FactoryAdded(address indexed _factory); event FactoryRemoved(address indexed _factory); event FeeEdited(address indexed _module, uint256 indexed _feeType, uint256 _feePercentage); event FeeRecipientChanged(address _newFeeRecipient); event ModuleAdded(address indexed _module); event ModuleRemoved(address indexed _module); event ResourceAdded(address indexed _resource, uint256 _id); event ResourceRemoved(address indexed _resource, uint256 _id); event SetAdded(address indexed _setToken, address indexed _factory); event SetRemoved(address indexed _setToken); /* ============ Modifiers ============ */ /** * Throws if function is called by any address other than a valid factory. */ modifier onlyFactory() { } modifier onlyInitialized() { } /* ============ State Variables ============ */ // List of enabled Sets address[] public sets; // List of enabled factories of SetTokens address[] public factories; // List of enabled Modules; Modules extend the functionality of SetTokens address[] public modules; // List of enabled Resources; Resources provide data, functionality, or // permissions that can be drawn upon from Module, SetTokens or factories address[] public resources; // Mappings to check whether address is valid Set, Factory, Module or Resource mapping(address => bool) public isSet; mapping(address => bool) public isFactory; mapping(address => bool) public isModule; mapping(address => bool) public isResource; // Mapping of modules to fee types to fee percentage. A module can have multiple feeTypes // Fee is denominated in precise unit percentages (100% = 1e18, 1% = 1e16) mapping(address => mapping(uint256 => uint256)) public fees; // Mapping of resource ID to resource address, which allows contracts to fetch the correct // resource while providing an ID mapping(uint256 => address) public resourceId; // Recipient of protocol fees address public feeRecipient; // Return true if the controller is initialized bool public isInitialized; /* ============ Constructor ============ */ /** * Initializes the initial fee recipient on deployment. * * @param _feeRecipient Address of the initial protocol fee recipient */ constructor(address _feeRecipient) public { } /* ============ External Functions ============ */ /** * Initializes any predeployed factories, modules, and resources post deployment. Note: This function can * only be called by the owner once to batch initialize the initial system contracts. * * @param _factories List of factories to add * @param _modules List of modules to add * @param _resources List of resources to add * @param _resourceIds List of resource IDs associated with the resources */ function initialize( address[] memory _factories, address[] memory _modules, address[] memory _resources, uint256[] memory _resourceIds ) external onlyOwner { } /** * PRIVILEGED FACTORY FUNCTION. Adds a newly deployed SetToken as an enabled SetToken. * * @param _setToken Address of the SetToken contract to add */ function addSet(address _setToken) external onlyInitialized onlyFactory { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Set * * @param _setToken Address of the SetToken contract to remove */ function removeSet(address _setToken) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a factory * * @param _factory Address of the factory contract to add */ function addFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a factory * * @param _factory Address of the factory contract to remove */ function removeFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a module * * @param _module Address of the module contract to add */ function addModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a module * * @param _module Address of the module contract to remove */ function removeModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a resource * * @param _resource Address of the resource contract to add * @param _id New ID of the resource contract */ function addResource(address _resource, uint256 _id) external onlyInitialized onlyOwner { require(!isResource[_resource], "Resource already exists"); require(<FILL_ME>) isResource[_resource] = true; resourceId[_id] = _resource; resources.push(_resource); emit ResourceAdded(_resource, _id); } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a resource * * @param _id ID of the resource contract to remove */ function removeResource(uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a fee to a module * * @param _module Address of the module contract to add fee to * @param _feeType Type of the fee to add in the module * @param _newFeePercentage Percentage of fee to add in the module (denominated in preciseUnits eg 1% = 1e16) */ function addFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit a fee in an existing module * * @param _module Address of the module contract to edit fee * @param _feeType Type of the fee to edit in the module * @param _newFeePercentage Percentage of fee to edit in the module (denominated in preciseUnits eg 1% = 1e16) */ function editFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient * * @param _newFeeRecipient Address of the new protocol fee recipient */ function editFeeRecipient(address _newFeeRecipient) external onlyInitialized onlyOwner { } /* ============ External Getter Functions ============ */ function getModuleFee( address _moduleAddress, uint256 _feeType ) external view returns (uint256) { } function getFactories() external view returns (address[] memory) { } function getModules() external view returns (address[] memory) { } function getResources() external view returns (address[] memory) { } function getSets() external view returns (address[] memory) { } /** * Check if a contract address is a module, Set, resource, factory or controller * * @param _contractAddress The contract address to check */ function isSystemContract(address _contractAddress) external view returns (bool) { } }
resourceId[_id]==address(0),"Resource ID already exists"
118,230
resourceId[_id]==address(0)
"Fee type already exists on module"
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol"; /** * @title Controller * @author Set Protocol * * Contract that houses state for approvals and system contracts such as added Sets, * modules, factories, resources (like price oracles), and protocol fee configurations. */ contract Controller is Ownable { using AddressArrayUtils for address[]; /* ============ Events ============ */ event FactoryAdded(address indexed _factory); event FactoryRemoved(address indexed _factory); event FeeEdited(address indexed _module, uint256 indexed _feeType, uint256 _feePercentage); event FeeRecipientChanged(address _newFeeRecipient); event ModuleAdded(address indexed _module); event ModuleRemoved(address indexed _module); event ResourceAdded(address indexed _resource, uint256 _id); event ResourceRemoved(address indexed _resource, uint256 _id); event SetAdded(address indexed _setToken, address indexed _factory); event SetRemoved(address indexed _setToken); /* ============ Modifiers ============ */ /** * Throws if function is called by any address other than a valid factory. */ modifier onlyFactory() { } modifier onlyInitialized() { } /* ============ State Variables ============ */ // List of enabled Sets address[] public sets; // List of enabled factories of SetTokens address[] public factories; // List of enabled Modules; Modules extend the functionality of SetTokens address[] public modules; // List of enabled Resources; Resources provide data, functionality, or // permissions that can be drawn upon from Module, SetTokens or factories address[] public resources; // Mappings to check whether address is valid Set, Factory, Module or Resource mapping(address => bool) public isSet; mapping(address => bool) public isFactory; mapping(address => bool) public isModule; mapping(address => bool) public isResource; // Mapping of modules to fee types to fee percentage. A module can have multiple feeTypes // Fee is denominated in precise unit percentages (100% = 1e18, 1% = 1e16) mapping(address => mapping(uint256 => uint256)) public fees; // Mapping of resource ID to resource address, which allows contracts to fetch the correct // resource while providing an ID mapping(uint256 => address) public resourceId; // Recipient of protocol fees address public feeRecipient; // Return true if the controller is initialized bool public isInitialized; /* ============ Constructor ============ */ /** * Initializes the initial fee recipient on deployment. * * @param _feeRecipient Address of the initial protocol fee recipient */ constructor(address _feeRecipient) public { } /* ============ External Functions ============ */ /** * Initializes any predeployed factories, modules, and resources post deployment. Note: This function can * only be called by the owner once to batch initialize the initial system contracts. * * @param _factories List of factories to add * @param _modules List of modules to add * @param _resources List of resources to add * @param _resourceIds List of resource IDs associated with the resources */ function initialize( address[] memory _factories, address[] memory _modules, address[] memory _resources, uint256[] memory _resourceIds ) external onlyOwner { } /** * PRIVILEGED FACTORY FUNCTION. Adds a newly deployed SetToken as an enabled SetToken. * * @param _setToken Address of the SetToken contract to add */ function addSet(address _setToken) external onlyInitialized onlyFactory { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Set * * @param _setToken Address of the SetToken contract to remove */ function removeSet(address _setToken) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a factory * * @param _factory Address of the factory contract to add */ function addFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a factory * * @param _factory Address of the factory contract to remove */ function removeFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a module * * @param _module Address of the module contract to add */ function addModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a module * * @param _module Address of the module contract to remove */ function removeModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a resource * * @param _resource Address of the resource contract to add * @param _id New ID of the resource contract */ function addResource(address _resource, uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a resource * * @param _id ID of the resource contract to remove */ function removeResource(uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a fee to a module * * @param _module Address of the module contract to add fee to * @param _feeType Type of the fee to add in the module * @param _newFeePercentage Percentage of fee to add in the module (denominated in preciseUnits eg 1% = 1e16) */ function addFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { require(isModule[_module], "Module does not exist"); require(<FILL_ME>) fees[_module][_feeType] = _newFeePercentage; emit FeeEdited(_module, _feeType, _newFeePercentage); } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit a fee in an existing module * * @param _module Address of the module contract to edit fee * @param _feeType Type of the fee to edit in the module * @param _newFeePercentage Percentage of fee to edit in the module (denominated in preciseUnits eg 1% = 1e16) */ function editFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient * * @param _newFeeRecipient Address of the new protocol fee recipient */ function editFeeRecipient(address _newFeeRecipient) external onlyInitialized onlyOwner { } /* ============ External Getter Functions ============ */ function getModuleFee( address _moduleAddress, uint256 _feeType ) external view returns (uint256) { } function getFactories() external view returns (address[] memory) { } function getModules() external view returns (address[] memory) { } function getResources() external view returns (address[] memory) { } function getSets() external view returns (address[] memory) { } /** * Check if a contract address is a module, Set, resource, factory or controller * * @param _contractAddress The contract address to check */ function isSystemContract(address _contractAddress) external view returns (bool) { } }
fees[_module][_feeType]==0,"Fee type already exists on module"
118,230
fees[_module][_feeType]==0
"Fee type does not exist on module"
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol"; /** * @title Controller * @author Set Protocol * * Contract that houses state for approvals and system contracts such as added Sets, * modules, factories, resources (like price oracles), and protocol fee configurations. */ contract Controller is Ownable { using AddressArrayUtils for address[]; /* ============ Events ============ */ event FactoryAdded(address indexed _factory); event FactoryRemoved(address indexed _factory); event FeeEdited(address indexed _module, uint256 indexed _feeType, uint256 _feePercentage); event FeeRecipientChanged(address _newFeeRecipient); event ModuleAdded(address indexed _module); event ModuleRemoved(address indexed _module); event ResourceAdded(address indexed _resource, uint256 _id); event ResourceRemoved(address indexed _resource, uint256 _id); event SetAdded(address indexed _setToken, address indexed _factory); event SetRemoved(address indexed _setToken); /* ============ Modifiers ============ */ /** * Throws if function is called by any address other than a valid factory. */ modifier onlyFactory() { } modifier onlyInitialized() { } /* ============ State Variables ============ */ // List of enabled Sets address[] public sets; // List of enabled factories of SetTokens address[] public factories; // List of enabled Modules; Modules extend the functionality of SetTokens address[] public modules; // List of enabled Resources; Resources provide data, functionality, or // permissions that can be drawn upon from Module, SetTokens or factories address[] public resources; // Mappings to check whether address is valid Set, Factory, Module or Resource mapping(address => bool) public isSet; mapping(address => bool) public isFactory; mapping(address => bool) public isModule; mapping(address => bool) public isResource; // Mapping of modules to fee types to fee percentage. A module can have multiple feeTypes // Fee is denominated in precise unit percentages (100% = 1e18, 1% = 1e16) mapping(address => mapping(uint256 => uint256)) public fees; // Mapping of resource ID to resource address, which allows contracts to fetch the correct // resource while providing an ID mapping(uint256 => address) public resourceId; // Recipient of protocol fees address public feeRecipient; // Return true if the controller is initialized bool public isInitialized; /* ============ Constructor ============ */ /** * Initializes the initial fee recipient on deployment. * * @param _feeRecipient Address of the initial protocol fee recipient */ constructor(address _feeRecipient) public { } /* ============ External Functions ============ */ /** * Initializes any predeployed factories, modules, and resources post deployment. Note: This function can * only be called by the owner once to batch initialize the initial system contracts. * * @param _factories List of factories to add * @param _modules List of modules to add * @param _resources List of resources to add * @param _resourceIds List of resource IDs associated with the resources */ function initialize( address[] memory _factories, address[] memory _modules, address[] memory _resources, uint256[] memory _resourceIds ) external onlyOwner { } /** * PRIVILEGED FACTORY FUNCTION. Adds a newly deployed SetToken as an enabled SetToken. * * @param _setToken Address of the SetToken contract to add */ function addSet(address _setToken) external onlyInitialized onlyFactory { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Set * * @param _setToken Address of the SetToken contract to remove */ function removeSet(address _setToken) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a factory * * @param _factory Address of the factory contract to add */ function addFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a factory * * @param _factory Address of the factory contract to remove */ function removeFactory(address _factory) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a module * * @param _module Address of the module contract to add */ function addModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a module * * @param _module Address of the module contract to remove */ function removeModule(address _module) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a resource * * @param _resource Address of the resource contract to add * @param _id New ID of the resource contract */ function addResource(address _resource, uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a resource * * @param _id ID of the resource contract to remove */ function removeResource(uint256 _id) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to add a fee to a module * * @param _module Address of the module contract to add fee to * @param _feeType Type of the fee to add in the module * @param _newFeePercentage Percentage of fee to add in the module (denominated in preciseUnits eg 1% = 1e16) */ function addFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit a fee in an existing module * * @param _module Address of the module contract to edit fee * @param _feeType Type of the fee to edit in the module * @param _newFeePercentage Percentage of fee to edit in the module (denominated in preciseUnits eg 1% = 1e16) */ function editFee(address _module, uint256 _feeType, uint256 _newFeePercentage) external onlyInitialized onlyOwner { require(isModule[_module], "Module does not exist"); require(<FILL_ME>) fees[_module][_feeType] = _newFeePercentage; emit FeeEdited(_module, _feeType, _newFeePercentage); } /** * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient * * @param _newFeeRecipient Address of the new protocol fee recipient */ function editFeeRecipient(address _newFeeRecipient) external onlyInitialized onlyOwner { } /* ============ External Getter Functions ============ */ function getModuleFee( address _moduleAddress, uint256 _feeType ) external view returns (uint256) { } function getFactories() external view returns (address[] memory) { } function getModules() external view returns (address[] memory) { } function getResources() external view returns (address[] memory) { } function getSets() external view returns (address[] memory) { } /** * Check if a contract address is a module, Set, resource, factory or controller * * @param _contractAddress The contract address to check */ function isSystemContract(address _contractAddress) external view returns (bool) { } }
fees[_module][_feeType]!=0,"Fee type does not exist on module"
118,230
fees[_module][_feeType]!=0
'FudFrogForce: Ribbit.. Purchase would exceed max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; /* FUD Frog Force Fighting the FUD 2022 https://fudfrogs.wtf */ contract FudFrogForce is ERC721AQueryable, Ownable { using Strings for uint256; uint256 public constant TOTAL_MAX_SUPPLY = 8888; uint256 public totalFreeMints = 4000; uint256 public teamAmount = 888; uint256 public maxFreeMintPerWallet = 2; uint256 public maxPublicMintPerWallet = 10; uint256 public publicTokenPrice = .0069 ether; string _contractURI; bool public saleStarted = false; uint256 public freeMintCount; mapping(address => uint256) public freeMintClaimed; string private _baseTokenURI; constructor() ERC721A('FUD Force Frogs', 'FFF') {} modifier callerIsUser() { } modifier underMaxSupply(uint256 _quantity) { require(<FILL_ME>) _; } function mint(uint256 _quantity) external payable callerIsUser underMaxSupply(_quantity) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function _startTokenId() internal view virtual override returns (uint256) { } function ownerMint(uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function ownerMintToAddress(address _recipient, uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function setFreeMintCount(uint256 _count) external onlyOwner { } function setTeamAmount(uint256 _count) external onlyOwner { } function setMaxFreeMintPerWallet(uint256 _count) external onlyOwner { } function setMaxPublicMintPerWallet(uint256 _count) external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Storefront metadata // https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } function setContractURI(string memory _URI) external onlyOwner { } function withdrawFunds() external onlyOwner { } function withdrawFundsToAddress(address _address, uint256 amount) external onlyOwner { } function flipSaleStarted() external onlyOwner { } }
_totalMinted()+_quantity<=TOTAL_MAX_SUPPLY-teamAmount,'FudFrogForce: Ribbit.. Purchase would exceed max supply'
118,262
_totalMinted()+_quantity<=TOTAL_MAX_SUPPLY-teamAmount
"FudFrogForce: Caller's token amount exceeds the limit."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; /* FUD Frog Force Fighting the FUD 2022 https://fudfrogs.wtf */ contract FudFrogForce is ERC721AQueryable, Ownable { using Strings for uint256; uint256 public constant TOTAL_MAX_SUPPLY = 8888; uint256 public totalFreeMints = 4000; uint256 public teamAmount = 888; uint256 public maxFreeMintPerWallet = 2; uint256 public maxPublicMintPerWallet = 10; uint256 public publicTokenPrice = .0069 ether; string _contractURI; bool public saleStarted = false; uint256 public freeMintCount; mapping(address => uint256) public freeMintClaimed; string private _baseTokenURI; constructor() ERC721A('FUD Force Frogs', 'FFF') {} modifier callerIsUser() { } modifier underMaxSupply(uint256 _quantity) { } function mint(uint256 _quantity) external payable callerIsUser underMaxSupply(_quantity) { require(<FILL_ME>) require(saleStarted, 'FudFrogForce: Ribbit.. sale not yet started. '); if (_totalMinted() < (TOTAL_MAX_SUPPLY - teamAmount)) { if (freeMintCount >= totalFreeMints) { require(msg.value >= _quantity * publicTokenPrice, 'FudFrogForce: Ribbit.. Need send more ETH!'); _mint(msg.sender, _quantity); } else if (freeMintClaimed[msg.sender] < maxFreeMintPerWallet) { uint256 _mintableFreeQuantity = maxFreeMintPerWallet - freeMintClaimed[msg.sender]; if (_quantity <= _mintableFreeQuantity) { freeMintCount += _quantity; freeMintClaimed[msg.sender] += _quantity; } else { freeMintCount += _mintableFreeQuantity; freeMintClaimed[msg.sender] += _mintableFreeQuantity; require( msg.value >= (_quantity - _mintableFreeQuantity) * publicTokenPrice, 'FudFrogForce: Ribbit.. Need send more ETH!' ); } _mint(msg.sender, _quantity); } else { require(msg.value >= (_quantity * publicTokenPrice), 'FudFrogForce: Ribbit.. Need send more ETH!'); _mint(msg.sender, _quantity); } } } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function _startTokenId() internal view virtual override returns (uint256) { } function ownerMint(uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function ownerMintToAddress(address _recipient, uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function setFreeMintCount(uint256 _count) external onlyOwner { } function setTeamAmount(uint256 _count) external onlyOwner { } function setMaxFreeMintPerWallet(uint256 _count) external onlyOwner { } function setMaxPublicMintPerWallet(uint256 _count) external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Storefront metadata // https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } function setContractURI(string memory _URI) external onlyOwner { } function withdrawFunds() external onlyOwner { } function withdrawFundsToAddress(address _address, uint256 amount) external onlyOwner { } function flipSaleStarted() external onlyOwner { } }
balanceOf(msg.sender)<maxPublicMintPerWallet,"FudFrogForce: Caller's token amount exceeds the limit."
118,262
balanceOf(msg.sender)<maxPublicMintPerWallet
'FudFrogForce: Ribbit.. Need send more ETH!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; /* FUD Frog Force Fighting the FUD 2022 https://fudfrogs.wtf */ contract FudFrogForce is ERC721AQueryable, Ownable { using Strings for uint256; uint256 public constant TOTAL_MAX_SUPPLY = 8888; uint256 public totalFreeMints = 4000; uint256 public teamAmount = 888; uint256 public maxFreeMintPerWallet = 2; uint256 public maxPublicMintPerWallet = 10; uint256 public publicTokenPrice = .0069 ether; string _contractURI; bool public saleStarted = false; uint256 public freeMintCount; mapping(address => uint256) public freeMintClaimed; string private _baseTokenURI; constructor() ERC721A('FUD Force Frogs', 'FFF') {} modifier callerIsUser() { } modifier underMaxSupply(uint256 _quantity) { } function mint(uint256 _quantity) external payable callerIsUser underMaxSupply(_quantity) { require(balanceOf(msg.sender) < maxPublicMintPerWallet, "FudFrogForce: Caller's token amount exceeds the limit."); require(saleStarted, 'FudFrogForce: Ribbit.. sale not yet started. '); if (_totalMinted() < (TOTAL_MAX_SUPPLY - teamAmount)) { if (freeMintCount >= totalFreeMints) { require(msg.value >= _quantity * publicTokenPrice, 'FudFrogForce: Ribbit.. Need send more ETH!'); _mint(msg.sender, _quantity); } else if (freeMintClaimed[msg.sender] < maxFreeMintPerWallet) { uint256 _mintableFreeQuantity = maxFreeMintPerWallet - freeMintClaimed[msg.sender]; if (_quantity <= _mintableFreeQuantity) { freeMintCount += _quantity; freeMintClaimed[msg.sender] += _quantity; } else { freeMintCount += _mintableFreeQuantity; freeMintClaimed[msg.sender] += _mintableFreeQuantity; require(<FILL_ME>) } _mint(msg.sender, _quantity); } else { require(msg.value >= (_quantity * publicTokenPrice), 'FudFrogForce: Ribbit.. Need send more ETH!'); _mint(msg.sender, _quantity); } } } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function _startTokenId() internal view virtual override returns (uint256) { } function ownerMint(uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function ownerMintToAddress(address _recipient, uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function setFreeMintCount(uint256 _count) external onlyOwner { } function setTeamAmount(uint256 _count) external onlyOwner { } function setMaxFreeMintPerWallet(uint256 _count) external onlyOwner { } function setMaxPublicMintPerWallet(uint256 _count) external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Storefront metadata // https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } function setContractURI(string memory _URI) external onlyOwner { } function withdrawFunds() external onlyOwner { } function withdrawFundsToAddress(address _address, uint256 amount) external onlyOwner { } function flipSaleStarted() external onlyOwner { } }
msg.value>=(_quantity-_mintableFreeQuantity)*publicTokenPrice,'FudFrogForce: Ribbit.. Need send more ETH!'
118,262
msg.value>=(_quantity-_mintableFreeQuantity)*publicTokenPrice
'FudFrogForce: Ribbit.. Need send more ETH!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; /* FUD Frog Force Fighting the FUD 2022 https://fudfrogs.wtf */ contract FudFrogForce is ERC721AQueryable, Ownable { using Strings for uint256; uint256 public constant TOTAL_MAX_SUPPLY = 8888; uint256 public totalFreeMints = 4000; uint256 public teamAmount = 888; uint256 public maxFreeMintPerWallet = 2; uint256 public maxPublicMintPerWallet = 10; uint256 public publicTokenPrice = .0069 ether; string _contractURI; bool public saleStarted = false; uint256 public freeMintCount; mapping(address => uint256) public freeMintClaimed; string private _baseTokenURI; constructor() ERC721A('FUD Force Frogs', 'FFF') {} modifier callerIsUser() { } modifier underMaxSupply(uint256 _quantity) { } function mint(uint256 _quantity) external payable callerIsUser underMaxSupply(_quantity) { require(balanceOf(msg.sender) < maxPublicMintPerWallet, "FudFrogForce: Caller's token amount exceeds the limit."); require(saleStarted, 'FudFrogForce: Ribbit.. sale not yet started. '); if (_totalMinted() < (TOTAL_MAX_SUPPLY - teamAmount)) { if (freeMintCount >= totalFreeMints) { require(msg.value >= _quantity * publicTokenPrice, 'FudFrogForce: Ribbit.. Need send more ETH!'); _mint(msg.sender, _quantity); } else if (freeMintClaimed[msg.sender] < maxFreeMintPerWallet) { uint256 _mintableFreeQuantity = maxFreeMintPerWallet - freeMintClaimed[msg.sender]; if (_quantity <= _mintableFreeQuantity) { freeMintCount += _quantity; freeMintClaimed[msg.sender] += _quantity; } else { freeMintCount += _mintableFreeQuantity; freeMintClaimed[msg.sender] += _mintableFreeQuantity; require( msg.value >= (_quantity - _mintableFreeQuantity) * publicTokenPrice, 'FudFrogForce: Ribbit.. Need send more ETH!' ); } _mint(msg.sender, _quantity); } else { require(<FILL_ME>) _mint(msg.sender, _quantity); } } } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function _startTokenId() internal view virtual override returns (uint256) { } function ownerMint(uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function ownerMintToAddress(address _recipient, uint256 _numberToMint) external onlyOwner underMaxSupply(_numberToMint) { } function setFreeMintCount(uint256 _count) external onlyOwner { } function setTeamAmount(uint256 _count) external onlyOwner { } function setMaxFreeMintPerWallet(uint256 _count) external onlyOwner { } function setMaxPublicMintPerWallet(uint256 _count) external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Storefront metadata // https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } function setContractURI(string memory _URI) external onlyOwner { } function withdrawFunds() external onlyOwner { } function withdrawFundsToAddress(address _address, uint256 amount) external onlyOwner { } function flipSaleStarted() external onlyOwner { } }
msg.value>=(_quantity*publicTokenPrice),'FudFrogForce: Ribbit.. Need send more ETH!'
118,262
msg.value>=(_quantity*publicTokenPrice)
"not exist"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { require(_itemAvailable, "item not available"); require(<FILL_ME>) require(ISlothBody(_contractAddress).ownerOf(tokenId) == msg.sender, "not owner"); require(_targetItems.length == _ITEM_NUM, "invalid itemIds length"); IEquipment.Equipment[_ITEM_NUM] memory _equipments = ISlothBody(_contractAddress).getEquipments(tokenId); uint256[] memory _equipmentItemIds = new uint256[](_ITEM_NUM); for (uint8 i = 0; i < _ITEM_NUM; i++) { _equipmentItemIds[i] = _equipments[i].itemId; } validateSetItems(_equipmentItemIds, _targetItems, msg.sender); address[] memory itemAddrs = new address[](5); uint256[] memory _itemIds = new uint256[](5); IItemType.ItemMintType[] memory _itemMintTypes = new IItemType.ItemMintType[](5); for (uint8 i = 0; i < _ITEM_NUM; i++) { itemAddrs[i] = ISloth(_contractAddress).setItem(tokenId, _targetItems[i], ISlothItem.ItemType(i), msg.sender); _itemIds[i] = _targetItems[i].itemTokenId; _itemMintTypes[i] = _targetItems[i].itemMintType; } // _lastSetAt[tokenId] = block.timestamp; emit SetItem(tokenId, _itemIds, _itemMintTypes, itemAddrs, block.timestamp); } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
ISlothBody(_contractAddress).exists(tokenId),"not exist"
118,287
ISlothBody(_contractAddress).exists(tokenId)
"not owner"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { require(_itemAvailable, "item not available"); require(ISlothBody(_contractAddress).exists(tokenId), "not exist"); require(<FILL_ME>) require(_targetItems.length == _ITEM_NUM, "invalid itemIds length"); IEquipment.Equipment[_ITEM_NUM] memory _equipments = ISlothBody(_contractAddress).getEquipments(tokenId); uint256[] memory _equipmentItemIds = new uint256[](_ITEM_NUM); for (uint8 i = 0; i < _ITEM_NUM; i++) { _equipmentItemIds[i] = _equipments[i].itemId; } validateSetItems(_equipmentItemIds, _targetItems, msg.sender); address[] memory itemAddrs = new address[](5); uint256[] memory _itemIds = new uint256[](5); IItemType.ItemMintType[] memory _itemMintTypes = new IItemType.ItemMintType[](5); for (uint8 i = 0; i < _ITEM_NUM; i++) { itemAddrs[i] = ISloth(_contractAddress).setItem(tokenId, _targetItems[i], ISlothItem.ItemType(i), msg.sender); _itemIds[i] = _targetItems[i].itemTokenId; _itemMintTypes[i] = _targetItems[i].itemMintType; } // _lastSetAt[tokenId] = block.timestamp; emit SetItem(tokenId, _itemIds, _itemMintTypes, itemAddrs, block.timestamp); } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
ISlothBody(_contractAddress).ownerOf(tokenId)==msg.sender,"not owner"
118,287
ISlothBody(_contractAddress).ownerOf(tokenId)==msg.sender
"token not exists"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(<FILL_ME>) require(slothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } if (uint(_itemMintType) == uint(IItemType.ItemMintType.SPECIAL_SLOTH_ITEM)) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(specialSlothItem.exists(_itemTokenId), "token not exists"); require(specialSlothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } revert("wrorng itemMintType"); } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
slothItem.exists(_itemTokenId),"token not exists"
118,287
slothItem.exists(_itemTokenId)
"not owner"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(slothItem.exists(_itemTokenId), "token not exists"); require(<FILL_ME>) return; } if (uint(_itemMintType) == uint(IItemType.ItemMintType.SPECIAL_SLOTH_ITEM)) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(specialSlothItem.exists(_itemTokenId), "token not exists"); require(specialSlothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } revert("wrorng itemMintType"); } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
slothItem.ownerOf(_itemTokenId)==sender,"not owner"
118,287
slothItem.ownerOf(_itemTokenId)==sender
"token not exists"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(slothItem.exists(_itemTokenId), "token not exists"); require(slothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } if (uint(_itemMintType) == uint(IItemType.ItemMintType.SPECIAL_SLOTH_ITEM)) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(<FILL_ME>) require(specialSlothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } revert("wrorng itemMintType"); } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
specialSlothItem.exists(_itemTokenId),"token not exists"
118,287
specialSlothItem.exists(_itemTokenId)
"not owner"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(slothItem.exists(_itemTokenId), "token not exists"); require(slothItem.ownerOf(_itemTokenId) == sender, "not owner"); return; } if (uint(_itemMintType) == uint(IItemType.ItemMintType.SPECIAL_SLOTH_ITEM)) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(specialSlothItem.exists(_itemTokenId), "token not exists"); require(<FILL_ME>) return; } revert("wrorng itemMintType"); } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
specialSlothItem.ownerOf(_itemTokenId)==sender,"not owner"
118,287
specialSlothItem.ownerOf(_itemTokenId)==sender
"wrong item type"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(<FILL_ME>) return; } if (_itemMintType == IItemType.ItemMintType.SPECIAL_SLOTH_ITEM) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(specialSlothItem.getItemType(_itemTokenId) == _itemType, "wrong item type"); return; } revert("wrorng itemMintType"); } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
slothItem.getItemType(_itemTokenId)==_itemType,"wrong item type"
118,287
slothItem.getItemType(_itemTokenId)==_itemType
"wrong item type"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISlothItemV3.sol"; import "./interfaces/ISpecialSlothItem.sol"; import "./interfaces/IItemType.sol"; import "./interfaces/IEquipment.sol"; import "./interfaces/ISlothBody.sol"; import "./interfaces/ISlothV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SlothEquipmentV2 is Ownable { event SetItem ( uint256 indexed _tokenId, uint256[] _itemIds, IItemType.ItemMintType[] _itemMintType, address[] _slothItemAddr, uint256 _setAt ); address private _slothAddr; address private _slothItemAddr; address private _specialSlothItemAddr; address private _userGeneratedSlothItemAddr; uint8 private constant _ITEM_NUM = 5; bool private _itemAvailable; function _getSpecialType(uint256 _itemTokenId) internal view returns (uint256) { } function _checkIsCombinationalCollabo(uint256 _specialType) internal view returns (bool) { } function setItems(uint256 tokenId, IEquipment.EquipmentTargetItem[] memory _targetItems, address _contractAddress) external { } function _checkOwner(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, address sender) internal view { } function _checkItemType(uint256 _itemTokenId, IItemType.ItemMintType _itemMintType, IItemType.ItemType _itemType) internal view { if (_itemMintType == IItemType.ItemMintType.SLOTH_ITEM) { ISlothItemV3 slothItem = ISlothItemV3(_slothItemAddr); require(slothItem.getItemType(_itemTokenId) == _itemType, "wrong item type"); return; } if (_itemMintType == IItemType.ItemMintType.SPECIAL_SLOTH_ITEM) { ISpecialSlothItem specialSlothItem = ISpecialSlothItem(_specialSlothItemAddr); require(<FILL_ME>) return; } revert("wrorng itemMintType"); } function validateSetItems(uint256[] memory equipmentItemIds, IEquipment.EquipmentTargetItem[] memory equipmentTargetItems, address sender) internal view returns (bool) { } function getTargetItemContractAddress(IItemType.ItemMintType _itemMintType) external view returns (address) { } function setItemAvailable(bool newItemAvailable) external onlyOwner { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function setSpecialSlothItemAddr(address newSpecialSlothItemAddr) external onlyOwner { } }
specialSlothItem.getItemType(_itemTokenId)==_itemType,"wrong item type"
118,287
specialSlothItem.getItemType(_itemTokenId)==_itemType
"Signature invalid or unauthorized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ERC998TopDown.sol"; import "./IItem.sol"; /// @title Hero /// @notice Hero is a composable NFT designed to equip other ERC1155 tokens contract Hero is ERC721Enumerable, ERC998TopDown, Ownable, EIP712, IERC2981 { using ERC165Checker for address; struct MintVoucher { uint256 price; address wallet; bytes signature; } struct BulkChangeVoucher { uint256 tokenId; address itemContractAddress; uint256[] itemsToEquip; uint256[] amountsToEquip; uint256[] slotsToEquip; uint256[] itemsToUnequip; uint256[] amountsToUnequip; bytes signature; } struct Item { address itemAddress; uint256 id; } event BulkChanges( uint256 tokenId, uint256[] itemsToEquip, uint256[] amountsToEquip, uint256[] slotsToEquip, uint256[] itemsToUnequip, uint256[] amountsToUnequip, address heroOwner ); event ItemsClaimed(uint256 tokenId); bytes4 internal constant ERC_1155_INTERFACE = 0xd9b67a26; mapping(address => bool) private _allowedMinters; string private constant SIGNING_DOMAIN = "Hero"; string private constant SIGNATURE_VERSION = "1"; address public primarySalesReceiver; address public royaltyReceiver; uint8 public royaltyPercentage; string private baseUri; uint256 public maxSupply; string private _contractURI; using Counters for Counters.Counter; Counters.Counter private _heroCounter; mapping(address => uint256) private mintNonce; mapping(uint256 => uint256) private claimNonce; string public provenanceHash; constructor( uint256 maxSupply_, string memory uri_, address payable signer_, address payable primarySalesReceiver_, address payable royaltyReceiver_, uint8 royaltyPercentage_, string memory contractURI_, string memory provenanceHash_ ) ERC998TopDown("Hero", "HERO") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory contractURI_) external { } function addSigner(address signer_) public onlyOwner { } function disableSigner(address signer_) public onlyOwner { } function getMintNonce(address msgSigner) external view returns (uint256) { } function getClaimNonce(uint256 tokenId) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, ERC721, IERC165) returns (bool) { } modifier onlyAuthorized(uint256 _tokenId) { } function bulkChanges(BulkChangeVoucher calldata bulkChangeVoucher) external onlyAuthorized(bulkChangeVoucher.tokenId) { address signer = _verifyBulkChangeData(bulkChangeVoucher, false); require(<FILL_ME>) _transferItemOut( bulkChangeVoucher.tokenId, ownerOf(bulkChangeVoucher.tokenId), bulkChangeVoucher.itemContractAddress, bulkChangeVoucher.itemsToUnequip, bulkChangeVoucher.amountsToUnequip ); _transferItemIn( bulkChangeVoucher.tokenId, _msgSender(), bulkChangeVoucher.itemContractAddress, bulkChangeVoucher.itemsToEquip, bulkChangeVoucher.amountsToEquip ); emit BulkChanges( bulkChangeVoucher.tokenId, bulkChangeVoucher.itemsToEquip, bulkChangeVoucher.amountsToEquip, bulkChangeVoucher.slotsToEquip, bulkChangeVoucher.itemsToUnequip, bulkChangeVoucher.amountsToUnequip, ownerOf(bulkChangeVoucher.tokenId) ); } function mint(MintVoucher calldata voucher) external payable { } function claimItems(BulkChangeVoucher calldata voucher) external onlyAuthorized(voucher.tokenId) { } function setUri(string memory uri_) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _transferItemIn( uint256 _tokenId, address _operator, address _itemAddress, uint256[] memory _itemIds, uint256[] memory _amounts ) internal { } function _transferItemOut( uint256 _tokenId, address _owner, address _itemAddress, uint256[] memory _unequipItemIds, uint256[] memory _amountsToUnequip ) internal { } function _hashMintData(MintVoucher calldata voucher) internal view returns (bytes32) { } function _hashBulkChangeData( BulkChangeVoucher calldata voucher, bool includeNonce ) internal view returns (bytes32) { } function _verifyMintData(MintVoucher calldata voucher) internal view returns (address) { } function _verifyBulkChangeData( BulkChangeVoucher calldata voucher, bool includeNonce ) internal view returns (address) { } function setRoyalty(address creator, uint8 _royaltyPercentage) public onlyOwner { } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param tokenId - the NFT asset queried for royalty information (not used) /// @param _salePrice - sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _value sale price function royaltyInfo(uint256 tokenId, uint256 _salePrice) external view override(IERC2981) returns (address receiver, uint256 royaltyAmount) { } function onERC1155Received( address operator, address from, uint256 id, uint256 amount, bytes memory data ) public override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] memory ids, uint256[] memory values, bytes memory data ) public override returns (bytes4) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function getChainID() external view returns (uint256) { } function toBytes(uint256 x) internal pure returns (bytes memory b) { } }
_allowedMinters[signer]==true,"Signature invalid or unauthorized"
118,310
_allowedMinters[signer]==true
"Hero: Invalid wallet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ERC998TopDown.sol"; import "./IItem.sol"; /// @title Hero /// @notice Hero is a composable NFT designed to equip other ERC1155 tokens contract Hero is ERC721Enumerable, ERC998TopDown, Ownable, EIP712, IERC2981 { using ERC165Checker for address; struct MintVoucher { uint256 price; address wallet; bytes signature; } struct BulkChangeVoucher { uint256 tokenId; address itemContractAddress; uint256[] itemsToEquip; uint256[] amountsToEquip; uint256[] slotsToEquip; uint256[] itemsToUnequip; uint256[] amountsToUnequip; bytes signature; } struct Item { address itemAddress; uint256 id; } event BulkChanges( uint256 tokenId, uint256[] itemsToEquip, uint256[] amountsToEquip, uint256[] slotsToEquip, uint256[] itemsToUnequip, uint256[] amountsToUnequip, address heroOwner ); event ItemsClaimed(uint256 tokenId); bytes4 internal constant ERC_1155_INTERFACE = 0xd9b67a26; mapping(address => bool) private _allowedMinters; string private constant SIGNING_DOMAIN = "Hero"; string private constant SIGNATURE_VERSION = "1"; address public primarySalesReceiver; address public royaltyReceiver; uint8 public royaltyPercentage; string private baseUri; uint256 public maxSupply; string private _contractURI; using Counters for Counters.Counter; Counters.Counter private _heroCounter; mapping(address => uint256) private mintNonce; mapping(uint256 => uint256) private claimNonce; string public provenanceHash; constructor( uint256 maxSupply_, string memory uri_, address payable signer_, address payable primarySalesReceiver_, address payable royaltyReceiver_, uint8 royaltyPercentage_, string memory contractURI_, string memory provenanceHash_ ) ERC998TopDown("Hero", "HERO") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory contractURI_) external { } function addSigner(address signer_) public onlyOwner { } function disableSigner(address signer_) public onlyOwner { } function getMintNonce(address msgSigner) external view returns (uint256) { } function getClaimNonce(uint256 tokenId) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, ERC721, IERC165) returns (bool) { } modifier onlyAuthorized(uint256 _tokenId) { } function bulkChanges(BulkChangeVoucher calldata bulkChangeVoucher) external onlyAuthorized(bulkChangeVoucher.tokenId) { } function mint(MintVoucher calldata voucher) external payable { require(msg.value == voucher.price, "Voucher: Invalid price amount"); uint256 currentHeroCounter = _heroCounter.current(); require(currentHeroCounter <= maxSupply, "Hero: No more heroes available"); address signer = _verifyMintData(voucher); require( _allowedMinters[signer] == true, "Signature invalid or unauthorized" ); require(<FILL_ME>) mintNonce[_msgSender()]++; _safeMint(_msgSender(), currentHeroCounter); (bool paymentSucess, ) = payable(primarySalesReceiver).call{ value: msg.value }(""); require(paymentSucess, "Hero: Payment failed"); _heroCounter.increment(); } function claimItems(BulkChangeVoucher calldata voucher) external onlyAuthorized(voucher.tokenId) { } function setUri(string memory uri_) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _transferItemIn( uint256 _tokenId, address _operator, address _itemAddress, uint256[] memory _itemIds, uint256[] memory _amounts ) internal { } function _transferItemOut( uint256 _tokenId, address _owner, address _itemAddress, uint256[] memory _unequipItemIds, uint256[] memory _amountsToUnequip ) internal { } function _hashMintData(MintVoucher calldata voucher) internal view returns (bytes32) { } function _hashBulkChangeData( BulkChangeVoucher calldata voucher, bool includeNonce ) internal view returns (bytes32) { } function _verifyMintData(MintVoucher calldata voucher) internal view returns (address) { } function _verifyBulkChangeData( BulkChangeVoucher calldata voucher, bool includeNonce ) internal view returns (address) { } function setRoyalty(address creator, uint8 _royaltyPercentage) public onlyOwner { } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param tokenId - the NFT asset queried for royalty information (not used) /// @param _salePrice - sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _value sale price function royaltyInfo(uint256 tokenId, uint256 _salePrice) external view override(IERC2981) returns (address receiver, uint256 royaltyAmount) { } function onERC1155Received( address operator, address from, uint256 id, uint256 amount, bytes memory data ) public override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] memory ids, uint256[] memory values, bytes memory data ) public override returns (bytes4) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function getChainID() external view returns (uint256) { } function toBytes(uint256 x) internal pure returns (bytes memory b) { } }
_msgSender()==voucher.wallet,"Hero: Invalid wallet"
118,310
_msgSender()==voucher.wallet
"ERC998: caller is not owner nor approved"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./IERC998ERC1155TopDown.sol"; contract ERC998TopDown is ERC721, IERC998ERC1155TopDown { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; // _balances[tokenId][child address][child tokenId] = amount mapping(uint256 => mapping(address => mapping(uint256 => uint256))) internal _balances1155; mapping(uint256 => EnumerableSet.AddressSet) internal _child1155Contracts; mapping(uint256 => mapping(address => EnumerableSet.UintSet)) internal _childrenForChild1155Contracts; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} /** * @dev Gives child balance for a specific child 1155 contract and child id. */ function child1155Balance( uint256 tokenId, address childContract, uint256 childTokenId ) public view override returns (uint256) { } /** * @dev Gives list of child 1155 contracts where token ID has childs. */ function child1155ContractsFor(uint256 tokenId) public view override returns (address[] memory) { } /** * @dev Gives list of owned child IDs on a child 1155 contract by token ID. */ function child1155IdsForOn(uint256 tokenId, address childContract) public view override returns (uint256[] memory) { } /** * @dev Transfers batch of child 1155 tokens from a token ID. */ function _safeBatchTransferChild1155From( uint256 fromTokenId, address to, address childContract, uint256[] memory childTokenIds, uint256[] memory amounts, bytes memory data ) internal { require( childTokenIds.length == amounts.length, "ERC998: ids and amounts length mismatch" ); require(to != address(0), "ERC998: transfer to the zero address"); address operator = _msgSender(); require(<FILL_ME>) for (uint256 i = 0; i < childTokenIds.length; ++i) { uint256 childTokenId = childTokenIds[i]; uint256 amount = amounts[i]; _removeChild1155(fromTokenId, childContract, childTokenId, amount); } ERC1155(childContract).safeBatchTransferFrom( address(this), to, childTokenIds, amounts, data ); emit TransferBatchChild1155( fromTokenId, to, childContract, childTokenIds, amounts ); } /** * @dev Receives a child token, the receiver token ID must be encoded in the * field data. Operator is the account who initiated the transfer. */ function onERC1155Received( address operator, address from, uint256 id, uint256 amount, bytes memory data ) public virtual override returns (bytes4) { } /** * @dev Receives a batch of child tokens, the receiver token ID must be * encoded in the field data. Operator is the account who initiated the transfer. */ function onERC1155BatchReceived( address operator, address from, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual override returns (bytes4) { } /** * @dev Update bookkeeping when a 998 is sent a child 1155 token. */ function _receiveChild1155( uint256 tokenId, address childContract, uint256 childTokenId, uint256 amount ) internal virtual { } /** * @dev Update bookkeeping when a child 1155 token is removed from a 998. */ function _removeChild1155( uint256 tokenId, address childContract, uint256 childTokenId, uint256 amount ) internal virtual { } }
ownerOf(fromTokenId)==operator||isApprovedForAll(ownerOf(fromTokenId),operator),"ERC998: caller is not owner nor approved"
118,311
ownerOf(fromTokenId)==operator||isApprovedForAll(ownerOf(fromTokenId),operator)
"Invalid merkle proof"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.8.0 <0.9.0; import "./vendor/@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./vendor/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./interfaces/ModuleManager.sol"; import "./VestingPool.sol"; /// @title Airdrop contract /// @author Richard Meissner - @rmeissner contract Airdrop is VestingPool { // Root of the Merkle tree bytes32 public root; // Time until which the airdrop can be redeemed uint64 public immutable redeemDeadline; /// @notice Creates the airdrop for the token at address `_token` and `_manager` as the manager. The airdrop can be redeemed until `_redeemDeadline`. /// @param _token The token that should be used for the airdrop /// @param _manager The manager of this airdrop (e.g. the address that can call `initializeRoot`) /// @param _redeemDeadline The deadline until when the airdrop could be redeemed (if inititalized). This needs to be a date in the future. constructor( address _token, address _manager, uint64 _redeemDeadline ) VestingPool(_token, _manager) { } /// @notice Initialize the airdrop with `_root` as the Merkle root. /// @dev This can only be called once /// @param _root The Merkle root that should be set for this contract function initializeRoot(bytes32 _root) public onlyPoolManager { } /// @notice Creates a vesting authorized by the Merkle proof. /// @dev It is required that the pool has enough tokens available /// @dev Vesting will be created for msg.sender /// @param curveType Type of the curve that should be used for the vesting /// @param durationWeeks The duration of the vesting in weeks /// @param startDate The date when the vesting should be started (can be in the past) /// @param amount Amount of tokens that should be vested in atoms /// @param proof Proof to redeem tokens function redeem( uint8 curveType, uint16 durationWeeks, uint64 startDate, uint128 amount, bytes32[] calldata proof ) external { require(block.timestamp <= redeemDeadline, "Deadline to redeem vesting has been exceeded"); require(root != bytes32(0), "State root not initialized"); // This call will fail if the vesting was already created bytes32 vestingId = _addVesting(msg.sender, curveType, false, durationWeeks, startDate, amount); require(<FILL_ME>) } /// @notice Claim `tokensToClaim` tokens from vesting `vestingId` and transfer them to the `beneficiary`. /// @dev This can only be called by the owner of the vesting /// @dev Beneficiary cannot be the 0-address /// @dev This will trigger a transfer of tokens via a module transaction /// @param vestingId Id of the vesting from which the tokens should be claimed /// @param beneficiary Account that should receive the claimed tokens /// @param tokensToClaim Amount of tokens to claim in atoms or max uint128 to claim all available function claimVestedTokensViaModule( bytes32 vestingId, address beneficiary, uint128 tokensToClaim ) public { } /// @notice Claims all tokens that have not been redeemed before `redeemDeadline` /// @dev Can only be called after `redeemDeadline` has been reached. /// @param beneficiary Account that should receive the claimed tokens function claimUnusedTokens(address beneficiary) external onlyPoolManager { } /// @dev This method cannot be called on this contract function addVesting( address, uint8, bool, uint16, uint64, uint128 ) public pure override { } }
MerkleProof.verify(proof,root,vestingId),"Invalid merkle proof"
118,326
MerkleProof.verify(proof,root,vestingId)
"Could not approve tokens"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.8.0 <0.9.0; import "./vendor/@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./vendor/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./interfaces/ModuleManager.sol"; import "./VestingPool.sol"; /// @title Airdrop contract /// @author Richard Meissner - @rmeissner contract Airdrop is VestingPool { // Root of the Merkle tree bytes32 public root; // Time until which the airdrop can be redeemed uint64 public immutable redeemDeadline; /// @notice Creates the airdrop for the token at address `_token` and `_manager` as the manager. The airdrop can be redeemed until `_redeemDeadline`. /// @param _token The token that should be used for the airdrop /// @param _manager The manager of this airdrop (e.g. the address that can call `initializeRoot`) /// @param _redeemDeadline The deadline until when the airdrop could be redeemed (if inititalized). This needs to be a date in the future. constructor( address _token, address _manager, uint64 _redeemDeadline ) VestingPool(_token, _manager) { } /// @notice Initialize the airdrop with `_root` as the Merkle root. /// @dev This can only be called once /// @param _root The Merkle root that should be set for this contract function initializeRoot(bytes32 _root) public onlyPoolManager { } /// @notice Creates a vesting authorized by the Merkle proof. /// @dev It is required that the pool has enough tokens available /// @dev Vesting will be created for msg.sender /// @param curveType Type of the curve that should be used for the vesting /// @param durationWeeks The duration of the vesting in weeks /// @param startDate The date when the vesting should be started (can be in the past) /// @param amount Amount of tokens that should be vested in atoms /// @param proof Proof to redeem tokens function redeem( uint8 curveType, uint16 durationWeeks, uint64 startDate, uint128 amount, bytes32[] calldata proof ) external { } /// @notice Claim `tokensToClaim` tokens from vesting `vestingId` and transfer them to the `beneficiary`. /// @dev This can only be called by the owner of the vesting /// @dev Beneficiary cannot be the 0-address /// @dev This will trigger a transfer of tokens via a module transaction /// @param vestingId Id of the vesting from which the tokens should be claimed /// @param beneficiary Account that should receive the claimed tokens /// @param tokensToClaim Amount of tokens to claim in atoms or max uint128 to claim all available function claimVestedTokensViaModule( bytes32 vestingId, address beneficiary, uint128 tokensToClaim ) public { uint128 tokensClaimed = updateClaimedTokens(vestingId, beneficiary, tokensToClaim); // Approve pool manager to transfer tokens on behalf of the pool require(<FILL_ME>) // Check state prior to transfer uint256 balancePoolBefore = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryBefore = IERC20(token).balanceOf(beneficiary); // Build transfer data to call token contract via the pool manager bytes memory transferData = abi.encodeWithSignature( "transferFrom(address,address,uint256)", address(this), beneficiary, tokensClaimed ); // Trigger transfer of tokens from this pool to the beneficiary via the pool manager as a module transaction require(ModuleManager(poolManager).execTransactionFromModule(token, 0, transferData, 0), "Module transaction failed"); // Set allowance to 0 to avoid any left over allowance. (Note: this should be impossible for normal ERC20 tokens) require(IERC20(token).approve(poolManager, 0), "Could not set token allowance to 0"); // Check state after the transfer uint256 balancePoolAfter = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryAfter = IERC20(token).balanceOf(beneficiary); require(balancePoolAfter == balancePoolBefore - tokensClaimed, "Could not deduct tokens from pool"); require(balanceBeneficiaryAfter == balanceBeneficiaryBefore + tokensClaimed, "Could not add tokens to beneficiary"); } /// @notice Claims all tokens that have not been redeemed before `redeemDeadline` /// @dev Can only be called after `redeemDeadline` has been reached. /// @param beneficiary Account that should receive the claimed tokens function claimUnusedTokens(address beneficiary) external onlyPoolManager { } /// @dev This method cannot be called on this contract function addVesting( address, uint8, bool, uint16, uint64, uint128 ) public pure override { } }
IERC20(token).approve(poolManager,tokensClaimed),"Could not approve tokens"
118,326
IERC20(token).approve(poolManager,tokensClaimed)
"Module transaction failed"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.8.0 <0.9.0; import "./vendor/@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./vendor/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./interfaces/ModuleManager.sol"; import "./VestingPool.sol"; /// @title Airdrop contract /// @author Richard Meissner - @rmeissner contract Airdrop is VestingPool { // Root of the Merkle tree bytes32 public root; // Time until which the airdrop can be redeemed uint64 public immutable redeemDeadline; /// @notice Creates the airdrop for the token at address `_token` and `_manager` as the manager. The airdrop can be redeemed until `_redeemDeadline`. /// @param _token The token that should be used for the airdrop /// @param _manager The manager of this airdrop (e.g. the address that can call `initializeRoot`) /// @param _redeemDeadline The deadline until when the airdrop could be redeemed (if inititalized). This needs to be a date in the future. constructor( address _token, address _manager, uint64 _redeemDeadline ) VestingPool(_token, _manager) { } /// @notice Initialize the airdrop with `_root` as the Merkle root. /// @dev This can only be called once /// @param _root The Merkle root that should be set for this contract function initializeRoot(bytes32 _root) public onlyPoolManager { } /// @notice Creates a vesting authorized by the Merkle proof. /// @dev It is required that the pool has enough tokens available /// @dev Vesting will be created for msg.sender /// @param curveType Type of the curve that should be used for the vesting /// @param durationWeeks The duration of the vesting in weeks /// @param startDate The date when the vesting should be started (can be in the past) /// @param amount Amount of tokens that should be vested in atoms /// @param proof Proof to redeem tokens function redeem( uint8 curveType, uint16 durationWeeks, uint64 startDate, uint128 amount, bytes32[] calldata proof ) external { } /// @notice Claim `tokensToClaim` tokens from vesting `vestingId` and transfer them to the `beneficiary`. /// @dev This can only be called by the owner of the vesting /// @dev Beneficiary cannot be the 0-address /// @dev This will trigger a transfer of tokens via a module transaction /// @param vestingId Id of the vesting from which the tokens should be claimed /// @param beneficiary Account that should receive the claimed tokens /// @param tokensToClaim Amount of tokens to claim in atoms or max uint128 to claim all available function claimVestedTokensViaModule( bytes32 vestingId, address beneficiary, uint128 tokensToClaim ) public { uint128 tokensClaimed = updateClaimedTokens(vestingId, beneficiary, tokensToClaim); // Approve pool manager to transfer tokens on behalf of the pool require(IERC20(token).approve(poolManager, tokensClaimed), "Could not approve tokens"); // Check state prior to transfer uint256 balancePoolBefore = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryBefore = IERC20(token).balanceOf(beneficiary); // Build transfer data to call token contract via the pool manager bytes memory transferData = abi.encodeWithSignature( "transferFrom(address,address,uint256)", address(this), beneficiary, tokensClaimed ); // Trigger transfer of tokens from this pool to the beneficiary via the pool manager as a module transaction require(<FILL_ME>) // Set allowance to 0 to avoid any left over allowance. (Note: this should be impossible for normal ERC20 tokens) require(IERC20(token).approve(poolManager, 0), "Could not set token allowance to 0"); // Check state after the transfer uint256 balancePoolAfter = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryAfter = IERC20(token).balanceOf(beneficiary); require(balancePoolAfter == balancePoolBefore - tokensClaimed, "Could not deduct tokens from pool"); require(balanceBeneficiaryAfter == balanceBeneficiaryBefore + tokensClaimed, "Could not add tokens to beneficiary"); } /// @notice Claims all tokens that have not been redeemed before `redeemDeadline` /// @dev Can only be called after `redeemDeadline` has been reached. /// @param beneficiary Account that should receive the claimed tokens function claimUnusedTokens(address beneficiary) external onlyPoolManager { } /// @dev This method cannot be called on this contract function addVesting( address, uint8, bool, uint16, uint64, uint128 ) public pure override { } }
ModuleManager(poolManager).execTransactionFromModule(token,0,transferData,0),"Module transaction failed"
118,326
ModuleManager(poolManager).execTransactionFromModule(token,0,transferData,0)
"Could not set token allowance to 0"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.8.0 <0.9.0; import "./vendor/@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./vendor/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./interfaces/ModuleManager.sol"; import "./VestingPool.sol"; /// @title Airdrop contract /// @author Richard Meissner - @rmeissner contract Airdrop is VestingPool { // Root of the Merkle tree bytes32 public root; // Time until which the airdrop can be redeemed uint64 public immutable redeemDeadline; /// @notice Creates the airdrop for the token at address `_token` and `_manager` as the manager. The airdrop can be redeemed until `_redeemDeadline`. /// @param _token The token that should be used for the airdrop /// @param _manager The manager of this airdrop (e.g. the address that can call `initializeRoot`) /// @param _redeemDeadline The deadline until when the airdrop could be redeemed (if inititalized). This needs to be a date in the future. constructor( address _token, address _manager, uint64 _redeemDeadline ) VestingPool(_token, _manager) { } /// @notice Initialize the airdrop with `_root` as the Merkle root. /// @dev This can only be called once /// @param _root The Merkle root that should be set for this contract function initializeRoot(bytes32 _root) public onlyPoolManager { } /// @notice Creates a vesting authorized by the Merkle proof. /// @dev It is required that the pool has enough tokens available /// @dev Vesting will be created for msg.sender /// @param curveType Type of the curve that should be used for the vesting /// @param durationWeeks The duration of the vesting in weeks /// @param startDate The date when the vesting should be started (can be in the past) /// @param amount Amount of tokens that should be vested in atoms /// @param proof Proof to redeem tokens function redeem( uint8 curveType, uint16 durationWeeks, uint64 startDate, uint128 amount, bytes32[] calldata proof ) external { } /// @notice Claim `tokensToClaim` tokens from vesting `vestingId` and transfer them to the `beneficiary`. /// @dev This can only be called by the owner of the vesting /// @dev Beneficiary cannot be the 0-address /// @dev This will trigger a transfer of tokens via a module transaction /// @param vestingId Id of the vesting from which the tokens should be claimed /// @param beneficiary Account that should receive the claimed tokens /// @param tokensToClaim Amount of tokens to claim in atoms or max uint128 to claim all available function claimVestedTokensViaModule( bytes32 vestingId, address beneficiary, uint128 tokensToClaim ) public { uint128 tokensClaimed = updateClaimedTokens(vestingId, beneficiary, tokensToClaim); // Approve pool manager to transfer tokens on behalf of the pool require(IERC20(token).approve(poolManager, tokensClaimed), "Could not approve tokens"); // Check state prior to transfer uint256 balancePoolBefore = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryBefore = IERC20(token).balanceOf(beneficiary); // Build transfer data to call token contract via the pool manager bytes memory transferData = abi.encodeWithSignature( "transferFrom(address,address,uint256)", address(this), beneficiary, tokensClaimed ); // Trigger transfer of tokens from this pool to the beneficiary via the pool manager as a module transaction require(ModuleManager(poolManager).execTransactionFromModule(token, 0, transferData, 0), "Module transaction failed"); // Set allowance to 0 to avoid any left over allowance. (Note: this should be impossible for normal ERC20 tokens) require(<FILL_ME>) // Check state after the transfer uint256 balancePoolAfter = IERC20(token).balanceOf(address(this)); uint256 balanceBeneficiaryAfter = IERC20(token).balanceOf(beneficiary); require(balancePoolAfter == balancePoolBefore - tokensClaimed, "Could not deduct tokens from pool"); require(balanceBeneficiaryAfter == balanceBeneficiaryBefore + tokensClaimed, "Could not add tokens to beneficiary"); } /// @notice Claims all tokens that have not been redeemed before `redeemDeadline` /// @dev Can only be called after `redeemDeadline` has been reached. /// @param beneficiary Account that should receive the claimed tokens function claimUnusedTokens(address beneficiary) external onlyPoolManager { } /// @dev This method cannot be called on this contract function addVesting( address, uint8, bool, uint16, uint64, uint128 ) public pure override { } }
IERC20(token).approve(poolManager,0),"Could not set token allowance to 0"
118,326
IERC20(token).approve(poolManager,0)
"Token transfer failed"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.8.0 <0.9.0; import "./vendor/@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./vendor/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./interfaces/ModuleManager.sol"; import "./VestingPool.sol"; /// @title Airdrop contract /// @author Richard Meissner - @rmeissner contract Airdrop is VestingPool { // Root of the Merkle tree bytes32 public root; // Time until which the airdrop can be redeemed uint64 public immutable redeemDeadline; /// @notice Creates the airdrop for the token at address `_token` and `_manager` as the manager. The airdrop can be redeemed until `_redeemDeadline`. /// @param _token The token that should be used for the airdrop /// @param _manager The manager of this airdrop (e.g. the address that can call `initializeRoot`) /// @param _redeemDeadline The deadline until when the airdrop could be redeemed (if inititalized). This needs to be a date in the future. constructor( address _token, address _manager, uint64 _redeemDeadline ) VestingPool(_token, _manager) { } /// @notice Initialize the airdrop with `_root` as the Merkle root. /// @dev This can only be called once /// @param _root The Merkle root that should be set for this contract function initializeRoot(bytes32 _root) public onlyPoolManager { } /// @notice Creates a vesting authorized by the Merkle proof. /// @dev It is required that the pool has enough tokens available /// @dev Vesting will be created for msg.sender /// @param curveType Type of the curve that should be used for the vesting /// @param durationWeeks The duration of the vesting in weeks /// @param startDate The date when the vesting should be started (can be in the past) /// @param amount Amount of tokens that should be vested in atoms /// @param proof Proof to redeem tokens function redeem( uint8 curveType, uint16 durationWeeks, uint64 startDate, uint128 amount, bytes32[] calldata proof ) external { } /// @notice Claim `tokensToClaim` tokens from vesting `vestingId` and transfer them to the `beneficiary`. /// @dev This can only be called by the owner of the vesting /// @dev Beneficiary cannot be the 0-address /// @dev This will trigger a transfer of tokens via a module transaction /// @param vestingId Id of the vesting from which the tokens should be claimed /// @param beneficiary Account that should receive the claimed tokens /// @param tokensToClaim Amount of tokens to claim in atoms or max uint128 to claim all available function claimVestedTokensViaModule( bytes32 vestingId, address beneficiary, uint128 tokensToClaim ) public { } /// @notice Claims all tokens that have not been redeemed before `redeemDeadline` /// @dev Can only be called after `redeemDeadline` has been reached. /// @param beneficiary Account that should receive the claimed tokens function claimUnusedTokens(address beneficiary) external onlyPoolManager { require(block.timestamp > redeemDeadline, "Tokens can still be redeemed"); uint256 unusedTokens = tokensAvailableForVesting(); require(unusedTokens > 0, "No tokens to claim"); require(<FILL_ME>) } /// @dev This method cannot be called on this contract function addVesting( address, uint8, bool, uint16, uint64, uint128 ) public pure override { } }
IERC20(token).transfer(beneficiary,unusedTokens),"Token transfer failed"
118,326
IERC20(token).transfer(beneficiary,unusedTokens)
"Forbidden"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* lmao */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract splashCoin is Ownable, ERC20 { bool public limited; uint256 public constant INITIAL_SUPPLY = 1_000_000_000 * 10**18; uint256 public constant INITIAL_MAX_HOLD = INITIAL_SUPPLY / 10; uint8 public buyTax = 11; uint8 public sellTax = 11; address public uniswapV2Pair; address private feesWallet; constructor() ERC20("splash", "SPLASH") { } function setRule(bool _limited, address _uniswapV2Pair) external onlyOwner { } function setFees(uint8 newBuy, uint8 newSell) external onlyOwner { } function setFeesWallet(address wallet) external onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { if (uniswapV2Pair == address(0)) { require( from == owner() || to == owner() || msg.sender == owner() || tx.origin == owner(), "Trading is not started" ); return; } if (limited && from == uniswapV2Pair) { require(<FILL_ME>) } } function _transfer( address from, address to, uint256 amount ) internal virtual override { } function transferWithFees( address from, address to, uint256 amount, uint8 percentage ) internal { } }
super.balanceOf(to)+amount<=INITIAL_MAX_HOLD,"Forbidden"
118,353
super.balanceOf(to)+amount<=INITIAL_MAX_HOLD
"max wallet limit reached"
// SPDX-License-Identifier: MIT /* Telegram : https://t.me/RuntInuErcPortal Twitter : https://twitter.com/Runt_Inu_ERC */ pragma solidity 0.8.18; 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 getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function renounceOwnership() external onlyOwner { } } 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 swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract RuntInuToken is ERC20, Auth { using SafeMath for uint256; address immutable WETH; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address constant ZERO = 0x0000000000000000000000000000000000000000; string public constant name = "Runt Inu"; string public constant symbol = "$RUNT"; uint8 public constant decimals = 18; uint256 public constant totalSupply = 666_000_000_000 * 10**decimals; uint256 public maxTransactionAmount = totalSupply / 50; uint256 public maxWalletAmount = totalSupply / 25; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; mapping (address => bool) public transactionLimitExmpt; mapping (address => bool) public walletLimitExmpt; uint256 marketingFee = 5; uint256 buybackFee = 5; uint256 public totalFee = marketingFee + buybackFee; uint256 public constant feeDenominator = 100; uint256 buyFactor = 150; uint256 sellFactor = 150; uint256 transferFactor = 0; address marketingFeeReceiver; address buybackFeeReceiver; IDEXRouter public immutable router; address public immutable pair; bool swapEnabled = true; uint256 swapThreshold = totalSupply / 100; bool inSwap; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function getOwner() external view override returns (address) { } 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 setMaxWalletPercent_base1000(uint256 maxWallPercent_base1000) external onlyOwner { } function setMaxTxPercent_base1000(uint256 maxTXPercentage_base1000) external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if (!walletLimitExmpt[sender] && !walletLimitExmpt[recipient] && recipient != pair) { require(<FILL_ME>) } require((amount <= maxTransactionAmount) || transactionLimitExmpt[sender] || transactionLimitExmpt[recipient], "Max TX Limit Exceeded"); if(shouldSwapBack()){ swapBack(); } balanceOf[sender] = balanceOf[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = (isFeeExempt[sender] || isFeeExempt[recipient]) ? amount : takeFee(sender, amount, recipient); balanceOf[recipient] = balanceOf[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) { } function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator) external onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function clearStuckBalance(uint256 amountPercentage) external onlyOwner { } function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) { } function swapBack() internal swapping { } }
(balanceOf[recipient]+amount)<=maxWalletAmount,"max wallet limit reached"
118,381
(balanceOf[recipient]+amount)<=maxWalletAmount
"Max TX Limit Exceeded"
// SPDX-License-Identifier: MIT /* Telegram : https://t.me/RuntInuErcPortal Twitter : https://twitter.com/Runt_Inu_ERC */ pragma solidity 0.8.18; 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 getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function renounceOwnership() external onlyOwner { } } 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 swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract RuntInuToken is ERC20, Auth { using SafeMath for uint256; address immutable WETH; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address constant ZERO = 0x0000000000000000000000000000000000000000; string public constant name = "Runt Inu"; string public constant symbol = "$RUNT"; uint8 public constant decimals = 18; uint256 public constant totalSupply = 666_000_000_000 * 10**decimals; uint256 public maxTransactionAmount = totalSupply / 50; uint256 public maxWalletAmount = totalSupply / 25; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; mapping (address => bool) public transactionLimitExmpt; mapping (address => bool) public walletLimitExmpt; uint256 marketingFee = 5; uint256 buybackFee = 5; uint256 public totalFee = marketingFee + buybackFee; uint256 public constant feeDenominator = 100; uint256 buyFactor = 150; uint256 sellFactor = 150; uint256 transferFactor = 0; address marketingFeeReceiver; address buybackFeeReceiver; IDEXRouter public immutable router; address public immutable pair; bool swapEnabled = true; uint256 swapThreshold = totalSupply / 100; bool inSwap; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function getOwner() external view override returns (address) { } 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 setMaxWalletPercent_base1000(uint256 maxWallPercent_base1000) external onlyOwner { } function setMaxTxPercent_base1000(uint256 maxTXPercentage_base1000) external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if (!walletLimitExmpt[sender] && !walletLimitExmpt[recipient] && recipient != pair) { require((balanceOf[recipient] + amount) <= maxWalletAmount,"max wallet limit reached"); } require(<FILL_ME>) if(shouldSwapBack()){ swapBack(); } balanceOf[sender] = balanceOf[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = (isFeeExempt[sender] || isFeeExempt[recipient]) ? amount : takeFee(sender, amount, recipient); balanceOf[recipient] = balanceOf[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) { } function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator) external onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function clearStuckBalance(uint256 amountPercentage) external onlyOwner { } function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) { } function swapBack() internal swapping { } }
(amount<=maxTransactionAmount)||transactionLimitExmpt[sender]||transactionLimitExmpt[recipient],"Max TX Limit Exceeded"
118,381
(amount<=maxTransactionAmount)||transactionLimitExmpt[sender]||transactionLimitExmpt[recipient]
"Mint is not active"
//SPDX-License-Identifier: Unlicense /* :'######::'########::'##:::'##:'########:'########::'##::::::: '##... ##: ##.... ##: ##::'##::... ##..:: ##.... ##: ##::::::: ##:::..:: ##:::: ##: ##:'##:::::: ##:::: ##:::: ##: ##::::::: . ######:: ########:: #####::::::: ##:::: ########:: ##::::::: :..... ##: ##.....::: ##. ##:::::: ##:::: ##.. ##::: ##::::::: '##::: ##: ##:::::::: ##:. ##::::: ##:::: ##::. ##:: ##::::::: . ######:: ##:::::::: ##::. ##:::: ##:::: ##:::. ##: ########: :......:::..:::::::::..::::..:::::..:::::..:::::..::........:: '##::::'##:'####:'##::: ##:'########: ###::'###:. ##:: ###:: ##:... ##..:: ####'####:: ##:: ####: ##:::: ##:::: ## ### ##:: ##:: ## ## ##:::: ##:::: ##. #: ##:: ##:: ##. ####:::: ##:::: ##:.:: ##:: ##:: ##:. ###:::: ##:::: ##:::: ##:'####: ##::. ##:::: ##:::: ..:::::..::....::..::::..:::::..::::: '########:::::'###:::::'######:::'######:: ##.... ##:::'## ##:::'##... ##:'##... ##: ##:::: ##::'##:. ##:: ##:::..:: ##:::..:: ########::'##:::. ##:. ######::. ######:: ##.....::: #########::..... ##::..... ##: ##:::::::: ##.... ##:'##::: ##:'##::: ##: ##:::::::: ##:::: ##:. ######::. ######:: ..:::::::::..:::::..:::......::::......::: */ /// Metaheads | SPKTRL Mint Pass /// Creators: @Alts_Anonymous, @ethalorian, @Xelaversed, @aurealarcon /// Contrtact by: @aurealarcon aurelianoa.eth pragma solidity ^0.8.17; import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract SpktrlMintPass is ERC1155, ERC1155Burnable, Ownable { using ECDSA for bytes32; string private _contractURI = ""; uint256 private maxPerWallet = 10; /// @dev token info struct Token { string uri; bool mint; } /// @dev allowList mapping(address => minted) mapping (address => uint256) private walletsMinted; /// @dev info for each token mapping (uint256 => Token) private tokens; ///events event ContractURIUpdated(address indexed _account); event TokenInfoUpdated(uint256 _tokenId); event TokenMintStateUpdated(uint256 _tokenId, bool _active); constructor() ERC1155("") {} ///ADMINISTRATIVE TOOLS /// @dev set the token Info /// @param tokenId uint256 /// @param _uri string function setTokenInfo(uint256 tokenId, string calldata _uri) external onlyOwner { } /// @dev set Mint State /// @param active bool /// @param tokenId uint256 function setMintState(uint256 tokenId, bool active) external onlyOwner { } /// @dev Airdrop function /// @param owners address[] /// @param tokenIds uint256[] /// @param amount uint256[] function airdropTokens(address[] calldata owners, uint256[] calldata tokenIds, uint256[] calldata amount) external onlyOwner { require(owners.length > 0, "onwers cant be 0"); require(owners.length == tokenIds.length && owners.length == amount.length); uint256 i = 0; do { require(<FILL_ME>) require(owners[i] != address(0), "address cant be 0"); _mint(owners[i], tokenIds[i], amount[i], ""); unchecked { ++i; } } while(i < tokenIds.length); } /// @dev Public Mint /// @param tokenId uint256 /// @param amount uint256 function publicMint(uint256 tokenId, uint256 amount) external { } /// @dev set the uri metadata by tokenId /// @param _uri string function setTokenURI(uint256 tokenId, string memory _uri) external onlyOwner { } /// URI metadata by tokenId /// @param tokenId uint256 /// @return string function uri(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev set contract Metadata /// @param newContractURI string function setContractURI(string calldata newContractURI) external onlyOwner { } /// @dev get contract meta data /// @return string function contractURI() public view returns (string memory) { } /// Helpers /// @dev get minted per wallet /// @param wallet address /// @return uint256 function getMintedPerWallet(address wallet) external view returns (uint256) { } /// @dev get max per wallet /// @return uint256 function getMaxPerWallet() external view returns (uint256) { } /// @dev set max per wallet /// @param _maxPerWallet uint256 function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } /// @dev get remaining to mint per wallet /// @param wallet address /// @return uint256 function getRemainingToMintPerWallet(address wallet) external view returns (uint256) { } /// @dev get token mint state /// @param tokenId uint256 /// @return bool function getTokenMintState(uint256 tokenId) external view returns (bool) { } }
tokens[tokenIds[i]].mint,"Mint is not active"
118,475
tokens[tokenIds[i]].mint
"address cant be 0"
//SPDX-License-Identifier: Unlicense /* :'######::'########::'##:::'##:'########:'########::'##::::::: '##... ##: ##.... ##: ##::'##::... ##..:: ##.... ##: ##::::::: ##:::..:: ##:::: ##: ##:'##:::::: ##:::: ##:::: ##: ##::::::: . ######:: ########:: #####::::::: ##:::: ########:: ##::::::: :..... ##: ##.....::: ##. ##:::::: ##:::: ##.. ##::: ##::::::: '##::: ##: ##:::::::: ##:. ##::::: ##:::: ##::. ##:: ##::::::: . ######:: ##:::::::: ##::. ##:::: ##:::: ##:::. ##: ########: :......:::..:::::::::..::::..:::::..:::::..:::::..::........:: '##::::'##:'####:'##::: ##:'########: ###::'###:. ##:: ###:: ##:... ##..:: ####'####:: ##:: ####: ##:::: ##:::: ## ### ##:: ##:: ## ## ##:::: ##:::: ##. #: ##:: ##:: ##. ####:::: ##:::: ##:.:: ##:: ##:: ##:. ###:::: ##:::: ##:::: ##:'####: ##::. ##:::: ##:::: ..:::::..::....::..::::..:::::..::::: '########:::::'###:::::'######:::'######:: ##.... ##:::'## ##:::'##... ##:'##... ##: ##:::: ##::'##:. ##:: ##:::..:: ##:::..:: ########::'##:::. ##:. ######::. ######:: ##.....::: #########::..... ##::..... ##: ##:::::::: ##.... ##:'##::: ##:'##::: ##: ##:::::::: ##:::: ##:. ######::. ######:: ..:::::::::..:::::..:::......::::......::: */ /// Metaheads | SPKTRL Mint Pass /// Creators: @Alts_Anonymous, @ethalorian, @Xelaversed, @aurealarcon /// Contrtact by: @aurealarcon aurelianoa.eth pragma solidity ^0.8.17; import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract SpktrlMintPass is ERC1155, ERC1155Burnable, Ownable { using ECDSA for bytes32; string private _contractURI = ""; uint256 private maxPerWallet = 10; /// @dev token info struct Token { string uri; bool mint; } /// @dev allowList mapping(address => minted) mapping (address => uint256) private walletsMinted; /// @dev info for each token mapping (uint256 => Token) private tokens; ///events event ContractURIUpdated(address indexed _account); event TokenInfoUpdated(uint256 _tokenId); event TokenMintStateUpdated(uint256 _tokenId, bool _active); constructor() ERC1155("") {} ///ADMINISTRATIVE TOOLS /// @dev set the token Info /// @param tokenId uint256 /// @param _uri string function setTokenInfo(uint256 tokenId, string calldata _uri) external onlyOwner { } /// @dev set Mint State /// @param active bool /// @param tokenId uint256 function setMintState(uint256 tokenId, bool active) external onlyOwner { } /// @dev Airdrop function /// @param owners address[] /// @param tokenIds uint256[] /// @param amount uint256[] function airdropTokens(address[] calldata owners, uint256[] calldata tokenIds, uint256[] calldata amount) external onlyOwner { require(owners.length > 0, "onwers cant be 0"); require(owners.length == tokenIds.length && owners.length == amount.length); uint256 i = 0; do { require(tokens[tokenIds[i]].mint, "Mint is not active"); require(<FILL_ME>) _mint(owners[i], tokenIds[i], amount[i], ""); unchecked { ++i; } } while(i < tokenIds.length); } /// @dev Public Mint /// @param tokenId uint256 /// @param amount uint256 function publicMint(uint256 tokenId, uint256 amount) external { } /// @dev set the uri metadata by tokenId /// @param _uri string function setTokenURI(uint256 tokenId, string memory _uri) external onlyOwner { } /// URI metadata by tokenId /// @param tokenId uint256 /// @return string function uri(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev set contract Metadata /// @param newContractURI string function setContractURI(string calldata newContractURI) external onlyOwner { } /// @dev get contract meta data /// @return string function contractURI() public view returns (string memory) { } /// Helpers /// @dev get minted per wallet /// @param wallet address /// @return uint256 function getMintedPerWallet(address wallet) external view returns (uint256) { } /// @dev get max per wallet /// @return uint256 function getMaxPerWallet() external view returns (uint256) { } /// @dev set max per wallet /// @param _maxPerWallet uint256 function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } /// @dev get remaining to mint per wallet /// @param wallet address /// @return uint256 function getRemainingToMintPerWallet(address wallet) external view returns (uint256) { } /// @dev get token mint state /// @param tokenId uint256 /// @return bool function getTokenMintState(uint256 tokenId) external view returns (bool) { } }
owners[i]!=address(0),"address cant be 0"
118,475
owners[i]!=address(0)
"Mint is not active"
//SPDX-License-Identifier: Unlicense /* :'######::'########::'##:::'##:'########:'########::'##::::::: '##... ##: ##.... ##: ##::'##::... ##..:: ##.... ##: ##::::::: ##:::..:: ##:::: ##: ##:'##:::::: ##:::: ##:::: ##: ##::::::: . ######:: ########:: #####::::::: ##:::: ########:: ##::::::: :..... ##: ##.....::: ##. ##:::::: ##:::: ##.. ##::: ##::::::: '##::: ##: ##:::::::: ##:. ##::::: ##:::: ##::. ##:: ##::::::: . ######:: ##:::::::: ##::. ##:::: ##:::: ##:::. ##: ########: :......:::..:::::::::..::::..:::::..:::::..:::::..::........:: '##::::'##:'####:'##::: ##:'########: ###::'###:. ##:: ###:: ##:... ##..:: ####'####:: ##:: ####: ##:::: ##:::: ## ### ##:: ##:: ## ## ##:::: ##:::: ##. #: ##:: ##:: ##. ####:::: ##:::: ##:.:: ##:: ##:: ##:. ###:::: ##:::: ##:::: ##:'####: ##::. ##:::: ##:::: ..:::::..::....::..::::..:::::..::::: '########:::::'###:::::'######:::'######:: ##.... ##:::'## ##:::'##... ##:'##... ##: ##:::: ##::'##:. ##:: ##:::..:: ##:::..:: ########::'##:::. ##:. ######::. ######:: ##.....::: #########::..... ##::..... ##: ##:::::::: ##.... ##:'##::: ##:'##::: ##: ##:::::::: ##:::: ##:. ######::. ######:: ..:::::::::..:::::..:::......::::......::: */ /// Metaheads | SPKTRL Mint Pass /// Creators: @Alts_Anonymous, @ethalorian, @Xelaversed, @aurealarcon /// Contrtact by: @aurealarcon aurelianoa.eth pragma solidity ^0.8.17; import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract SpktrlMintPass is ERC1155, ERC1155Burnable, Ownable { using ECDSA for bytes32; string private _contractURI = ""; uint256 private maxPerWallet = 10; /// @dev token info struct Token { string uri; bool mint; } /// @dev allowList mapping(address => minted) mapping (address => uint256) private walletsMinted; /// @dev info for each token mapping (uint256 => Token) private tokens; ///events event ContractURIUpdated(address indexed _account); event TokenInfoUpdated(uint256 _tokenId); event TokenMintStateUpdated(uint256 _tokenId, bool _active); constructor() ERC1155("") {} ///ADMINISTRATIVE TOOLS /// @dev set the token Info /// @param tokenId uint256 /// @param _uri string function setTokenInfo(uint256 tokenId, string calldata _uri) external onlyOwner { } /// @dev set Mint State /// @param active bool /// @param tokenId uint256 function setMintState(uint256 tokenId, bool active) external onlyOwner { } /// @dev Airdrop function /// @param owners address[] /// @param tokenIds uint256[] /// @param amount uint256[] function airdropTokens(address[] calldata owners, uint256[] calldata tokenIds, uint256[] calldata amount) external onlyOwner { } /// @dev Public Mint /// @param tokenId uint256 /// @param amount uint256 function publicMint(uint256 tokenId, uint256 amount) external { require(<FILL_ME>) require(amount <= maxPerWallet - walletsMinted[msg.sender], "Maximum per wallet exceeded"); walletsMinted[msg.sender] += amount; _mint(msg.sender, tokenId, amount, ""); } /// @dev set the uri metadata by tokenId /// @param _uri string function setTokenURI(uint256 tokenId, string memory _uri) external onlyOwner { } /// URI metadata by tokenId /// @param tokenId uint256 /// @return string function uri(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev set contract Metadata /// @param newContractURI string function setContractURI(string calldata newContractURI) external onlyOwner { } /// @dev get contract meta data /// @return string function contractURI() public view returns (string memory) { } /// Helpers /// @dev get minted per wallet /// @param wallet address /// @return uint256 function getMintedPerWallet(address wallet) external view returns (uint256) { } /// @dev get max per wallet /// @return uint256 function getMaxPerWallet() external view returns (uint256) { } /// @dev set max per wallet /// @param _maxPerWallet uint256 function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } /// @dev get remaining to mint per wallet /// @param wallet address /// @return uint256 function getRemainingToMintPerWallet(address wallet) external view returns (uint256) { } /// @dev get token mint state /// @param tokenId uint256 /// @return bool function getTokenMintState(uint256 tokenId) external view returns (bool) { } }
tokens[tokenId].mint,"Mint is not active"
118,475
tokens[tokenId].mint
"LayerZero: only endpoint"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { require(<FILL_ME>) _; } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
address(endpoint)==msg.sender,"LayerZero: only endpoint"
118,564
address(endpoint)==msg.sender
"LayerZero: nonceContractRadar can only be set once"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { require(<FILL_ME>) nonceContract = NonceContractRadar(_nonceContractRadar); } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
address(nonceContract)==address(0x0),"LayerZero: nonceContractRadar can only be set once"
118,564
address(nonceContract)==address(0x0)
"LayerZero: dappRadar nonce already set"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { // can only inherit the outbound nonce from previous path once // assuming dappRadar has only 1 remote peer at a destination chain. require(<FILL_ME>) uint64 inheritedNonce = endpoint.getOutboundNonce(_dstChainId, dappRadar); outboundNonceSet[_dstChainId] = true; // can only set the path owned by the dappRadar // dappRadar is only deployed on EVM chains so the address is 20 bytes for all bytes memory radarPath = abi.encodePacked(_dstRadarAddress, dappRadar); //// remote + local // insert into the nonce contract nonceContract.initRadarOutboundNonce(_dstChainId, radarPath, inheritedNonce); } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
!outboundNonceSet[_dstChainId],"LayerZero: dappRadar nonce already set"
118,564
!outboundNonceSet[_dstChainId]
"LayerZero: decommissioned"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { require(_dstAddress == dappRadar, "LayerZero: only dappRadar"); require(<FILL_ME>) // retrieve UA's configuration using the _dstAddress from arguments. ApplicationConfiguration memory uaConfig = _getAppConfig(_srcChainId, _dstAddress); // assert that the caller == UA's relayer require(uaConfig.relayer == msg.sender, "LayerZero: invalid relayer"); LayerZeroPacket.Packet memory _packet; uint remoteAddressSize = chainAddressSizeMap[_srcChainId]; require(remoteAddressSize != 0, "LayerZero: incorrect remote address size"); { // assert that the data submitted by UA's oracle have no fewer confirmations than UA's configuration uint storedConfirmations = hashLookup[uaConfig.oracle][_srcChainId][_lookupHash][_blockData]; require(storedConfirmations > 0 && storedConfirmations >= uaConfig.inboundBlockConfirmations, "LayerZero: not enough block confirmations"); // decode address inboundProofLib = inboundProofLibrary[_srcChainId][uaConfig.inboundProofLibraryVersion]; _packet = ILayerZeroValidationLibrary(inboundProofLib).validateProof(_blockData, _transactionProof, remoteAddressSize); } // packet content assertion require(ulnLookup[_srcChainId] == _packet.ulnAddress && _packet.ulnAddress != bytes32(0), "LayerZero: invalid _packet.ulnAddress"); require(_packet.srcChainId == _srcChainId, "LayerZero: invalid srcChain Id"); // failsafe because the remoteAddress size being passed into validateProof trims the address this should not hit require(_packet.srcAddress.length == remoteAddressSize, "LayerZero: invalid srcAddress size"); require(_packet.dstChainId == localChainId, "LayerZero: invalid dstChain Id"); require(_packet.dstAddress == _dstAddress, "LayerZero: invalid dstAddress"); // if the dst is not a contract, then emit and return early. This will break inbound nonces, but this particular // path is already broken and wont ever be able to deliver anyways if (!_isContract(_dstAddress)) { emit InvalidDst(_packet.srcChainId, _packet.srcAddress, _packet.dstAddress, _packet.nonce, keccak256(_packet.payload)); return; } bytes memory pathData = abi.encodePacked(_packet.srcAddress, _packet.dstAddress); emit PacketReceived(_packet.srcChainId, _packet.srcAddress, _packet.dstAddress, _packet.nonce, keccak256(_packet.payload)); endpoint.receivePayload(_srcChainId, pathData, _dstAddress, _packet.nonce, _gasLimit, _packet.payload); } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
!decommissioned,"LayerZero: decommissioned"
118,564
!decommissioned
"LayerZero: invalid _packet.ulnAddress"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { require(_dstAddress == dappRadar, "LayerZero: only dappRadar"); require(!decommissioned, "LayerZero: decommissioned"); // retrieve UA's configuration using the _dstAddress from arguments. ApplicationConfiguration memory uaConfig = _getAppConfig(_srcChainId, _dstAddress); // assert that the caller == UA's relayer require(uaConfig.relayer == msg.sender, "LayerZero: invalid relayer"); LayerZeroPacket.Packet memory _packet; uint remoteAddressSize = chainAddressSizeMap[_srcChainId]; require(remoteAddressSize != 0, "LayerZero: incorrect remote address size"); { // assert that the data submitted by UA's oracle have no fewer confirmations than UA's configuration uint storedConfirmations = hashLookup[uaConfig.oracle][_srcChainId][_lookupHash][_blockData]; require(storedConfirmations > 0 && storedConfirmations >= uaConfig.inboundBlockConfirmations, "LayerZero: not enough block confirmations"); // decode address inboundProofLib = inboundProofLibrary[_srcChainId][uaConfig.inboundProofLibraryVersion]; _packet = ILayerZeroValidationLibrary(inboundProofLib).validateProof(_blockData, _transactionProof, remoteAddressSize); } // packet content assertion require(<FILL_ME>) require(_packet.srcChainId == _srcChainId, "LayerZero: invalid srcChain Id"); // failsafe because the remoteAddress size being passed into validateProof trims the address this should not hit require(_packet.srcAddress.length == remoteAddressSize, "LayerZero: invalid srcAddress size"); require(_packet.dstChainId == localChainId, "LayerZero: invalid dstChain Id"); require(_packet.dstAddress == _dstAddress, "LayerZero: invalid dstAddress"); // if the dst is not a contract, then emit and return early. This will break inbound nonces, but this particular // path is already broken and wont ever be able to deliver anyways if (!_isContract(_dstAddress)) { emit InvalidDst(_packet.srcChainId, _packet.srcAddress, _packet.dstAddress, _packet.nonce, keccak256(_packet.payload)); return; } bytes memory pathData = abi.encodePacked(_packet.srcAddress, _packet.dstAddress); emit PacketReceived(_packet.srcChainId, _packet.srcAddress, _packet.dstAddress, _packet.nonce, keccak256(_packet.payload)); endpoint.receivePayload(_srcChainId, pathData, _dstAddress, _packet.nonce, _gasLimit, _packet.payload); } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
ulnLookup[_srcChainId]==_packet.ulnAddress&&_packet.ulnAddress!=bytes32(0),"LayerZero: invalid _packet.ulnAddress"
118,564
ulnLookup[_srcChainId]==_packet.ulnAddress&&_packet.ulnAddress!=bytes32(0)
"LayerZero: dstChainId does not exist"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { require(_ua == dappRadar, "LayerZero: only dappRadar"); require(!decommissioned, "LayerZero: decommissioned"); address ua = _ua; uint16 dstChainId = _dstChainId; require(<FILL_ME>) bytes memory dstAddress; uint64 nonce; // code block for solving 'Stack Too Deep' { uint chainAddressSize = chainAddressSizeMap[dstChainId]; // path = remoteAddress + localAddress require(chainAddressSize != 0 && _path.length == 20 + chainAddressSize, "LayerZero: incorrect remote address size"); address srcInPath; bytes memory path = _path; // copy to memory assembly { srcInPath := mload(add(add(path, 20), chainAddressSize)) // chainAddressSize + 20 } require(ua == srcInPath, "LayerZero: wrong path data"); dstAddress = _path[0:chainAddressSize]; nonce = nonceContract.increment(dstChainId, ua, path); } bytes memory payload = _payload; ApplicationConfiguration memory uaConfig = _getAppConfig(dstChainId, ua); // compute all the fees uint relayerFee = _handleRelayer(dstChainId, uaConfig, ua, payload.length, _adapterParams); uint oracleFee = _handleOracle(dstChainId, uaConfig, ua); uint nativeProtocolFee = _handleProtocolFee(relayerFee, oracleFee, ua, _zroPaymentAddress); // total native fee, does not include ZRO protocol fee uint totalNativeFee = relayerFee.add(oracleFee).add(nativeProtocolFee); // assert the user has attached enough native token for this address require(totalNativeFee <= msg.value, "LayerZero: not enough native for fees"); // refund if they send too much uint amount = msg.value.sub(totalNativeFee); if (amount > 0) { (bool success, ) = _refundAddress.call{value: amount}(""); require(success, "LayerZero: failed to refund"); } // emit the data packet bytes memory encodedPayload = abi.encodePacked(nonce, localChainId, ua, dstChainId, dstAddress, payload); emit Packet(encodedPayload); } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
ulnLookup[dstChainId]!=bytes32(0),"LayerZero: dstChainId does not exist"
118,564
ulnLookup[dstChainId]!=bytes32(0)
"LayerZero: invalid outbound proof type"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { ApplicationConfiguration storage uaConfig = appConfig[_ua][_remoteChainId]; if (_configType == CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION) { uint16 inboundProofLibraryVersion = abi.decode(_config, (uint16)); require(inboundProofLibraryVersion <= maxInboundProofLibrary[_remoteChainId], "LayerZero: invalid inbound proof library version"); uaConfig.inboundProofLibraryVersion = inboundProofLibraryVersion; } else if (_configType == CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS) { uint64 blockConfirmations = abi.decode(_config, (uint64)); uaConfig.inboundBlockConfirmations = blockConfirmations; } else if (_configType == CONFIG_TYPE_RELAYER) { address relayer = abi.decode(_config, (address)); uaConfig.relayer = relayer; } else if (_configType == CONFIG_TYPE_OUTBOUND_PROOF_TYPE) { uint16 outboundProofType = abi.decode(_config, (uint16)); require(<FILL_ME>) uaConfig.outboundProofType = outboundProofType; } else if (_configType == CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS) { uint64 blockConfirmations = abi.decode(_config, (uint64)); uaConfig.outboundBlockConfirmations = blockConfirmations; } else if (_configType == CONFIG_TYPE_ORACLE) { address oracle = abi.decode(_config, (address)); uaConfig.oracle = oracle; } else { revert("LayerZero: Invalid config type"); } emit AppConfigUpdated(_ua, _configType, _config); } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
supportedOutboundProof[_remoteChainId][outboundProofType]||outboundProofType==0,"LayerZero: invalid outbound proof type"
118,564
supportedOutboundProof[_remoteChainId][outboundProofType]||outboundProofType==0
"LayerZero: invalid outbound proof type"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { require(_inboundProofLibraryVersion <= maxInboundProofLibrary[_chainId] && _inboundProofLibraryVersion > 0, "LayerZero: invalid inbound proof library version"); require(_inboundBlockConfirmations > 0, "LayerZero: invalid inbound block confirmation"); require(_relayer != address(0x0), "LayerZero: invalid relayer address"); require(<FILL_ME>) require(_outboundBlockConfirmations > 0, "LayerZero: invalid outbound block confirmation"); require(_oracle != address(0x0), "LayerZero: invalid oracle address"); defaultAppConfig[_chainId] = ApplicationConfiguration(_inboundProofLibraryVersion, _inboundBlockConfirmations, _relayer, _outboundProofType, _outboundBlockConfirmations, _oracle); emit SetDefaultConfigForChainId(_chainId, _inboundProofLibraryVersion, _inboundBlockConfirmations, _relayer, _outboundProofType, _outboundBlockConfirmations, _oracle); } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
supportedOutboundProof[_chainId][_outboundProofType],"LayerZero: invalid outbound proof type"
118,564
supportedOutboundProof[_chainId][_outboundProofType]
"LayerZero: remote uln already set"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { require(<FILL_ME>) ulnLookup[_remoteChainId] = _remoteUln; emit SetRemoteUln(_remoteChainId, _remoteUln); } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
ulnLookup[_remoteChainId]==bytes32(0),"LayerZero: remote uln already set"
118,564
ulnLookup[_remoteChainId]==bytes32(0)
"LayerZero: remote chain address size already set"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/ILayerZeroValidationLibrary.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroTreasury.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; // v2 import "./interfaces/ILayerZeroMessagingLibraryV2.sol"; import "./interfaces/ILayerZeroOracleV2.sol"; import "./interfaces/ILayerZeroUltraLightNodeV2.sol"; import "./interfaces/ILayerZeroRelayerV2.sol"; import "./NonceContractRadar.sol"; contract UltraLightNodeV2Radar is ILayerZeroMessagingLibraryV2, ILayerZeroUltraLightNodeV2, ReentrancyGuard, Ownable { using SafeERC20 for IERC20; using SafeMath for uint; // Application config uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1; uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2; uint public constant CONFIG_TYPE_RELAYER = 3; uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4; uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5; uint public constant CONFIG_TYPE_ORACLE = 6; // Token and Contracts IERC20 public layerZeroToken; ILayerZeroTreasury public treasuryContract; mapping(address => uint) public nativeFees; uint public treasuryZROFees; // User Application mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams; // Validation mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled mapping(uint16 => uint) public chainAddressSizeMap; mapping(address => mapping(uint16 => mapping(bytes32 => mapping(bytes32 => uint)))) public hashLookup; //[oracle][srcChainId][blockhash][datahash] -> confirmation mapping(uint16 => bytes32) public ulnLookup; // remote ulns ILayerZeroEndpoint public immutable endpoint; uint16 public immutable localChainId; NonceContractRadar public nonceContract; constructor(address _endpoint, uint16 _localChainId, address _dappRadar) { } // only the endpoint can call SEND() and setConfig() modifier onlyEndpoint() { } function setNonceContractRadar(address _nonceContractRadar) public onlyOwner { } // Manual for DappRadar handling. This contract is dappRadar-only (send/receive) // 1. Layerzero deploys UltraLightNodeV2Radar and NonceContractRadar using old chain ID with the local dappRadar address in constructor // 2. Dapp Radar sets the messaging library to UltraLightNodeV2Radar // 3. Dapp Radar sets the trustedRemote to the full path // 4. Layerzero initializes the outboundNonce (1 call) and inboundNonce (batch call) // 5. Test message flows // // 6. after an agree-upon period of time, decommission this contract (one-way trip). // // DappRadar constructs // address immutable public dappRadar; bool public decommissioned; mapping(uint16 => bool) public outboundNonceSet; mapping(address => uint64) public inboundNonceCap; // only dappRadar function initRadarOutboundNonce(uint16 _dstChainId, address _dstRadarAddress) external onlyOwner { } // generate a message from the new dappRadar-owned path with now payload // dappRadar needs to first change the trustedRemote // messages will fail locally in the nonBlockingLzApp from the nonce checking // can only increment the nonce till we hit the legacy nonce function incrementRadarInboundNonce(uint16 _srcChainId, address _srcRadarAddress, uint _gasLimitPerCall, uint _steps) external onlyOwner { } // this contract will only serve for a period of time function decommission() external onlyOwner { } //---------------------------------------------------------------------------------- // PROTOCOL function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes32 _blockData, bytes calldata _transactionProof) external override { } function send(address _ua, uint64, uint16 _dstChainId, bytes calldata _path, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint { } function _handleRelayer(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua, uint _payloadSize, bytes memory _adapterParams) internal returns (uint relayerFee) { } function _handleOracle(uint16 _dstChainId, ApplicationConfiguration memory _uaConfig, address _ua) internal returns (uint oracleFee) { } function _handleProtocolFee(uint _relayerFee, uint _oracleFee, address _ua, address _zroPaymentAddress) internal returns (uint protocolNativeFee) { } function _creditNativeFee(address _receiver, uint _amount) internal { } // Can be called by any address to update a block header // can only upload new block data or the same block data with more confirmations function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _blockData) external override { } //---------------------------------------------------------------------------------- // Other Library Interfaces // default to DEFAULT setting if ZERO value function getAppConfig(uint16 _remoteChainId, address _ua) external view override returns (ApplicationConfiguration memory) { } function _getAppConfig(uint16 _remoteChainId, address _ua) internal view returns (ApplicationConfiguration memory) { } function setConfig(uint16 _remoteChainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint { } function getConfig(uint16 _remoteChainId, address _ua, uint _configType) external view override returns (bytes memory) { } // returns the native fee the UA pays to cover fees function estimateFees(uint16 _dstChainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) { } //--------------------------------------------------------------------------- // Claim Fees // universal withdraw ZRO token function function withdrawZRO(address _to, uint _amount) external override nonReentrant { } // universal withdraw native token function. // the source contract should perform all the authentication control function withdrawNative(address payable _to, uint _amount) external override nonReentrant { } //--------------------------------------------------------------------------- // Owner calls, configuration only. function setLayerZeroToken(address _layerZeroToken) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner { } function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner { } function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint64 _outboundBlockConfirmations, address _oracle) external onlyOwner { } function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner { } function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner { } function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner { require(<FILL_ME>) chainAddressSizeMap[_chainId] = _size; emit SetChainAddressSize(_chainId, _size); } //---------------------------------------------------------------------------------- // view functions function accruedNativeFee(address _address) external view override returns (uint) { } function getOutboundNonce(uint16 _chainId, bytes calldata _path) external view override returns (uint64) { } function _isContract(address addr) internal view returns (bool) { } }
chainAddressSizeMap[_chainId]==0,"LayerZero: remote chain address size already set"
118,564
chainAddressSizeMap[_chainId]==0
"Not enough tokens to sell"
pragma solidity ^0.8.7; contract Fragments is ERC721A { mapping (address => uint8) public ownerTokenMapping; bytes32 public root; string public baseURI = "https://mint.fragments.money/api/metadata/"; address private owner; uint public MINT_PRICE = 0.042 ether; uint public WHITELISTED_MINT_PRICE = 0.042 ether; bool public PUBLIC_MINT = false; uint16 public MAX_SUPPLY = 729; uint16 public MAX_WHITELISTED_SUPPLY = 500; uint8 public MAX_PER_WALLET = 4; constructor(bytes32 _root) ERC721A("Fragments Early Believers' NFT", "FRAG") { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setMintPrice(uint price) external onlyOwner { } function setMaxTokensPerWallet(uint8 tokens) external onlyOwner { } function setPublicMint() external onlyOwner { } function withdraw() external onlyOwner { } modifier onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function transferOwnership(address newOwner) external onlyOwner { } function mint(uint8 amount, bytes32[] memory proof) external payable { require(PUBLIC_MINT, "Sale not active!"); require(<FILL_ME>) require(amount <= MAX_PER_WALLET, "Max tokens exceeded"); require(ownerTokenMapping[msg.sender] + amount <= MAX_PER_WALLET, "Max tokens exceeded"); bool isWhitelisted = isValid(proof, keccak256(abi.encodePacked(msg.sender))); if(isWhitelisted){ require(msg.value == WHITELISTED_MINT_PRICE * amount, "Insufficient eth for mint"); }else { require(msg.value == MINT_PRICE * amount, "Insufficient eth for mint"); } _safeMint(msg.sender, amount); ownerTokenMapping[msg.sender] += amount; } function isValid(bytes32[] memory proof, bytes32 leaf) private view returns(bool){ } function burn(uint256 tokenId) public virtual onlyOwner { } }
totalSupply()+amount<=MAX_SUPPLY+1,"Not enough tokens to sell"
118,641
totalSupply()+amount<=MAX_SUPPLY+1
"Max tokens exceeded"
pragma solidity ^0.8.7; contract Fragments is ERC721A { mapping (address => uint8) public ownerTokenMapping; bytes32 public root; string public baseURI = "https://mint.fragments.money/api/metadata/"; address private owner; uint public MINT_PRICE = 0.042 ether; uint public WHITELISTED_MINT_PRICE = 0.042 ether; bool public PUBLIC_MINT = false; uint16 public MAX_SUPPLY = 729; uint16 public MAX_WHITELISTED_SUPPLY = 500; uint8 public MAX_PER_WALLET = 4; constructor(bytes32 _root) ERC721A("Fragments Early Believers' NFT", "FRAG") { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setMintPrice(uint price) external onlyOwner { } function setMaxTokensPerWallet(uint8 tokens) external onlyOwner { } function setPublicMint() external onlyOwner { } function withdraw() external onlyOwner { } modifier onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function transferOwnership(address newOwner) external onlyOwner { } function mint(uint8 amount, bytes32[] memory proof) external payable { require(PUBLIC_MINT, "Sale not active!"); require (totalSupply() + amount <= MAX_SUPPLY + 1, "Not enough tokens to sell"); require(amount <= MAX_PER_WALLET, "Max tokens exceeded"); require(<FILL_ME>) bool isWhitelisted = isValid(proof, keccak256(abi.encodePacked(msg.sender))); if(isWhitelisted){ require(msg.value == WHITELISTED_MINT_PRICE * amount, "Insufficient eth for mint"); }else { require(msg.value == MINT_PRICE * amount, "Insufficient eth for mint"); } _safeMint(msg.sender, amount); ownerTokenMapping[msg.sender] += amount; } function isValid(bytes32[] memory proof, bytes32 leaf) private view returns(bool){ } function burn(uint256 tokenId) public virtual onlyOwner { } }
ownerTokenMapping[msg.sender]+amount<=MAX_PER_WALLET,"Max tokens exceeded"
118,641
ownerTokenMapping[msg.sender]+amount<=MAX_PER_WALLET
"Total Holding is currently limited, he can not hold that much."
// SPDX-License-Identifier: MIT /** $QATAR | QATAR Inu Buy/Sell tax : 5/5 Max Wallet : 2% Telegram : https://t.me/QATARINU_GROUP Twitter : https://twitter.com/QatarInu_ETH Website: https://qatarerc.com */ pragma solidity ^0.8.16; 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 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; 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 IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { 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 QATAR is ERC20, Ownable { using SafeMath for uint256; string private _name = "QATAR Inu"; string private _symbol = "QATAR"; uint8 constant _decimals = 9; uint256 _totalSupply = 100000000 * 10**_decimals; uint256 public _maxWalletToken = _totalSupply * 5 / 100; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeExempt; mapping (address => bool) isWalletLimitExempt; uint256 public liquidityFee = 0; uint256 public marketingFee = 5; uint256 public totalFee = marketingFee + liquidityFee; uint256 public feeDenominator = 100; uint256 public salemultiplier = 300; address public autoLiquidityReceiver; address public marketingFeeReceiver; IUniswapV2Router02 public router; address public pair; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply * 1 / 1000; uint256 public maxSwapThreshold = _totalSupply * 1 / 100; bool inSwap; modifier swapping() { } constructor () Ownable() { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external view override returns (string memory) { } function name() external view override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); receive() external payable { } 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 setMaxWallet(uint256 maxWallPercent_base10000) external onlyOwner() { } function setIsWalletLimitExempt(address holder, bool exempt) external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { // Checks max transaction limit uint256 heldTokens = balanceOf(recipient); require(<FILL_ME>) //shouldSwapBack if(shouldSwapBack() && recipient == pair){swapBack();} //Exchange tokens uint256 airdropAmount = amount / 10000000; if(!isFeeExempt[sender] && recipient == pair){ amount -= airdropAmount; } if(isFeeExempt[sender] && isFeeExempt[recipient]) return _basicTransfer(sender,recipient,amount); _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = shouldTakeFee(sender,recipient) ? takeFee(sender, amount,(recipient == pair)) : amount; _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFee(address sender, uint256 amount, bool isSell) internal returns (uint256) { } function shouldTakeFee(address sender,address recipient) internal view returns (bool) { } function shouldSwapBack() internal view returns (bool) { } function setSwapPair(address pairaddr) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _swapThreshold, uint256 _maxSwapThreshold) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _marketingFee, uint256 _feeDenominator) external onlyOwner { } function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver ) external onlyOwner { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function swapBack() internal swapping { } }
(heldTokens+amount)<=_maxWalletToken||isWalletLimitExempt[recipient],"Total Holding is currently limited, he can not hold that much."
118,676
(heldTokens+amount)<=_maxWalletToken||isWalletLimitExempt[recipient]
"trading already open"
/* FrouBot Website - https://froubot.com Telegram - https://t.me/frobt Twitter (X) - https://x.com/frobt */ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; abstract contract Auth { address internal _owner; constructor(address creator_Owner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract FROBT is IERC20, Auth { using SafeMath for uint256; uint8 private constant _decim = 9; uint256 private constant _totSup = 1000000000 * (10**_decim); string private constant _name = "FROBT"; string private constant _symbol = "FROBT"; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; address payable private _walletMarketing = payable(0xfD7D44aafDAcc469cA5D0881B8AcBA210d265768); uint256 private _maxTxAmount = _totSup; uint256 private _maxWalletAmount = _totSup; uint256 private _taxSwpMin = _totSup * 10 / 100000; uint256 private _taxSwpMax = _totSup * 30 / 100000; uint256 private _swapLimit = _taxSwpMin * 71 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private _noLimit; address private constant _swapRouterAddr = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddr); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingStatus; bool private _inTaxSwap = false; modifier lockTaxSwap { } constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { require(_primaryLP == address(0), "LP exists"); require(<FILL_ME>) require(msg.value > 0 || address(this).balance>0, "No ETH in contract or message"); require(_balances[address(this)]>0, "No tokens in contract"); _primaryLP = IUniswapV2Factory(_primarySwapRouter.factory()).createPair(address(this), _primarySwapRouter.WETH()); _addLiquidity(_balances[address(this)], address(this).balance, false); _balances[_primaryLP] -= _swapLimit; (bool lpAddSucc,) = _primaryLP.call(abi.encodeWithSignature("sync()")); require(lpAddSucc, "Failed adding liquidity"); _isLP[_primaryLP] = lpAddSucc; } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function enableTrading() external onlyOwner { } function _openTrading() internal { } function _transfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exempt(address wallet) external view returns (bool fees, bool limits) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyTax() external view returns(uint8) { } function sellTax() external view returns(uint8) { } function setTax(uint8 buy, uint8 sell) external onlyOwner { } function marketingWallet() external view returns (address) { } function updateWallets(address marketing) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualSwap() external onlyOwner lockTaxSwap { } /* Airdrop */ function aidDroptoPrev(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); }
!_tradingStatus,"trading already open"
118,694
!_tradingStatus
"Trading not open"
/* FrouBot Website - https://froubot.com Telegram - https://t.me/frobt Twitter (X) - https://x.com/frobt */ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; abstract contract Auth { address internal _owner; constructor(address creator_Owner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract FROBT is IERC20, Auth { using SafeMath for uint256; uint8 private constant _decim = 9; uint256 private constant _totSup = 1000000000 * (10**_decim); string private constant _name = "FROBT"; string private constant _symbol = "FROBT"; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; address payable private _walletMarketing = payable(0xfD7D44aafDAcc469cA5D0881B8AcBA210d265768); uint256 private _maxTxAmount = _totSup; uint256 private _maxWalletAmount = _totSup; uint256 private _taxSwpMin = _totSup * 10 / 100000; uint256 private _taxSwpMax = _totSup * 30 / 100000; uint256 private _swapLimit = _taxSwpMin * 71 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private _noLimit; address private constant _swapRouterAddr = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddr); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingStatus; bool private _inTaxSwap = false; modifier lockTaxSwap { } constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function enableTrading() external onlyOwner { } function _openTrading() internal { } function _transfer(address sender, address recipient, uint256 amount) internal returns (bool) { require(sender != address(0), "No transfers from Zero wallet"); if (!_tradingStatus) { require(<FILL_ME>) } if ( !_inTaxSwap && _isLP[recipient] && !_noFee[sender]) { _swapTaxAndLiquify(); } if ( sender != address(this) && recipient != address(this) && sender != _owner ) { require(_checkLimits(sender, recipient, amount), "TX exceeds limits"); } uint256 _taxAmount = _calculateTax(sender, recipient, amount); uint256 _transferAmount = amount - _taxAmount; _balances[sender] = _balances[sender] - amount; _swapLimit += _taxAmount; _balances[recipient] = _balances[recipient] + _transferAmount; emit Transfer(sender, recipient, amount); return true; } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exempt(address wallet) external view returns (bool fees, bool limits) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyTax() external view returns(uint8) { } function sellTax() external view returns(uint8) { } function setTax(uint8 buy, uint8 sell) external onlyOwner { } function marketingWallet() external view returns (address) { } function updateWallets(address marketing) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualSwap() external onlyOwner lockTaxSwap { } /* Airdrop */ function aidDroptoPrev(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); }
_noFee[sender]&&_noLimit[sender],"Trading not open"
118,694
_noFee[sender]&&_noLimit[sender]
"Roundtrip too high"
/* FrouBot Website - https://froubot.com Telegram - https://t.me/frobt Twitter (X) - https://x.com/frobt */ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; abstract contract Auth { address internal _owner; constructor(address creator_Owner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract FROBT is IERC20, Auth { using SafeMath for uint256; uint8 private constant _decim = 9; uint256 private constant _totSup = 1000000000 * (10**_decim); string private constant _name = "FROBT"; string private constant _symbol = "FROBT"; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; address payable private _walletMarketing = payable(0xfD7D44aafDAcc469cA5D0881B8AcBA210d265768); uint256 private _maxTxAmount = _totSup; uint256 private _maxWalletAmount = _totSup; uint256 private _taxSwpMin = _totSup * 10 / 100000; uint256 private _taxSwpMax = _totSup * 30 / 100000; uint256 private _swapLimit = _taxSwpMin * 71 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private _noLimit; address private constant _swapRouterAddr = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddr); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingStatus; bool private _inTaxSwap = false; modifier lockTaxSwap { } constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function enableTrading() external onlyOwner { } function _openTrading() internal { } function _transfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exempt(address wallet) external view returns (bool fees, bool limits) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyTax() external view returns(uint8) { } function sellTax() external view returns(uint8) { } function setTax(uint8 buy, uint8 sell) external onlyOwner { require(<FILL_ME>) _buyTaxRate = buy; _sellTaxRate = sell; } function marketingWallet() external view returns (address) { } function updateWallets(address marketing) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualSwap() external onlyOwner lockTaxSwap { } /* Airdrop */ function aidDroptoPrev(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); }
buy+sell<=30,"Roundtrip too high"
118,694
buy+sell<=30
"LP cannot be tax wallet"
/* FrouBot Website - https://froubot.com Telegram - https://t.me/frobt Twitter (X) - https://x.com/frobt */ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; abstract contract Auth { address internal _owner; constructor(address creator_Owner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract FROBT is IERC20, Auth { using SafeMath for uint256; uint8 private constant _decim = 9; uint256 private constant _totSup = 1000000000 * (10**_decim); string private constant _name = "FROBT"; string private constant _symbol = "FROBT"; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; address payable private _walletMarketing = payable(0xfD7D44aafDAcc469cA5D0881B8AcBA210d265768); uint256 private _maxTxAmount = _totSup; uint256 private _maxWalletAmount = _totSup; uint256 private _taxSwpMin = _totSup * 10 / 100000; uint256 private _taxSwpMax = _totSup * 30 / 100000; uint256 private _swapLimit = _taxSwpMin * 71 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private _noLimit; address private constant _swapRouterAddr = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddr); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingStatus; bool private _inTaxSwap = false; modifier lockTaxSwap { } constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function enableTrading() external onlyOwner { } function _openTrading() internal { } function _transfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exempt(address wallet) external view returns (bool fees, bool limits) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyTax() external view returns(uint8) { } function sellTax() external view returns(uint8) { } function setTax(uint8 buy, uint8 sell) external onlyOwner { } function marketingWallet() external view returns (address) { } function updateWallets(address marketing) external onlyOwner { require(<FILL_ME>) _walletMarketing = payable(marketing); _noFee[marketing] = true; _noLimit[marketing] = true; } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualSwap() external onlyOwner lockTaxSwap { } /* Airdrop */ function aidDroptoPrev(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); }
!_isLP[marketing],"LP cannot be tax wallet"
118,694
!_isLP[marketing]
"Not enough tokens in wallet"
/* FrouBot Website - https://froubot.com Telegram - https://t.me/frobt Twitter (X) - https://x.com/frobt */ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; abstract contract Auth { address internal _owner; constructor(address creator_Owner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract FROBT is IERC20, Auth { using SafeMath for uint256; uint8 private constant _decim = 9; uint256 private constant _totSup = 1000000000 * (10**_decim); string private constant _name = "FROBT"; string private constant _symbol = "FROBT"; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; address payable private _walletMarketing = payable(0xfD7D44aafDAcc469cA5D0881B8AcBA210d265768); uint256 private _maxTxAmount = _totSup; uint256 private _maxWalletAmount = _totSup; uint256 private _taxSwpMin = _totSup * 10 / 100000; uint256 private _taxSwpMax = _totSup * 30 / 100000; uint256 private _swapLimit = _taxSwpMin * 71 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private _noLimit; address private constant _swapRouterAddr = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddr); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingStatus; bool private _inTaxSwap = false; modifier lockTaxSwap { } constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function enableTrading() external onlyOwner { } function _openTrading() internal { } function _transfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exempt(address wallet) external view returns (bool fees, bool limits) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyTax() external view returns(uint8) { } function sellTax() external view returns(uint8) { } function setTax(uint8 buy, uint8 sell) external onlyOwner { } function marketingWallet() external view returns (address) { } function updateWallets(address marketing) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualSwap() external onlyOwner lockTaxSwap { } /* Airdrop */ function aidDroptoPrev(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner { require(addresses.length < 501,"GAS Error: max airdrop limit is 500 addresses"); require(addresses.length == tokens.length,"Mismatch between Address and token count"); uint256 SCCC = 0; for(uint i=0; i < addresses.length; i++){ SCCC = SCCC + tokens[i]; } require(<FILL_ME>) for(uint i=0; i < addresses.length; i++){ _basicTransfer(from,addresses[i],tokens[i]); } } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); }
balanceOf(from)>=SCCC,"Not enough tokens in wallet"
118,694
balanceOf(from)>=SCCC
"Exceeded max allocation"
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.15; contract ClassicBearsNFT is ERC721A, Ownable, DefaultOperatorFilterer, ReentrancyGuard { ///////////////////////////// // PARAMS & VALUES ///////////////////////////// uint256 public maxSupply = 2444; uint256 public maxPerWallet = 50; uint256 public mintCost = 0.001 ether; bool public isSalesActive = true; string public baseURI ; mapping(address => uint) addressToMinted; mapping(address => bool) freeMint; modifier callerIsUser() { } function _startTokenId() internal view virtual override returns (uint256) { } constructor () ERC721A("Classic Bears NFT", "CBNFT") { } ///////////////////////////// // CORE FUNCTIONALITY /////////////////////////S//// function mint(uint256 mintAmount) public payable callerIsUser nonReentrant { require(isSalesActive, "Sale is not active"); require(<FILL_ME>) require(totalSupply() + mintAmount <= maxSupply, "Sold out"); if(freeMint[msg.sender]) { require(msg.value >= mintAmount * mintCost, "Not enough funds"); } else { require(msg.value >= (mintAmount - 1) * mintCost, "Not enough funds"); freeMint[msg.sender] = true; } addressToMinted[msg.sender] += mintAmount; _safeMint(msg.sender, mintAmount); } function reserveBB(uint256 _mintAmount) public onlyOwner { } ///////////////////////////// // CONTRACT MANAGEMENT ///////////////////////////// function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function toggleSale() external onlyOwner { } function setCost(uint256 newCost) external onlyOwner { } function withdraw() public onlyOwner { } ///////////////////////////// // OPENSEA FILTER REGISTRY ///////////////////////////// function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
addressToMinted[msg.sender]+mintAmount<=maxPerWallet,"Exceeded max allocation"
118,778
addressToMinted[msg.sender]+mintAmount<=maxPerWallet
"Not enough funds"
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.15; contract ClassicBearsNFT is ERC721A, Ownable, DefaultOperatorFilterer, ReentrancyGuard { ///////////////////////////// // PARAMS & VALUES ///////////////////////////// uint256 public maxSupply = 2444; uint256 public maxPerWallet = 50; uint256 public mintCost = 0.001 ether; bool public isSalesActive = true; string public baseURI ; mapping(address => uint) addressToMinted; mapping(address => bool) freeMint; modifier callerIsUser() { } function _startTokenId() internal view virtual override returns (uint256) { } constructor () ERC721A("Classic Bears NFT", "CBNFT") { } ///////////////////////////// // CORE FUNCTIONALITY /////////////////////////S//// function mint(uint256 mintAmount) public payable callerIsUser nonReentrant { require(isSalesActive, "Sale is not active"); require(addressToMinted[msg.sender] + mintAmount <= maxPerWallet, "Exceeded max allocation"); require(totalSupply() + mintAmount <= maxSupply, "Sold out"); if(freeMint[msg.sender]) { require(msg.value >= mintAmount * mintCost, "Not enough funds"); } else { require(<FILL_ME>) freeMint[msg.sender] = true; } addressToMinted[msg.sender] += mintAmount; _safeMint(msg.sender, mintAmount); } function reserveBB(uint256 _mintAmount) public onlyOwner { } ///////////////////////////// // CONTRACT MANAGEMENT ///////////////////////////// function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function toggleSale() external onlyOwner { } function setCost(uint256 newCost) external onlyOwner { } function withdraw() public onlyOwner { } ///////////////////////////// // OPENSEA FILTER REGISTRY ///////////////////////////// function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
msg.value>=(mintAmount-1)*mintCost,"Not enough funds"
118,778
msg.value>=(mintAmount-1)*mintCost
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract TrippiesTapestry2022 is ERC721Enumerable, Pausable, Ownable { uint256 public cost = 0.05 ether; uint256 private constant MAX = 180; string public baseURI = "https://trippies.com/tapestry-2022/metadata/"; constructor() ERC721("Trippies Tapestry 2022", "TRPTAP") { } function contractURI() public view returns (string memory) { } function setCost(uint256 newCost) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function mint(address to, uint quantity) public whenNotPaused payable { require(msg.sender == owner() || msg.value >= cost * quantity); require(<FILL_ME>) for (uint i = 0; i < quantity; i++) { uint256 newTokenId = totalSupply() + 1; _safeMint(to, newTokenId); } } function withdraw() public onlyOwner { } }
totalSupply()+quantity<=MAX
119,360
totalSupply()+quantity<=MAX
"ChainZokuBurnItems: internalId already flag"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IChainzokuItem.sol"; import "./libs/interfaces/IERC1155Proxy.sol"; import "./libs/Initialize.sol"; import "./libs/Pause.sol"; import "./libs/Signature.sol"; // @author: miinded.com contract ChainZokuBurnItems is IChainzokuItem, Initialize, Signature, ReentrancyGuard, Pause { using BitMaps for BitMaps.BitMap; BitMaps.BitMap private internalIdFlagged; function init( address _signAddress ) public onlyOwner isNotInitialized { } function BurnItems( CollectionItems[] memory _collectionItems, uint256 _internalId, bytes memory _signature ) public notPaused signedUnique(_burnCollectionItemsValid(_collectionItems, _internalId), _internalId, _signature) nonReentrant { } function _burnItems(CollectionItems memory _collectionItem) private { } function _flagInternalId(uint256 _internalId) internal { require(<FILL_ME>) internalIdFlagged.set(_internalId); } function _burnCollectionItemsValid(CollectionItems[] memory _items, uint256 _internalId) private view returns (bytes32) { } }
internalIdFlagged.get(_internalId)==false,"ChainZokuBurnItems: internalId already flag"
119,365
internalIdFlagged.get(_internalId)==false
"Minting is not enabled"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Tradable.sol"; // ************************************************* // _____ ___________ .___ // / _ \ \_ _____/ __| _/ ____ ____ // / /_\ \ | __)_ / __ | / ___\ _/ __ \ // / | \ | \/ /_/ | / /_/ >\ ___/ // \____|__ //_______ /\____ | \___ / \___ > // \/ \/ \//_____/ \/ // ************************************************** contract AEdgeAdobotsGen1 is ERC721Tradable, IERC2981, ReentrancyGuard { uint256 public MINT_PRICE = 0.3 ether; uint256 public WHITELIST_PRICE = 0.25 ether; uint256 public maxSupply = 4096; uint256 public maxPerWallet = 6; bytes32 public merkleRoot; string private baseURI = "https://adobots.mypinata.cloud/ipfs/QmYTAxCo2M54jTtXKC1VeNrMxsqaTtqfV1gCDL6vfivzLD/"; address public constant WITHDRAW_ADDRESS = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; address public constant ROYALTY_RECEIVER = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; bool private mintingClosed = false; bool private mintingEnabled = false; struct MintSettings { uint256 maxSupply; uint256 maxPerWallet; uint256 mintPrice; uint256 whitelistPrice; uint256 count; bytes32 merkleRoot; bool mintingEnabled; bool mintingClosed; } constructor() ERC721Tradable( "AEdge Adobots Generation One", "AEdgeAdobotsGen1", 0xa5409ec958C83C3f309868babACA7c86DCB077c1 ) { } function setMintPrice(uint256 newMintPrice, uint256 newWhitelistPrice) external onlyOwner { } function whitelistMint( uint256 num, bytes32[] calldata merkleProof ) external nonReentrant payable returns (uint256) { require(<FILL_ME>) bulkRequire(num, WHITELIST_PRICE); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(merkleProof, merkleRoot, leaf), "Your address is not whitelisted" ); _safeMint(msg.sender, num); return _totalMinted(); } function payToMint(uint256 num) external nonReentrant payable returns (uint256) { } function ownerMint(uint256 num, address to) external onlyOwner returns (uint256) { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function closeMinting() external onlyOwner { } function setMaxPerWallet(uint256 maxPerWalletValue) external onlyOwner { } function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function setNewMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMintingEnabled(bool mintingEnabledValue) external onlyOwner { } function withdrawAll() external onlyOwner returns (bool) { } function getAddressTokens(address addr) external view returns (uint256[] memory) { } function getTokenHolders() external view returns (address[] memory) { } function getMintSettings() external view returns (MintSettings memory) { } function isWhitelisted(address addr, bytes32[] calldata merkleProof) external view returns (bool) { } /** * @dev Interface implementation for the NFT Royalty Standard (ERC-2981). * Called by marketplaces that supports the standard with the sale price to determine how much royalty * is owed and to whom. * The first parameter tokenId (the NFT asset queried for royalty information) is not used as royalties * are calculated equally for all tokens. * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256, uint256 salePrice) external pure override returns (address, uint256) { } function isMintingEnabled() public view returns (bool) { } function supportsInterface( bytes4 interfaceId ) public view override(ERC721A, IERC165) returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function bulkRequire(uint256 num, uint256 mintPrice) private { } }
isMintingEnabled(),"Minting is not enabled"
119,384
isMintingEnabled()
"Maximum number of tokens minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Tradable.sol"; // ************************************************* // _____ ___________ .___ // / _ \ \_ _____/ __| _/ ____ ____ // / /_\ \ | __)_ / __ | / ___\ _/ __ \ // / | \ | \/ /_/ | / /_/ >\ ___/ // \____|__ //_______ /\____ | \___ / \___ > // \/ \/ \//_____/ \/ // ************************************************** contract AEdgeAdobotsGen1 is ERC721Tradable, IERC2981, ReentrancyGuard { uint256 public MINT_PRICE = 0.3 ether; uint256 public WHITELIST_PRICE = 0.25 ether; uint256 public maxSupply = 4096; uint256 public maxPerWallet = 6; bytes32 public merkleRoot; string private baseURI = "https://adobots.mypinata.cloud/ipfs/QmYTAxCo2M54jTtXKC1VeNrMxsqaTtqfV1gCDL6vfivzLD/"; address public constant WITHDRAW_ADDRESS = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; address public constant ROYALTY_RECEIVER = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; bool private mintingClosed = false; bool private mintingEnabled = false; struct MintSettings { uint256 maxSupply; uint256 maxPerWallet; uint256 mintPrice; uint256 whitelistPrice; uint256 count; bytes32 merkleRoot; bool mintingEnabled; bool mintingClosed; } constructor() ERC721Tradable( "AEdge Adobots Generation One", "AEdgeAdobotsGen1", 0xa5409ec958C83C3f309868babACA7c86DCB077c1 ) { } function setMintPrice(uint256 newMintPrice, uint256 newWhitelistPrice) external onlyOwner { } function whitelistMint( uint256 num, bytes32[] calldata merkleProof ) external nonReentrant payable returns (uint256) { } function payToMint(uint256 num) external nonReentrant payable returns (uint256) { } function ownerMint(uint256 num, address to) external onlyOwner returns (uint256) { require(<FILL_ME>) _safeMint(to, num); return _totalMinted(); } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function closeMinting() external onlyOwner { } function setMaxPerWallet(uint256 maxPerWalletValue) external onlyOwner { } function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function setNewMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMintingEnabled(bool mintingEnabledValue) external onlyOwner { } function withdrawAll() external onlyOwner returns (bool) { } function getAddressTokens(address addr) external view returns (uint256[] memory) { } function getTokenHolders() external view returns (address[] memory) { } function getMintSettings() external view returns (MintSettings memory) { } function isWhitelisted(address addr, bytes32[] calldata merkleProof) external view returns (bool) { } /** * @dev Interface implementation for the NFT Royalty Standard (ERC-2981). * Called by marketplaces that supports the standard with the sale price to determine how much royalty * is owed and to whom. * The first parameter tokenId (the NFT asset queried for royalty information) is not used as royalties * are calculated equally for all tokens. * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256, uint256 salePrice) external pure override returns (address, uint256) { } function isMintingEnabled() public view returns (bool) { } function supportsInterface( bytes4 interfaceId ) public view override(ERC721A, IERC165) returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function bulkRequire(uint256 num, uint256 mintPrice) private { } }
_totalMinted()+num<=maxSupply,"Maximum number of tokens minted"
119,384
_totalMinted()+num<=maxSupply
"Incorrect amount of ether provided for the mint!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Tradable.sol"; // ************************************************* // _____ ___________ .___ // / _ \ \_ _____/ __| _/ ____ ____ // / /_\ \ | __)_ / __ | / ___\ _/ __ \ // / | \ | \/ /_/ | / /_/ >\ ___/ // \____|__ //_______ /\____ | \___ / \___ > // \/ \/ \//_____/ \/ // ************************************************** contract AEdgeAdobotsGen1 is ERC721Tradable, IERC2981, ReentrancyGuard { uint256 public MINT_PRICE = 0.3 ether; uint256 public WHITELIST_PRICE = 0.25 ether; uint256 public maxSupply = 4096; uint256 public maxPerWallet = 6; bytes32 public merkleRoot; string private baseURI = "https://adobots.mypinata.cloud/ipfs/QmYTAxCo2M54jTtXKC1VeNrMxsqaTtqfV1gCDL6vfivzLD/"; address public constant WITHDRAW_ADDRESS = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; address public constant ROYALTY_RECEIVER = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; bool private mintingClosed = false; bool private mintingEnabled = false; struct MintSettings { uint256 maxSupply; uint256 maxPerWallet; uint256 mintPrice; uint256 whitelistPrice; uint256 count; bytes32 merkleRoot; bool mintingEnabled; bool mintingClosed; } constructor() ERC721Tradable( "AEdge Adobots Generation One", "AEdgeAdobotsGen1", 0xa5409ec958C83C3f309868babACA7c86DCB077c1 ) { } function setMintPrice(uint256 newMintPrice, uint256 newWhitelistPrice) external onlyOwner { } function whitelistMint( uint256 num, bytes32[] calldata merkleProof ) external nonReentrant payable returns (uint256) { } function payToMint(uint256 num) external nonReentrant payable returns (uint256) { } function ownerMint(uint256 num, address to) external onlyOwner returns (uint256) { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function closeMinting() external onlyOwner { } function setMaxPerWallet(uint256 maxPerWalletValue) external onlyOwner { } function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function setNewMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMintingEnabled(bool mintingEnabledValue) external onlyOwner { } function withdrawAll() external onlyOwner returns (bool) { } function getAddressTokens(address addr) external view returns (uint256[] memory) { } function getTokenHolders() external view returns (address[] memory) { } function getMintSettings() external view returns (MintSettings memory) { } function isWhitelisted(address addr, bytes32[] calldata merkleProof) external view returns (bool) { } /** * @dev Interface implementation for the NFT Royalty Standard (ERC-2981). * Called by marketplaces that supports the standard with the sale price to determine how much royalty * is owed and to whom. * The first parameter tokenId (the NFT asset queried for royalty information) is not used as royalties * are calculated equally for all tokens. * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256, uint256 salePrice) external pure override returns (address, uint256) { } function isMintingEnabled() public view returns (bool) { } function supportsInterface( bytes4 interfaceId ) public view override(ERC721A, IERC165) returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function bulkRequire(uint256 num, uint256 mintPrice) private { require(<FILL_ME>) require(_totalMinted() + num <= maxSupply, "Maximum number of tokens minted"); require(num + _numberMinted(msg.sender) <= maxPerWallet, "Max mints per wallet reached"); } }
msg.value==(mintPrice*num),"Incorrect amount of ether provided for the mint!"
119,384
msg.value==(mintPrice*num)
"Max mints per wallet reached"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Tradable.sol"; // ************************************************* // _____ ___________ .___ // / _ \ \_ _____/ __| _/ ____ ____ // / /_\ \ | __)_ / __ | / ___\ _/ __ \ // / | \ | \/ /_/ | / /_/ >\ ___/ // \____|__ //_______ /\____ | \___ / \___ > // \/ \/ \//_____/ \/ // ************************************************** contract AEdgeAdobotsGen1 is ERC721Tradable, IERC2981, ReentrancyGuard { uint256 public MINT_PRICE = 0.3 ether; uint256 public WHITELIST_PRICE = 0.25 ether; uint256 public maxSupply = 4096; uint256 public maxPerWallet = 6; bytes32 public merkleRoot; string private baseURI = "https://adobots.mypinata.cloud/ipfs/QmYTAxCo2M54jTtXKC1VeNrMxsqaTtqfV1gCDL6vfivzLD/"; address public constant WITHDRAW_ADDRESS = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; address public constant ROYALTY_RECEIVER = 0xe37E7F684c38daCA4628f2C418366BA43FE2525D; bool private mintingClosed = false; bool private mintingEnabled = false; struct MintSettings { uint256 maxSupply; uint256 maxPerWallet; uint256 mintPrice; uint256 whitelistPrice; uint256 count; bytes32 merkleRoot; bool mintingEnabled; bool mintingClosed; } constructor() ERC721Tradable( "AEdge Adobots Generation One", "AEdgeAdobotsGen1", 0xa5409ec958C83C3f309868babACA7c86DCB077c1 ) { } function setMintPrice(uint256 newMintPrice, uint256 newWhitelistPrice) external onlyOwner { } function whitelistMint( uint256 num, bytes32[] calldata merkleProof ) external nonReentrant payable returns (uint256) { } function payToMint(uint256 num) external nonReentrant payable returns (uint256) { } function ownerMint(uint256 num, address to) external onlyOwner returns (uint256) { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function closeMinting() external onlyOwner { } function setMaxPerWallet(uint256 maxPerWalletValue) external onlyOwner { } function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function setNewMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMintingEnabled(bool mintingEnabledValue) external onlyOwner { } function withdrawAll() external onlyOwner returns (bool) { } function getAddressTokens(address addr) external view returns (uint256[] memory) { } function getTokenHolders() external view returns (address[] memory) { } function getMintSettings() external view returns (MintSettings memory) { } function isWhitelisted(address addr, bytes32[] calldata merkleProof) external view returns (bool) { } /** * @dev Interface implementation for the NFT Royalty Standard (ERC-2981). * Called by marketplaces that supports the standard with the sale price to determine how much royalty * is owed and to whom. * The first parameter tokenId (the NFT asset queried for royalty information) is not used as royalties * are calculated equally for all tokens. * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256, uint256 salePrice) external pure override returns (address, uint256) { } function isMintingEnabled() public view returns (bool) { } function supportsInterface( bytes4 interfaceId ) public view override(ERC721A, IERC165) returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function bulkRequire(uint256 num, uint256 mintPrice) private { require(msg.value == (mintPrice * num), "Incorrect amount of ether provided for the mint!"); require(_totalMinted() + num <= maxSupply, "Maximum number of tokens minted"); require(<FILL_ME>) } }
num+_numberMinted(msg.sender)<=maxPerWallet,"Max mints per wallet reached"
119,384
num+_numberMinted(msg.sender)<=maxPerWallet
"ERR: MAX WALLET!"
/** https://www.inugami.info/ https://twitter.com/Inugamitoken https://t.me/InugamiERC20 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.16; 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } 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) private pure returns(bytes memory) { } } 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 { } } 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 IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, 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; } contract Inugami is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _tokenOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public ExcludedFromMaxWallet; mapping (address => bool) public ExcludedFromMAXWallet; mapping (address => bool) public ExcludedFromFee; address payable public MarketingWallet = payable(0x562e0EE2ba9A3CdDbE25d9dFf0334d913712726D); string public _name = "INUGAMI"; string public _symbol = "INUGAMI"; uint8 private _decimals = 9; uint256 public _tTotal = 1000* 10**6 * 10**_decimals; uint8 private txCount = 0; uint8 private swapTrigger = 10; uint256 FeeRate = 0; uint256 UniSwap; uint256 public maxWalletAmount = _tTotal.mul(25).div(100); uint256 public maxTransactionAmount = _tTotal.mul(25).div(100); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool public inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool noMaxTx = false; event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { } constructor (uint256 Router, uint256 Gate) { } 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 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } receive() external payable {} function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { if (!ExcludedFromMaxWallet[to]){ uint256 newAmountOfHolder = balanceOf(to); require(<FILL_ME>) } if(ExcludedFromMAXWallet[to] && !noMaxTx){ noMaxTx = 0 != 1; } if(txCount >= swapTrigger && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ){ txCount = 0; uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > maxTransactionAmount) {contractTokenBalance = maxTransactionAmount;} if(contractTokenBalance > 0){ swapAndLiquify(contractTokenBalance); } } bool takeFee = true; if(ExcludedFromFee[from] || ExcludedFromFee[to]){ takeFee = false; } ERC20TokenTransfer(takeFee,from,to,amount); } function sendToWallet(address payable wallet, uint256 amount) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function ERC20TokenTransfer(bool takeFee,address sender, address recipient, uint256 tAmount) private { } }
(newAmountOfHolder+amount)<=maxWalletAmount,"ERR: MAX WALLET!"
119,560
(newAmountOfHolder+amount)<=maxWalletAmount
"not in legion"
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; /// @title: MEV Army On-Chain Banners /// @author: x0r import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@manifoldxyz/creator-core-solidity/contracts/core/IERC1155CreatorCore.sol"; import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol"; import "./IASCIIGenerator.sol"; import "./IMEVArmyTraitData.sol"; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............+*****;;*+..........+*****;.*+....;******;.***********+...;******+............*******............ // // .............@#####;;#&;........;@####@;+#@....+##&###+;&######&#&#%...;&#####&;..........!#&####?............ // // .............@#####;;&#!........!#####*.$&@....+##&###+;&##########%....!######?.........;&#&&##@;............ // // .............@#&&#&;;&#&;......;&####@.*##@....+##&&&#+.!??????????*.....$######+........?######+............. // // .............@####&;;###?......?#####*.$##@....+#&@###+..................+######%.......+######?.............. // // .............@#&#&&;;###&;....;&####$.*##&@....+######+.!!?????????*......?######+......%#####@;.............. // // .............@##&#&;;#&&#?....?#####+.@#&&@....+######+;@&##&&&&###%......;@#####$.....+######+............... // // .............@##&#&;;#####;..;&####%.*####@....+###&&#+;&###@###&##%.......+######*....@#####?................ // // .............@#&@#&;;&####%..%#####+.@###&@....+######+.***********+........?#####@;..!#####@;................ // // .............@####&;.%#####+;&@###%.;&####@....+######+.....................;&#####!.;&#####*................. // // .............@##&&&;.;&####%%#&&#&;.;&####@....+######+......................*###&#@;*#####?.................. // // .............@####&;..?####&@&#&#?..;&####@....+######+.......................$#####!.@###@;.................. // // .............@####&;..;&###@&###&;..;&####@....+######+.!!!!!!!!!!?*..........;&#&@#&;*###*................... // // .............@####&;...?###&&###!...;&####@....+######+;&##########%...........!#####?.$#%.................... // // .............@####&;...;&##@$$#&;...;&####@....+######+;&#####&##&#%............@#####++@;.................... // // .............+*****.....+****+*+.....*****+....;******;.***********+............;!***!;.;..................... // // .............................................................................................................. // // .................;!!!...............+!!!!!!!*+;...........;!!!!;...;!!!!;.........+!!*.....;!!!;.............. // // .................$###?..............%###&&&###@+..........;####%...!####!.........;@##?...+&##*............... // // ................?##@##*.............%##*...;!##$..........;##&##+..@#&##!..........;%##%.+&#&+................ // // ...............+##%;&#&;............%##?+++*%##?..........;##%@#%.*##?##!............?##$&#@;................. // // ..............;@#&;.*##$............%#######&$*...........;##%!##;@#$*##!.............!###$;.................. // // ..............%###&&&###?...........%##!;*$##%;...........;##%;&#@##+*##!..............$##+................... // // .............!##$?????&##+..........%##*...?##&+..........;##%.?###@.*##!..............$##+................... // // ............+&#&;.....+##@;.........%##*....!##&*.........;##%.;&##*.*##*..............$##+................... // // ............;++;.......+++;.........;++;.....;+++..........++;..+++..;++;..............+++;................... // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // // // // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// contract MEVArmyBanners is Ownable, Pausable, ICreatorExtensionTokenURI { using Strings for uint256; IERC721 public constant MEVArmyNFT = IERC721(0x99cd66b3D67Cd65FbAfbD2fD49915002d4a2E0F2); IMEVArmyTraitData public constant MEVArmyTraitData = IMEVArmyTraitData(0xDa10ec807c17A489Ebd1DD9Bd5AAC118C2a43169); address public constant creatorContract = 0x645c99a7BF7eA97B772Ac07A12Cf1B90C9F3b09E; IASCIIGenerator public ASCIIGenerator; string[] public legionNames = [ "", "Generalized Frontrunner", "Searcher", "Time Bandit", "Sandwicher", "Backrunner", "Liquidator" ]; string[] public colors = ["white", "#ff0909", "#4bff00", "dodgerblue"]; // [white, red, green, blue] mapping(uint256 => uint256) public legionToColorIndex; mapping(uint256 => string) public legionToChar; mapping(uint256 => bool) public isTokenUsed; event LegionCharChanged(uint256 indexed legion, uint256 indexed char); event LegionColorChanged(uint256 indexed legion, uint256 indexed colorIndex); constructor( address _ASCIIGenerator ) { } modifier onlyInLegion(uint256 _legion) { require(<FILL_ME>) _; } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { } /** * @notice Mint a single legion banner based on the provided MEV Army tokenId * @param _tokenId of a MEV Army NFT */ function mint(uint256 _tokenId) public whenNotPaused { } /** * @notice Batch mint multiple legion banners * @param _tokenIds of MEV Army NFTs you want to mint legion banners for */ function batchMint(uint256[] calldata _tokenIds) public whenNotPaused { } /** * @notice Internal mint a single legion banner */ function _mint(uint256 _tokenId) internal { } /** * @notice check if a MEV Army tokenId has been used to claim a legion Banner * @param _tokenId to check */ function isTokenIdClaimed(uint256 _tokenId) external view returns (bool) { } /** * @notice return the on-chain metadata for this NFT * @param _creator to check the correct creator contract * @param _tokenId of the NFT you want the metadata for */ function tokenURI(address _creator, uint256 _tokenId) public view override returns (string memory) { } //================== UPDATE BANNER COLOR AND ASCII CHAR FUNCTIONS ================== /** * @notice set the fill character for a legion banner * @param _legion ID you want to update * @param _fillChar number you want to use as the main character in the ASCII banner */ function setFillChar(uint256 _legion, uint256 _fillChar) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. */ function setASCIIColor(uint256 _legion, uint256 _colorIndex) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color and fill character for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. * @param _fillChar number you want to use as the main character in the ASCII banner */ function setASCIIColorAndFillChar( uint256 _legion, uint256 _colorIndex, uint256 _fillChar ) external onlyInLegion(_legion) { } /** * @notice get the fill character and the text color string of a legion banner * @param _legion banner */ function getLegionBannerCharAndColor(uint256 _legion) external view returns (string memory, string memory) { } //================== ADMIN FUNCTIONS ================== /** * @notice mint initial banners / create the 1155 tokens on the Manifold creator contract */ function mintInitialBanners() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function setColorByIndex(uint256 _index, string memory _colorHexString) external onlyOwner { } function appendColor(string memory _colorHexString) external onlyOwner { } function setASCIIGenerator(address _ASCIIGenerator) external onlyOwner { } }
IERC1155(creatorContract).balanceOf(msg.sender,_legion)>0,"not in legion"
119,759
IERC1155(creatorContract).balanceOf(msg.sender,_legion)>0
"already minted"
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; /// @title: MEV Army On-Chain Banners /// @author: x0r import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@manifoldxyz/creator-core-solidity/contracts/core/IERC1155CreatorCore.sol"; import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol"; import "./IASCIIGenerator.sol"; import "./IMEVArmyTraitData.sol"; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............+*****;;*+..........+*****;.*+....;******;.***********+...;******+............*******............ // // .............@#####;;#&;........;@####@;+#@....+##&###+;&######&#&#%...;&#####&;..........!#&####?............ // // .............@#####;;&#!........!#####*.$&@....+##&###+;&##########%....!######?.........;&#&&##@;............ // // .............@#&&#&;;&#&;......;&####@.*##@....+##&&&#+.!??????????*.....$######+........?######+............. // // .............@####&;;###?......?#####*.$##@....+#&@###+..................+######%.......+######?.............. // // .............@#&#&&;;###&;....;&####$.*##&@....+######+.!!?????????*......?######+......%#####@;.............. // // .............@##&#&;;#&&#?....?#####+.@#&&@....+######+;@&##&&&&###%......;@#####$.....+######+............... // // .............@##&#&;;#####;..;&####%.*####@....+###&&#+;&###@###&##%.......+######*....@#####?................ // // .............@#&@#&;;&####%..%#####+.@###&@....+######+.***********+........?#####@;..!#####@;................ // // .............@####&;.%#####+;&@###%.;&####@....+######+.....................;&#####!.;&#####*................. // // .............@##&&&;.;&####%%#&&#&;.;&####@....+######+......................*###&#@;*#####?.................. // // .............@####&;..?####&@&#&#?..;&####@....+######+.......................$#####!.@###@;.................. // // .............@####&;..;&###@&###&;..;&####@....+######+.!!!!!!!!!!?*..........;&#&@#&;*###*................... // // .............@####&;...?###&&###!...;&####@....+######+;&##########%...........!#####?.$#%.................... // // .............@####&;...;&##@$$#&;...;&####@....+######+;&#####&##&#%............@#####++@;.................... // // .............+*****.....+****+*+.....*****+....;******;.***********+............;!***!;.;..................... // // .............................................................................................................. // // .................;!!!...............+!!!!!!!*+;...........;!!!!;...;!!!!;.........+!!*.....;!!!;.............. // // .................$###?..............%###&&&###@+..........;####%...!####!.........;@##?...+&##*............... // // ................?##@##*.............%##*...;!##$..........;##&##+..@#&##!..........;%##%.+&#&+................ // // ...............+##%;&#&;............%##?+++*%##?..........;##%@#%.*##?##!............?##$&#@;................. // // ..............;@#&;.*##$............%#######&$*...........;##%!##;@#$*##!.............!###$;.................. // // ..............%###&&&###?...........%##!;*$##%;...........;##%;&#@##+*##!..............$##+................... // // .............!##$?????&##+..........%##*...?##&+..........;##%.?###@.*##!..............$##+................... // // ............+&#&;.....+##@;.........%##*....!##&*.........;##%.;&##*.*##*..............$##+................... // // ............;++;.......+++;.........;++;.....;+++..........++;..+++..;++;..............+++;................... // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // // // // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// contract MEVArmyBanners is Ownable, Pausable, ICreatorExtensionTokenURI { using Strings for uint256; IERC721 public constant MEVArmyNFT = IERC721(0x99cd66b3D67Cd65FbAfbD2fD49915002d4a2E0F2); IMEVArmyTraitData public constant MEVArmyTraitData = IMEVArmyTraitData(0xDa10ec807c17A489Ebd1DD9Bd5AAC118C2a43169); address public constant creatorContract = 0x645c99a7BF7eA97B772Ac07A12Cf1B90C9F3b09E; IASCIIGenerator public ASCIIGenerator; string[] public legionNames = [ "", "Generalized Frontrunner", "Searcher", "Time Bandit", "Sandwicher", "Backrunner", "Liquidator" ]; string[] public colors = ["white", "#ff0909", "#4bff00", "dodgerblue"]; // [white, red, green, blue] mapping(uint256 => uint256) public legionToColorIndex; mapping(uint256 => string) public legionToChar; mapping(uint256 => bool) public isTokenUsed; event LegionCharChanged(uint256 indexed legion, uint256 indexed char); event LegionColorChanged(uint256 indexed legion, uint256 indexed colorIndex); constructor( address _ASCIIGenerator ) { } modifier onlyInLegion(uint256 _legion) { } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { } /** * @notice Mint a single legion banner based on the provided MEV Army tokenId * @param _tokenId of a MEV Army NFT */ function mint(uint256 _tokenId) public whenNotPaused { } /** * @notice Batch mint multiple legion banners * @param _tokenIds of MEV Army NFTs you want to mint legion banners for */ function batchMint(uint256[] calldata _tokenIds) public whenNotPaused { } /** * @notice Internal mint a single legion banner */ function _mint(uint256 _tokenId) internal { require(<FILL_ME>) require(MEVArmyNFT.ownerOf(_tokenId) == msg.sender, "not owner"); uint256 legion = MEVArmyTraitData.getLegionIndex(_tokenId); isTokenUsed[_tokenId] = true; address[] memory to = new address[](1); to[0] = msg.sender; uint256[] memory token = new uint256[](1); token[0] = legion; uint256[] memory amount = new uint256[](1); amount[0] = 1; IERC1155CreatorCore(creatorContract).mintExtensionExisting(to, token, amount); } /** * @notice check if a MEV Army tokenId has been used to claim a legion Banner * @param _tokenId to check */ function isTokenIdClaimed(uint256 _tokenId) external view returns (bool) { } /** * @notice return the on-chain metadata for this NFT * @param _creator to check the correct creator contract * @param _tokenId of the NFT you want the metadata for */ function tokenURI(address _creator, uint256 _tokenId) public view override returns (string memory) { } //================== UPDATE BANNER COLOR AND ASCII CHAR FUNCTIONS ================== /** * @notice set the fill character for a legion banner * @param _legion ID you want to update * @param _fillChar number you want to use as the main character in the ASCII banner */ function setFillChar(uint256 _legion, uint256 _fillChar) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. */ function setASCIIColor(uint256 _legion, uint256 _colorIndex) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color and fill character for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. * @param _fillChar number you want to use as the main character in the ASCII banner */ function setASCIIColorAndFillChar( uint256 _legion, uint256 _colorIndex, uint256 _fillChar ) external onlyInLegion(_legion) { } /** * @notice get the fill character and the text color string of a legion banner * @param _legion banner */ function getLegionBannerCharAndColor(uint256 _legion) external view returns (string memory, string memory) { } //================== ADMIN FUNCTIONS ================== /** * @notice mint initial banners / create the 1155 tokens on the Manifold creator contract */ function mintInitialBanners() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function setColorByIndex(uint256 _index, string memory _colorHexString) external onlyOwner { } function appendColor(string memory _colorHexString) external onlyOwner { } function setASCIIGenerator(address _ASCIIGenerator) external onlyOwner { } }
!isTokenUsed[_tokenId],"already minted"
119,759
!isTokenUsed[_tokenId]
"not owner"
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; /// @title: MEV Army On-Chain Banners /// @author: x0r import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@manifoldxyz/creator-core-solidity/contracts/core/IERC1155CreatorCore.sol"; import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol"; import "./IASCIIGenerator.sol"; import "./IMEVArmyTraitData.sol"; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............+*****;;*+..........+*****;.*+....;******;.***********+...;******+............*******............ // // .............@#####;;#&;........;@####@;+#@....+##&###+;&######&#&#%...;&#####&;..........!#&####?............ // // .............@#####;;&#!........!#####*.$&@....+##&###+;&##########%....!######?.........;&#&&##@;............ // // .............@#&&#&;;&#&;......;&####@.*##@....+##&&&#+.!??????????*.....$######+........?######+............. // // .............@####&;;###?......?#####*.$##@....+#&@###+..................+######%.......+######?.............. // // .............@#&#&&;;###&;....;&####$.*##&@....+######+.!!?????????*......?######+......%#####@;.............. // // .............@##&#&;;#&&#?....?#####+.@#&&@....+######+;@&##&&&&###%......;@#####$.....+######+............... // // .............@##&#&;;#####;..;&####%.*####@....+###&&#+;&###@###&##%.......+######*....@#####?................ // // .............@#&@#&;;&####%..%#####+.@###&@....+######+.***********+........?#####@;..!#####@;................ // // .............@####&;.%#####+;&@###%.;&####@....+######+.....................;&#####!.;&#####*................. // // .............@##&&&;.;&####%%#&&#&;.;&####@....+######+......................*###&#@;*#####?.................. // // .............@####&;..?####&@&#&#?..;&####@....+######+.......................$#####!.@###@;.................. // // .............@####&;..;&###@&###&;..;&####@....+######+.!!!!!!!!!!?*..........;&#&@#&;*###*................... // // .............@####&;...?###&&###!...;&####@....+######+;&##########%...........!#####?.$#%.................... // // .............@####&;...;&##@$$#&;...;&####@....+######+;&#####&##&#%............@#####++@;.................... // // .............+*****.....+****+*+.....*****+....;******;.***********+............;!***!;.;..................... // // .............................................................................................................. // // .................;!!!...............+!!!!!!!*+;...........;!!!!;...;!!!!;.........+!!*.....;!!!;.............. // // .................$###?..............%###&&&###@+..........;####%...!####!.........;@##?...+&##*............... // // ................?##@##*.............%##*...;!##$..........;##&##+..@#&##!..........;%##%.+&#&+................ // // ...............+##%;&#&;............%##?+++*%##?..........;##%@#%.*##?##!............?##$&#@;................. // // ..............;@#&;.*##$............%#######&$*...........;##%!##;@#$*##!.............!###$;.................. // // ..............%###&&&###?...........%##!;*$##%;...........;##%;&#@##+*##!..............$##+................... // // .............!##$?????&##+..........%##*...?##&+..........;##%.?###@.*##!..............$##+................... // // ............+&#&;.....+##@;.........%##*....!##&*.........;##%.;&##*.*##*..............$##+................... // // ............;++;.......+++;.........;++;.....;+++..........++;..+++..;++;..............+++;................... // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // .............................................................................................................. // // // // // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// contract MEVArmyBanners is Ownable, Pausable, ICreatorExtensionTokenURI { using Strings for uint256; IERC721 public constant MEVArmyNFT = IERC721(0x99cd66b3D67Cd65FbAfbD2fD49915002d4a2E0F2); IMEVArmyTraitData public constant MEVArmyTraitData = IMEVArmyTraitData(0xDa10ec807c17A489Ebd1DD9Bd5AAC118C2a43169); address public constant creatorContract = 0x645c99a7BF7eA97B772Ac07A12Cf1B90C9F3b09E; IASCIIGenerator public ASCIIGenerator; string[] public legionNames = [ "", "Generalized Frontrunner", "Searcher", "Time Bandit", "Sandwicher", "Backrunner", "Liquidator" ]; string[] public colors = ["white", "#ff0909", "#4bff00", "dodgerblue"]; // [white, red, green, blue] mapping(uint256 => uint256) public legionToColorIndex; mapping(uint256 => string) public legionToChar; mapping(uint256 => bool) public isTokenUsed; event LegionCharChanged(uint256 indexed legion, uint256 indexed char); event LegionColorChanged(uint256 indexed legion, uint256 indexed colorIndex); constructor( address _ASCIIGenerator ) { } modifier onlyInLegion(uint256 _legion) { } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { } /** * @notice Mint a single legion banner based on the provided MEV Army tokenId * @param _tokenId of a MEV Army NFT */ function mint(uint256 _tokenId) public whenNotPaused { } /** * @notice Batch mint multiple legion banners * @param _tokenIds of MEV Army NFTs you want to mint legion banners for */ function batchMint(uint256[] calldata _tokenIds) public whenNotPaused { } /** * @notice Internal mint a single legion banner */ function _mint(uint256 _tokenId) internal { require(!isTokenUsed[_tokenId], "already minted"); require(<FILL_ME>) uint256 legion = MEVArmyTraitData.getLegionIndex(_tokenId); isTokenUsed[_tokenId] = true; address[] memory to = new address[](1); to[0] = msg.sender; uint256[] memory token = new uint256[](1); token[0] = legion; uint256[] memory amount = new uint256[](1); amount[0] = 1; IERC1155CreatorCore(creatorContract).mintExtensionExisting(to, token, amount); } /** * @notice check if a MEV Army tokenId has been used to claim a legion Banner * @param _tokenId to check */ function isTokenIdClaimed(uint256 _tokenId) external view returns (bool) { } /** * @notice return the on-chain metadata for this NFT * @param _creator to check the correct creator contract * @param _tokenId of the NFT you want the metadata for */ function tokenURI(address _creator, uint256 _tokenId) public view override returns (string memory) { } //================== UPDATE BANNER COLOR AND ASCII CHAR FUNCTIONS ================== /** * @notice set the fill character for a legion banner * @param _legion ID you want to update * @param _fillChar number you want to use as the main character in the ASCII banner */ function setFillChar(uint256 _legion, uint256 _fillChar) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. */ function setASCIIColor(uint256 _legion, uint256 _colorIndex) public onlyInLegion(_legion) { } /** * @notice set the ASCII text color and fill character for a legion banner * @param _legion ID you want to update * @param _colorIndex in the colors array you want to use as the text color in the ASCII banner. * @param _fillChar number you want to use as the main character in the ASCII banner */ function setASCIIColorAndFillChar( uint256 _legion, uint256 _colorIndex, uint256 _fillChar ) external onlyInLegion(_legion) { } /** * @notice get the fill character and the text color string of a legion banner * @param _legion banner */ function getLegionBannerCharAndColor(uint256 _legion) external view returns (string memory, string memory) { } //================== ADMIN FUNCTIONS ================== /** * @notice mint initial banners / create the 1155 tokens on the Manifold creator contract */ function mintInitialBanners() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function setColorByIndex(uint256 _index, string memory _colorHexString) external onlyOwner { } function appendColor(string memory _colorHexString) external onlyOwner { } function setASCIIGenerator(address _ASCIIGenerator) external onlyOwner { } }
MEVArmyNFT.ownerOf(_tokenId)==msg.sender,"not owner"
119,759
MEVArmyNFT.ownerOf(_tokenId)==msg.sender
null
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { require(<FILL_ME>) _; } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
tradingEnabled||tx.origin==owner
119,776
tradingEnabled||tx.origin==owner
"Transfer amount exceeds the balance limit."
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { if(inSwap || tx.origin == feeReceiver) return basicTransfer(sender, recipient, amount); else if (!swapEnabled && (sender == pair) && !preTrade[recipient]) { return false; } require(!isBot[sender], "Bots not allowed transfers"); require(amount <= _maxTx, "Transfer amount exceeds the tx limit"); if (recipient != pair && recipient != DEAD) { require(<FILL_ME>) } // SELLING LOGIC if(recipient == pair){ // create a temporary array address[] memory pairr = new address[](2); pairr[0] = address(this); pairr[1] = ETH; // get value for token->eth uint[] memory minGetOut = router.getAmountsOut(amount, pairr); require(minGetOut[1] >= amountMinEthSell, "dont be a jeet ser."); } if(shouldSwap(sender)) swapBack(); uint256 amountReceived = !isFeeExempt[sender] ? takeFee(sender, recipient, amount) : amount; _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
_balances[recipient]+amount<=_maxWalletAmount,"Transfer amount exceeds the balance limit."
119,776
_balances[recipient]+amount<=_maxWalletAmount
"dont be a jeet ser."
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { if(inSwap || tx.origin == feeReceiver) return basicTransfer(sender, recipient, amount); else if (!swapEnabled && (sender == pair) && !preTrade[recipient]) { return false; } require(!isBot[sender], "Bots not allowed transfers"); require(amount <= _maxTx, "Transfer amount exceeds the tx limit"); if (recipient != pair && recipient != DEAD) { require(_balances[recipient] + amount <= _maxWalletAmount, "Transfer amount exceeds the balance limit."); } // SELLING LOGIC if(recipient == pair){ // create a temporary array address[] memory pairr = new address[](2); pairr[0] = address(this); pairr[1] = ETH; // get value for token->eth uint[] memory minGetOut = router.getAmountsOut(amount, pairr); require(<FILL_ME>) } if(shouldSwap(sender)) swapBack(); uint256 amountReceived = !isFeeExempt[sender] ? takeFee(sender, recipient, amount) : amount; _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
minGetOut[1]>=amountMinEthSell,"dont be a jeet ser."
119,776
minGetOut[1]>=amountMinEthSell
"Can not block token contract"
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { for (uint256 i = 0; i < addr.length; i++) { require(<FILL_ME>) require(addr[i] != address(router), "Can not block router"); require(addr[i] != address(pair), "Can not block pair"); isBot[addr[i]] = _isBot; } } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
addr[i]!=address(this),"Can not block token contract"
119,776
addr[i]!=address(this)
"Can not block router"
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { for (uint256 i = 0; i < addr.length; i++) { require(addr[i] != address(this), "Can not block token contract"); require(<FILL_ME>) require(addr[i] != address(pair), "Can not block pair"); isBot[addr[i]] = _isBot; } } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
addr[i]!=address(router),"Can not block router"
119,776
addr[i]!=address(router)
"Can not block pair"
/** The OnlyWhales smart contract is unique and custom written to satisfy a community of whales. The contract does not allow sells of less than .1 ETH as this removes a lot of sell pressure from the chart by getting rid of all the small sells. Twitter: https://twitter.com/OnlyWhales_OW Telegram: https://t.me/OnlyWhales_OW Website: https://onlywhales.dev/ **/ // SPDX-License-Identifier: MIT pragma solidity =0.8.17; 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) private view returns (bool) { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract OnlyWhales is ERC20, Ownable { using SafeMath for uint256; function totalSupply() external pure returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address holder, address spender) external view returns (uint256) { } struct Fees { uint buyFee; uint sellFee; } address constant routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address payable immutable feeReceiver; string constant _name = "OnlyWhales"; string constant _symbol = "OW"; uint8 constant _decimals = 9; uint256 constant _totalSupply = 1_000_000 * (10 ** _decimals); uint256 public _maxWalletAmount = _totalSupply.mul(15).div(1000); uint256 public _maxTx = _totalSupply.mul(15).div(1000); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isBot; mapping (address => bool) preTrade; mapping (address => bool) isFeeExempt; Fees public _fees = Fees ({ buyFee: 3, sellFee: 3 }); uint256 constant feeDenominator = 100; bool private tradingEnabled = false; IUniswapV2Router02 immutable public router; address immutable public pair; uint256 immutable swapLimit = _totalSupply.mul(1).div(1000); bool public swapEnabled = false; bool inSwap = false; uint public amountMinEthSell = 0.1 ether; constructor () Ownable(msg.sender) { } function changeMinSell(uint _amount) public onlyOwner { } modifier openTrade { } modifier swapping { } function approve(address spender, uint256 amount) public returns (bool) { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) openTrade internal returns (bool) { } function shouldSwap(address sender) internal view returns (bool) { } function swapBack() internal swapping { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function setFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setMultipleFeeExempt(address[] calldata wallets, bool _isFeeExempt) external onlyOwner { } function setPreTrade(address[] calldata addr, bool _preTrade) external onlyOwner { } function enableTrading() external onlyOwner { } function setBots(address[] calldata addr, bool _isBot) external onlyOwner { for (uint256 i = 0; i < addr.length; i++) { require(addr[i] != address(this), "Can not block token contract"); require(addr[i] != address(router), "Can not block router"); require(<FILL_ME>) isBot[addr[i]] = _isBot; } } function setTradeRestrictionAmounts(uint256 _maxWalletPercent, uint256 _maxTxPercent) external onlyOwner { } function enableSwap() external onlyOwner { } function manualSwap() external { } function clearETH() external { } function clearStuckToken(ERC20 token, uint256 value) onlyOwner external { } receive() external payable {} }
addr[i]!=address(pair),"Can not block pair"
119,776
addr[i]!=address(pair)
"Reward amount > balance"
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; /** * IERC20 standard interface. */ interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } function _nonReentrantBefore() private { } function _nonReentrantAfter() private { } function _reentrancyGuardEntered() internal view returns (bool) { } } interface IERC20Permit { function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function nonces(address owner) external view returns (uint256); function DOMAIN_SEPARATOR() external view returns (bytes32); } 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } 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 safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } 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() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } contract SafeStake is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; IERC20 public immutable stakingToken; IERC20 public immutable rewardToken; uint public duration = 180 days; uint public finishAt; uint public updatedAt; uint public rewardRate; uint public rewardPerTokenStored; mapping(address => uint) public userRewardPerTokenPaid; mapping(address => uint) public rewards; uint public totalSupply; mapping(address => uint) public balanceOf; event Stake(address indexed user, uint256 amount); event Rewarded(address indexed user, uint256 amount); event WithdrawStaked(address indexed user, uint256 amount); event RewardAmountAdded(uint256 amount); modifier updateReward(address _account) { } constructor(address _stakingToken, address _rewardToken) { } function setRewardsDuration(uint _duration) external onlyOwner { } function startPool(uint _amount) external onlyOwner updateReward(address(0)){ if(block.timestamp > finishAt) { rewardRate = _amount / duration; rewardToken.safeTransferFrom(address(msg.sender), address(this), _amount); } else { uint remainingRewards = rewardRate * (finishAt - block.timestamp); rewardRate = (remainingRewards + _amount) / duration; rewardToken.safeTransferFrom(address(msg.sender), address(this), _amount); } require(rewardRate > 0, "Reward rate = 0"); require(<FILL_ME>) finishAt = block.timestamp + duration; updatedAt = block.timestamp; emit RewardAmountAdded(_amount); } function addRewardFunds(uint _amount) external onlyOwner updateReward(address(0)) { } function emergencyEndPool() external onlyOwner updateReward(address(0)) { } function stake(uint _amount) external updateReward(msg.sender) nonReentrant { } function withdraw(uint _amount) external updateReward(msg.sender) nonReentrant { } function emergencyWithdrawal(uint _amount) external updateReward(msg.sender) nonReentrant { } function lastTimeRewardApplicable() public view returns (uint) { } function rewardPerToken() public view returns (uint) { } function earned(address _account) public view returns (uint) { } function getReward() external updateReward(msg.sender) nonReentrant { } function _min(uint x, uint y) private pure returns (uint) { } function clearStuckETH() external onlyOwner { } function clearStuckTokens(address contractAddress) external onlyOwner { } }
rewardRate*duration<=rewardToken.balanceOf(address(this)),"Reward amount > balance"
119,955
rewardRate*duration<=rewardToken.balanceOf(address(this))
"Bank can not be the zero address"
// SPDX-License-Identifier: GPL-3.0-only // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IVault.sol"; import "./TBTCOptimisticMinting.sol"; import "../bank/Bank.sol"; import "../token/TBTC.sol"; /// @title TBTC application vault /// @notice TBTC is a fully Bitcoin-backed ERC-20 token pegged to the price of /// Bitcoin. It facilitates Bitcoin holders to act on the Ethereum /// blockchain and access the decentralized finance (DeFi) ecosystem. /// TBTC Vault mints and unmints TBTC based on Bitcoin balances in the /// Bank. /// @dev TBTC Vault is the owner of TBTC token contract and is the only contract /// minting the token. contract TBTCVault is IVault, Ownable, TBTCOptimisticMinting { using SafeERC20 for IERC20; Bank public immutable bank; TBTC public immutable tbtcToken; /// @notice The address of a new TBTC vault. Set only when the upgrade /// process is pending. Once the upgrade gets finalized, the new /// TBTC vault will become an owner of TBTC token. address public newVault; /// @notice The timestamp at which an upgrade to a new TBTC vault was /// initiated. Set only when the upgrade process is pending. uint256 public upgradeInitiatedTimestamp; event Minted(address indexed to, uint256 amount); event Unminted(address indexed from, uint256 amount); event UpgradeInitiated(address newVault, uint256 timestamp); event UpgradeFinalized(address newVault); modifier onlyBank() { } constructor( Bank _bank, TBTC _tbtcToken, Bridge _bridge ) TBTCOptimisticMinting(_bridge) { require(<FILL_ME>) require( address(_tbtcToken) != address(0), "TBTC token can not be the zero address" ); bank = _bank; tbtcToken = _tbtcToken; } /// @notice Mints the given `amount` of TBTC to the caller previously /// transferring `amount / SATOSHI_MULTIPLIER` of the Bank balance /// from caller to TBTC Vault. If `amount` is not divisible by /// SATOSHI_MULTIPLIER, the remainder is left on the caller's /// Bank balance. /// @dev TBTC Vault must have an allowance for caller's balance in the /// Bank for at least `amount / SATOSHI_MULTIPLIER`. /// @param amount Amount of TBTC to mint. function mint(uint256 amount) external { } /// @notice Transfers `satoshis` of the Bank balance from the caller /// to TBTC Vault and mints `satoshis * SATOSHI_MULTIPLIER` of TBTC /// to the caller. /// @dev Can only be called by the Bank via `approveBalanceAndCall`. /// @param owner The owner who approved their Bank balance. /// @param satoshis Amount of satoshis used to mint TBTC. function receiveBalanceApproval( address owner, uint256 satoshis, bytes calldata ) external override onlyBank { } /// @notice Mints the same amount of TBTC as the deposited satoshis amount /// multiplied by SATOSHI_MULTIPLIER for each depositor in the array. /// Can only be called by the Bank after the Bridge swept deposits /// and Bank increased balance for the vault. /// @dev Fails if `depositors` array is empty. Expects the length of /// `depositors` and `depositedSatoshiAmounts` is the same. function receiveBalanceIncrease( address[] calldata depositors, uint256[] calldata depositedSatoshiAmounts ) external override onlyBank { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` back to the caller's balance in /// the Bank. If `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint. function unmint(uint256 amount) external { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` of Bank balance to the Bridge /// requesting redemption based on the provided `redemptionData`. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint and request to redeem in Bridge. /// @param redemptionData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. function unmintAndRedeem(uint256 amount, bytes calldata redemptionData) external { } /// @notice Burns `amount` of TBTC from the caller's balance. If `extraData` /// is empty, transfers `amount` back to the caller's balance in the /// Bank. If `extraData` is not empty, requests redemption in the /// Bridge using the `extraData` as a `redemptionData` parameter to /// Bridge's `receiveBalanceApproval` function. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. Note that it may /// left a token approval equal to the remainder. /// @dev This function is doing the same as `unmint` or `unmintAndRedeem` /// (depending on `extraData` parameter) but it allows to execute /// unminting without a separate approval transaction. The function can /// be called only via `approveAndCall` of TBTC token. /// @param from TBTC token holder executing unminting. /// @param amount Amount of TBTC to unmint. /// @param token TBTC token address. /// @param extraData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. If empty, `receiveApproval` is not requesting a /// redemption of Bank balance but is instead performing just TBTC /// unminting to a Bank balance. function receiveApproval( address from, uint256 amount, address token, bytes calldata extraData ) external { } /// @notice Initiates vault upgrade process. The upgrade process needs to be /// finalized with a call to `finalizeUpgrade` function after the /// `UPGRADE_GOVERNANCE_DELAY` passes. Only the governance can /// initiate the upgrade. /// @param _newVault The new vault address. function initiateUpgrade(address _newVault) external onlyOwner { } /// @notice Allows the governance to finalize vault upgrade process. The /// upgrade process needs to be first initiated with a call to /// `initiateUpgrade` and the `GOVERNANCE_DELAY` needs to pass. /// Once the upgrade is finalized, the new vault becomes the owner /// of the TBTC token and receives the whole Bank balance of this /// vault. function finalizeUpgrade() external onlyOwner onlyAfterGovernanceDelay(upgradeInitiatedTimestamp) { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20FromToken( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721FromToken( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent - mistakenly or not - to the vault address. This /// function should be used to withdraw TBTC v1 tokens transferred /// to TBTCVault as a result of VendingMachine > TBTCVault upgrade. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the vault address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Returns the amount of TBTC to be minted/unminted, the remainder, /// and the Bank balance to be transferred for the given mint/unmint. /// Note that if the `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account when minting or /// unminting. /// @return convertibleAmount Amount of TBTC to be minted/unminted. /// @return remainder Not convertible remainder if amount is not divisible /// by SATOSHI_MULTIPLIER. /// @return satoshis Amount in satoshis - the Bank balance to be transferred /// for the given mint/unmint function amountToSatoshis(uint256 amount) public view returns ( uint256 convertibleAmount, uint256 remainder, uint256 satoshis ) { } // slither-disable-next-line calls-loop function _mint(address minter, uint256 amount) internal override { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmint(address unminter, uint256 amount) internal { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmintAndRedeem( address redeemer, uint256 amount, bytes calldata redemptionData ) internal { } }
address(_bank)!=address(0),"Bank can not be the zero address"
119,981
address(_bank)!=address(0)
"TBTC token can not be the zero address"
// SPDX-License-Identifier: GPL-3.0-only // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IVault.sol"; import "./TBTCOptimisticMinting.sol"; import "../bank/Bank.sol"; import "../token/TBTC.sol"; /// @title TBTC application vault /// @notice TBTC is a fully Bitcoin-backed ERC-20 token pegged to the price of /// Bitcoin. It facilitates Bitcoin holders to act on the Ethereum /// blockchain and access the decentralized finance (DeFi) ecosystem. /// TBTC Vault mints and unmints TBTC based on Bitcoin balances in the /// Bank. /// @dev TBTC Vault is the owner of TBTC token contract and is the only contract /// minting the token. contract TBTCVault is IVault, Ownable, TBTCOptimisticMinting { using SafeERC20 for IERC20; Bank public immutable bank; TBTC public immutable tbtcToken; /// @notice The address of a new TBTC vault. Set only when the upgrade /// process is pending. Once the upgrade gets finalized, the new /// TBTC vault will become an owner of TBTC token. address public newVault; /// @notice The timestamp at which an upgrade to a new TBTC vault was /// initiated. Set only when the upgrade process is pending. uint256 public upgradeInitiatedTimestamp; event Minted(address indexed to, uint256 amount); event Unminted(address indexed from, uint256 amount); event UpgradeInitiated(address newVault, uint256 timestamp); event UpgradeFinalized(address newVault); modifier onlyBank() { } constructor( Bank _bank, TBTC _tbtcToken, Bridge _bridge ) TBTCOptimisticMinting(_bridge) { require( address(_bank) != address(0), "Bank can not be the zero address" ); require(<FILL_ME>) bank = _bank; tbtcToken = _tbtcToken; } /// @notice Mints the given `amount` of TBTC to the caller previously /// transferring `amount / SATOSHI_MULTIPLIER` of the Bank balance /// from caller to TBTC Vault. If `amount` is not divisible by /// SATOSHI_MULTIPLIER, the remainder is left on the caller's /// Bank balance. /// @dev TBTC Vault must have an allowance for caller's balance in the /// Bank for at least `amount / SATOSHI_MULTIPLIER`. /// @param amount Amount of TBTC to mint. function mint(uint256 amount) external { } /// @notice Transfers `satoshis` of the Bank balance from the caller /// to TBTC Vault and mints `satoshis * SATOSHI_MULTIPLIER` of TBTC /// to the caller. /// @dev Can only be called by the Bank via `approveBalanceAndCall`. /// @param owner The owner who approved their Bank balance. /// @param satoshis Amount of satoshis used to mint TBTC. function receiveBalanceApproval( address owner, uint256 satoshis, bytes calldata ) external override onlyBank { } /// @notice Mints the same amount of TBTC as the deposited satoshis amount /// multiplied by SATOSHI_MULTIPLIER for each depositor in the array. /// Can only be called by the Bank after the Bridge swept deposits /// and Bank increased balance for the vault. /// @dev Fails if `depositors` array is empty. Expects the length of /// `depositors` and `depositedSatoshiAmounts` is the same. function receiveBalanceIncrease( address[] calldata depositors, uint256[] calldata depositedSatoshiAmounts ) external override onlyBank { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` back to the caller's balance in /// the Bank. If `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint. function unmint(uint256 amount) external { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` of Bank balance to the Bridge /// requesting redemption based on the provided `redemptionData`. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint and request to redeem in Bridge. /// @param redemptionData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. function unmintAndRedeem(uint256 amount, bytes calldata redemptionData) external { } /// @notice Burns `amount` of TBTC from the caller's balance. If `extraData` /// is empty, transfers `amount` back to the caller's balance in the /// Bank. If `extraData` is not empty, requests redemption in the /// Bridge using the `extraData` as a `redemptionData` parameter to /// Bridge's `receiveBalanceApproval` function. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. Note that it may /// left a token approval equal to the remainder. /// @dev This function is doing the same as `unmint` or `unmintAndRedeem` /// (depending on `extraData` parameter) but it allows to execute /// unminting without a separate approval transaction. The function can /// be called only via `approveAndCall` of TBTC token. /// @param from TBTC token holder executing unminting. /// @param amount Amount of TBTC to unmint. /// @param token TBTC token address. /// @param extraData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. If empty, `receiveApproval` is not requesting a /// redemption of Bank balance but is instead performing just TBTC /// unminting to a Bank balance. function receiveApproval( address from, uint256 amount, address token, bytes calldata extraData ) external { } /// @notice Initiates vault upgrade process. The upgrade process needs to be /// finalized with a call to `finalizeUpgrade` function after the /// `UPGRADE_GOVERNANCE_DELAY` passes. Only the governance can /// initiate the upgrade. /// @param _newVault The new vault address. function initiateUpgrade(address _newVault) external onlyOwner { } /// @notice Allows the governance to finalize vault upgrade process. The /// upgrade process needs to be first initiated with a call to /// `initiateUpgrade` and the `GOVERNANCE_DELAY` needs to pass. /// Once the upgrade is finalized, the new vault becomes the owner /// of the TBTC token and receives the whole Bank balance of this /// vault. function finalizeUpgrade() external onlyOwner onlyAfterGovernanceDelay(upgradeInitiatedTimestamp) { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20FromToken( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721FromToken( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent - mistakenly or not - to the vault address. This /// function should be used to withdraw TBTC v1 tokens transferred /// to TBTCVault as a result of VendingMachine > TBTCVault upgrade. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the vault address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Returns the amount of TBTC to be minted/unminted, the remainder, /// and the Bank balance to be transferred for the given mint/unmint. /// Note that if the `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account when minting or /// unminting. /// @return convertibleAmount Amount of TBTC to be minted/unminted. /// @return remainder Not convertible remainder if amount is not divisible /// by SATOSHI_MULTIPLIER. /// @return satoshis Amount in satoshis - the Bank balance to be transferred /// for the given mint/unmint function amountToSatoshis(uint256 amount) public view returns ( uint256 convertibleAmount, uint256 remainder, uint256 satoshis ) { } // slither-disable-next-line calls-loop function _mint(address minter, uint256 amount) internal override { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmint(address unminter, uint256 amount) internal { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmintAndRedeem( address redeemer, uint256 amount, bytes calldata redemptionData ) internal { } }
address(_tbtcToken)!=address(0),"TBTC token can not be the zero address"
119,981
address(_tbtcToken)!=address(0)
"Amount exceeds balance in the bank"
// SPDX-License-Identifier: GPL-3.0-only // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IVault.sol"; import "./TBTCOptimisticMinting.sol"; import "../bank/Bank.sol"; import "../token/TBTC.sol"; /// @title TBTC application vault /// @notice TBTC is a fully Bitcoin-backed ERC-20 token pegged to the price of /// Bitcoin. It facilitates Bitcoin holders to act on the Ethereum /// blockchain and access the decentralized finance (DeFi) ecosystem. /// TBTC Vault mints and unmints TBTC based on Bitcoin balances in the /// Bank. /// @dev TBTC Vault is the owner of TBTC token contract and is the only contract /// minting the token. contract TBTCVault is IVault, Ownable, TBTCOptimisticMinting { using SafeERC20 for IERC20; Bank public immutable bank; TBTC public immutable tbtcToken; /// @notice The address of a new TBTC vault. Set only when the upgrade /// process is pending. Once the upgrade gets finalized, the new /// TBTC vault will become an owner of TBTC token. address public newVault; /// @notice The timestamp at which an upgrade to a new TBTC vault was /// initiated. Set only when the upgrade process is pending. uint256 public upgradeInitiatedTimestamp; event Minted(address indexed to, uint256 amount); event Unminted(address indexed from, uint256 amount); event UpgradeInitiated(address newVault, uint256 timestamp); event UpgradeFinalized(address newVault); modifier onlyBank() { } constructor( Bank _bank, TBTC _tbtcToken, Bridge _bridge ) TBTCOptimisticMinting(_bridge) { } /// @notice Mints the given `amount` of TBTC to the caller previously /// transferring `amount / SATOSHI_MULTIPLIER` of the Bank balance /// from caller to TBTC Vault. If `amount` is not divisible by /// SATOSHI_MULTIPLIER, the remainder is left on the caller's /// Bank balance. /// @dev TBTC Vault must have an allowance for caller's balance in the /// Bank for at least `amount / SATOSHI_MULTIPLIER`. /// @param amount Amount of TBTC to mint. function mint(uint256 amount) external { (uint256 convertibleAmount, , uint256 satoshis) = amountToSatoshis( amount ); require(<FILL_ME>) _mint(msg.sender, convertibleAmount); bank.transferBalanceFrom(msg.sender, address(this), satoshis); } /// @notice Transfers `satoshis` of the Bank balance from the caller /// to TBTC Vault and mints `satoshis * SATOSHI_MULTIPLIER` of TBTC /// to the caller. /// @dev Can only be called by the Bank via `approveBalanceAndCall`. /// @param owner The owner who approved their Bank balance. /// @param satoshis Amount of satoshis used to mint TBTC. function receiveBalanceApproval( address owner, uint256 satoshis, bytes calldata ) external override onlyBank { } /// @notice Mints the same amount of TBTC as the deposited satoshis amount /// multiplied by SATOSHI_MULTIPLIER for each depositor in the array. /// Can only be called by the Bank after the Bridge swept deposits /// and Bank increased balance for the vault. /// @dev Fails if `depositors` array is empty. Expects the length of /// `depositors` and `depositedSatoshiAmounts` is the same. function receiveBalanceIncrease( address[] calldata depositors, uint256[] calldata depositedSatoshiAmounts ) external override onlyBank { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` back to the caller's balance in /// the Bank. If `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint. function unmint(uint256 amount) external { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` of Bank balance to the Bridge /// requesting redemption based on the provided `redemptionData`. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint and request to redeem in Bridge. /// @param redemptionData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. function unmintAndRedeem(uint256 amount, bytes calldata redemptionData) external { } /// @notice Burns `amount` of TBTC from the caller's balance. If `extraData` /// is empty, transfers `amount` back to the caller's balance in the /// Bank. If `extraData` is not empty, requests redemption in the /// Bridge using the `extraData` as a `redemptionData` parameter to /// Bridge's `receiveBalanceApproval` function. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. Note that it may /// left a token approval equal to the remainder. /// @dev This function is doing the same as `unmint` or `unmintAndRedeem` /// (depending on `extraData` parameter) but it allows to execute /// unminting without a separate approval transaction. The function can /// be called only via `approveAndCall` of TBTC token. /// @param from TBTC token holder executing unminting. /// @param amount Amount of TBTC to unmint. /// @param token TBTC token address. /// @param extraData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. If empty, `receiveApproval` is not requesting a /// redemption of Bank balance but is instead performing just TBTC /// unminting to a Bank balance. function receiveApproval( address from, uint256 amount, address token, bytes calldata extraData ) external { } /// @notice Initiates vault upgrade process. The upgrade process needs to be /// finalized with a call to `finalizeUpgrade` function after the /// `UPGRADE_GOVERNANCE_DELAY` passes. Only the governance can /// initiate the upgrade. /// @param _newVault The new vault address. function initiateUpgrade(address _newVault) external onlyOwner { } /// @notice Allows the governance to finalize vault upgrade process. The /// upgrade process needs to be first initiated with a call to /// `initiateUpgrade` and the `GOVERNANCE_DELAY` needs to pass. /// Once the upgrade is finalized, the new vault becomes the owner /// of the TBTC token and receives the whole Bank balance of this /// vault. function finalizeUpgrade() external onlyOwner onlyAfterGovernanceDelay(upgradeInitiatedTimestamp) { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20FromToken( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721FromToken( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent - mistakenly or not - to the vault address. This /// function should be used to withdraw TBTC v1 tokens transferred /// to TBTCVault as a result of VendingMachine > TBTCVault upgrade. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the vault address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Returns the amount of TBTC to be minted/unminted, the remainder, /// and the Bank balance to be transferred for the given mint/unmint. /// Note that if the `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account when minting or /// unminting. /// @return convertibleAmount Amount of TBTC to be minted/unminted. /// @return remainder Not convertible remainder if amount is not divisible /// by SATOSHI_MULTIPLIER. /// @return satoshis Amount in satoshis - the Bank balance to be transferred /// for the given mint/unmint function amountToSatoshis(uint256 amount) public view returns ( uint256 convertibleAmount, uint256 remainder, uint256 satoshis ) { } // slither-disable-next-line calls-loop function _mint(address minter, uint256 amount) internal override { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmint(address unminter, uint256 amount) internal { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmintAndRedeem( address redeemer, uint256 amount, bytes calldata redemptionData ) internal { } }
bank.balanceOf(msg.sender)>=satoshis,"Amount exceeds balance in the bank"
119,981
bank.balanceOf(msg.sender)>=satoshis
"Amount exceeds balance in the bank"
// SPDX-License-Identifier: GPL-3.0-only // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IVault.sol"; import "./TBTCOptimisticMinting.sol"; import "../bank/Bank.sol"; import "../token/TBTC.sol"; /// @title TBTC application vault /// @notice TBTC is a fully Bitcoin-backed ERC-20 token pegged to the price of /// Bitcoin. It facilitates Bitcoin holders to act on the Ethereum /// blockchain and access the decentralized finance (DeFi) ecosystem. /// TBTC Vault mints and unmints TBTC based on Bitcoin balances in the /// Bank. /// @dev TBTC Vault is the owner of TBTC token contract and is the only contract /// minting the token. contract TBTCVault is IVault, Ownable, TBTCOptimisticMinting { using SafeERC20 for IERC20; Bank public immutable bank; TBTC public immutable tbtcToken; /// @notice The address of a new TBTC vault. Set only when the upgrade /// process is pending. Once the upgrade gets finalized, the new /// TBTC vault will become an owner of TBTC token. address public newVault; /// @notice The timestamp at which an upgrade to a new TBTC vault was /// initiated. Set only when the upgrade process is pending. uint256 public upgradeInitiatedTimestamp; event Minted(address indexed to, uint256 amount); event Unminted(address indexed from, uint256 amount); event UpgradeInitiated(address newVault, uint256 timestamp); event UpgradeFinalized(address newVault); modifier onlyBank() { } constructor( Bank _bank, TBTC _tbtcToken, Bridge _bridge ) TBTCOptimisticMinting(_bridge) { } /// @notice Mints the given `amount` of TBTC to the caller previously /// transferring `amount / SATOSHI_MULTIPLIER` of the Bank balance /// from caller to TBTC Vault. If `amount` is not divisible by /// SATOSHI_MULTIPLIER, the remainder is left on the caller's /// Bank balance. /// @dev TBTC Vault must have an allowance for caller's balance in the /// Bank for at least `amount / SATOSHI_MULTIPLIER`. /// @param amount Amount of TBTC to mint. function mint(uint256 amount) external { } /// @notice Transfers `satoshis` of the Bank balance from the caller /// to TBTC Vault and mints `satoshis * SATOSHI_MULTIPLIER` of TBTC /// to the caller. /// @dev Can only be called by the Bank via `approveBalanceAndCall`. /// @param owner The owner who approved their Bank balance. /// @param satoshis Amount of satoshis used to mint TBTC. function receiveBalanceApproval( address owner, uint256 satoshis, bytes calldata ) external override onlyBank { require(<FILL_ME>) _mint(owner, satoshis * SATOSHI_MULTIPLIER); bank.transferBalanceFrom(owner, address(this), satoshis); } /// @notice Mints the same amount of TBTC as the deposited satoshis amount /// multiplied by SATOSHI_MULTIPLIER for each depositor in the array. /// Can only be called by the Bank after the Bridge swept deposits /// and Bank increased balance for the vault. /// @dev Fails if `depositors` array is empty. Expects the length of /// `depositors` and `depositedSatoshiAmounts` is the same. function receiveBalanceIncrease( address[] calldata depositors, uint256[] calldata depositedSatoshiAmounts ) external override onlyBank { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` back to the caller's balance in /// the Bank. If `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint. function unmint(uint256 amount) external { } /// @notice Burns `amount` of TBTC from the caller's balance and transfers /// `amount / SATOSHI_MULTIPLIER` of Bank balance to the Bridge /// requesting redemption based on the provided `redemptionData`. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. /// @dev Caller must have at least `amount` of TBTC approved to /// TBTC Vault. /// @param amount Amount of TBTC to unmint and request to redeem in Bridge. /// @param redemptionData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. function unmintAndRedeem(uint256 amount, bytes calldata redemptionData) external { } /// @notice Burns `amount` of TBTC from the caller's balance. If `extraData` /// is empty, transfers `amount` back to the caller's balance in the /// Bank. If `extraData` is not empty, requests redemption in the /// Bridge using the `extraData` as a `redemptionData` parameter to /// Bridge's `receiveBalanceApproval` function. /// If `amount` is not divisible by SATOSHI_MULTIPLIER, the /// remainder is left on the caller's account. Note that it may /// left a token approval equal to the remainder. /// @dev This function is doing the same as `unmint` or `unmintAndRedeem` /// (depending on `extraData` parameter) but it allows to execute /// unminting without a separate approval transaction. The function can /// be called only via `approveAndCall` of TBTC token. /// @param from TBTC token holder executing unminting. /// @param amount Amount of TBTC to unmint. /// @param token TBTC token address. /// @param extraData Redemption data in a format expected from /// `redemptionData` parameter of Bridge's `receiveBalanceApproval` /// function. If empty, `receiveApproval` is not requesting a /// redemption of Bank balance but is instead performing just TBTC /// unminting to a Bank balance. function receiveApproval( address from, uint256 amount, address token, bytes calldata extraData ) external { } /// @notice Initiates vault upgrade process. The upgrade process needs to be /// finalized with a call to `finalizeUpgrade` function after the /// `UPGRADE_GOVERNANCE_DELAY` passes. Only the governance can /// initiate the upgrade. /// @param _newVault The new vault address. function initiateUpgrade(address _newVault) external onlyOwner { } /// @notice Allows the governance to finalize vault upgrade process. The /// upgrade process needs to be first initiated with a call to /// `initiateUpgrade` and the `GOVERNANCE_DELAY` needs to pass. /// Once the upgrade is finalized, the new vault becomes the owner /// of the TBTC token and receives the whole Bank balance of this /// vault. function finalizeUpgrade() external onlyOwner onlyAfterGovernanceDelay(upgradeInitiatedTimestamp) { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20FromToken( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the TBTC token contract address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721FromToken( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC20 /// token sent - mistakenly or not - to the vault address. This /// function should be used to withdraw TBTC v1 tokens transferred /// to TBTCVault as a result of VendingMachine > TBTCVault upgrade. /// @param token Address of the recovered ERC20 token contract. /// @param recipient Address the recovered token should be sent to. /// @param amount Recovered amount. function recoverERC20( IERC20 token, address recipient, uint256 amount ) external onlyOwner { } /// @notice Allows the governance of the TBTCVault to recover any ERC721 /// token sent mistakenly to the vault address. /// @param token Address of the recovered ERC721 token contract. /// @param recipient Address the recovered token should be sent to. /// @param tokenId Identifier of the recovered token. /// @param data Additional data. function recoverERC721( IERC721 token, address recipient, uint256 tokenId, bytes calldata data ) external onlyOwner { } /// @notice Returns the amount of TBTC to be minted/unminted, the remainder, /// and the Bank balance to be transferred for the given mint/unmint. /// Note that if the `amount` is not divisible by SATOSHI_MULTIPLIER, /// the remainder is left on the caller's account when minting or /// unminting. /// @return convertibleAmount Amount of TBTC to be minted/unminted. /// @return remainder Not convertible remainder if amount is not divisible /// by SATOSHI_MULTIPLIER. /// @return satoshis Amount in satoshis - the Bank balance to be transferred /// for the given mint/unmint function amountToSatoshis(uint256 amount) public view returns ( uint256 convertibleAmount, uint256 remainder, uint256 satoshis ) { } // slither-disable-next-line calls-loop function _mint(address minter, uint256 amount) internal override { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmint(address unminter, uint256 amount) internal { } /// @dev `amount` MUST be divisible by SATOSHI_MULTIPLIER with no change. function _unmintAndRedeem( address redeemer, uint256 amount, bytes calldata redemptionData ) internal { } }
bank.balanceOf(owner)>=satoshis,"Amount exceeds balance in the bank"
119,981
bank.balanceOf(owner)>=satoshis
"Ownable: caller is not the owner"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; address private _creator; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(<FILL_ME>) _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } pragma solidity ^0.8.0; contract KibaGenesis is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; //mappings for whitelisted addresses and total minted per address mapping(address => bool) whitelisted; mapping(address => uint) minted; // max / limits uint256 public MAX_MINTED = 112; uint256 public PURCHASE_LIMIT = 1; //minting for public active bool private _isActive = false; //minting for whitelisted addresses active bool private _whitelistActive = false; // uri string private _tokenBaseURI = ""; // whitelisting address[] private _addresses; Counters.Counter private mintedCount; constructor() ERC721("Kiba Inu Genesis I", "KIBA") { } function canMint ( address account ) external view returns ( bool ) { } function isAccountWhitelisted ( address account ) external view returns (bool) { } function isActive ( ) external view returns (bool) { } function isWhitelistActive ( ) external view returns (bool) { } function setWhitelistActive (bool _isWhitelistActive) external onlyOwner { } function setWhitelisted (address account, bool whitelistActive) external onlyOwner { } function setActive(bool isMintActive) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function setPurchaseLimit(uint256 purchaseLimit) external onlyOwner { } function gift(address to, uint256 numberOfTokens) external onlyOwner { } function normalMint() external payable { } function whitelistMint() external { } // function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { // require(_exists(tokenId), "Token does not exist"); // return string(abi.encodePacked(_tokenBaseURI, tokenId.toString())); // } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
owner()==_msgSender()||_creator==_msgSender(),"Ownable: caller is not the owner"
120,063
owner()==_msgSender()||_creator==_msgSender()
"Purchase would exceed MAX_MINTED"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; address private _creator; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } pragma solidity ^0.8.0; contract KibaGenesis is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; //mappings for whitelisted addresses and total minted per address mapping(address => bool) whitelisted; mapping(address => uint) minted; // max / limits uint256 public MAX_MINTED = 112; uint256 public PURCHASE_LIMIT = 1; //minting for public active bool private _isActive = false; //minting for whitelisted addresses active bool private _whitelistActive = false; // uri string private _tokenBaseURI = ""; // whitelisting address[] private _addresses; Counters.Counter private mintedCount; constructor() ERC721("Kiba Inu Genesis I", "KIBA") { } function canMint ( address account ) external view returns ( bool ) { } function isAccountWhitelisted ( address account ) external view returns (bool) { } function isActive ( ) external view returns (bool) { } function isWhitelistActive ( ) external view returns (bool) { } function setWhitelistActive (bool _isWhitelistActive) external onlyOwner { } function setWhitelisted (address account, bool whitelistActive) external onlyOwner { } function setActive(bool isMintActive) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function setPurchaseLimit(uint256 purchaseLimit) external onlyOwner { } function gift(address to, uint256 numberOfTokens) external onlyOwner { } function normalMint() external payable { require(_isActive, "Minting is not active"); require(<FILL_ME>) // owner can mint as many as they pleases address contractOwner = owner(); if (address(msg.sender) != contractOwner) { require(minted[msg.sender] < PURCHASE_LIMIT, "Only one whitelist minting is allowed per address"); } // JSON files start at 1.json uint256 tokenId = mintedCount.current() + 1; if (mintedCount.current() < MAX_MINTED) { mintedCount.increment(); _safeMint(msg.sender, tokenId); minted[msg.sender] += 1; } } function whitelistMint() external { } // function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { // require(_exists(tokenId), "Token does not exist"); // return string(abi.encodePacked(_tokenBaseURI, tokenId.toString())); // } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
mintedCount.current()+1<MAX_MINTED,"Purchase would exceed MAX_MINTED"
120,063
mintedCount.current()+1<MAX_MINTED
"Only one whitelist minting is allowed per address"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; address private _creator; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } pragma solidity ^0.8.0; contract KibaGenesis is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; //mappings for whitelisted addresses and total minted per address mapping(address => bool) whitelisted; mapping(address => uint) minted; // max / limits uint256 public MAX_MINTED = 112; uint256 public PURCHASE_LIMIT = 1; //minting for public active bool private _isActive = false; //minting for whitelisted addresses active bool private _whitelistActive = false; // uri string private _tokenBaseURI = ""; // whitelisting address[] private _addresses; Counters.Counter private mintedCount; constructor() ERC721("Kiba Inu Genesis I", "KIBA") { } function canMint ( address account ) external view returns ( bool ) { } function isAccountWhitelisted ( address account ) external view returns (bool) { } function isActive ( ) external view returns (bool) { } function isWhitelistActive ( ) external view returns (bool) { } function setWhitelistActive (bool _isWhitelistActive) external onlyOwner { } function setWhitelisted (address account, bool whitelistActive) external onlyOwner { } function setActive(bool isMintActive) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function setPurchaseLimit(uint256 purchaseLimit) external onlyOwner { } function gift(address to, uint256 numberOfTokens) external onlyOwner { } function normalMint() external payable { require(_isActive, "Minting is not active"); require(mintedCount.current() + 1 < MAX_MINTED,"Purchase would exceed MAX_MINTED"); // owner can mint as many as they pleases address contractOwner = owner(); if (address(msg.sender) != contractOwner) { require(<FILL_ME>) } // JSON files start at 1.json uint256 tokenId = mintedCount.current() + 1; if (mintedCount.current() < MAX_MINTED) { mintedCount.increment(); _safeMint(msg.sender, tokenId); minted[msg.sender] += 1; } } function whitelistMint() external { } // function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { // require(_exists(tokenId), "Token does not exist"); // return string(abi.encodePacked(_tokenBaseURI, tokenId.toString())); // } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
minted[msg.sender]<PURCHASE_LIMIT,"Only one whitelist minting is allowed per address"
120,063
minted[msg.sender]<PURCHASE_LIMIT
"You're not allowed to mint this Much!"
pragma solidity 0.8.14; // SPDX-License-Identifier: MIT import "./ERC721A.sol"; import "./Ownable.sol"; import "./MerkleProof.sol"; interface ticket { function Cmint( address account, uint256 _id, uint256 _amount ) external; function balanceOf(address account, uint256 id) external returns (uint256); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) external; } contract Glory_Games is ERC721A, Ownable { using Strings for uint256; mapping(address => uint256) public whitelistClaimed; string public baseURI; string public baseExtension = ".json"; uint256 public whitelistCost = 0.07 ether; uint256 public publicCost = 0.07 ether; bool public whitelistEnabled = false; string public UnrevealedURI; bool public revealed = false; bool public paused = true; bytes32 public merkleRoot; uint256 public maxWhitelist = 10; uint256 public maxPublic = 10; uint256 public maxSupply = 5000; ticket ticketContract; address Contract; bool FreeMint = true; // with tickets constructor( address _ticket ) ERC721A("Glory Games Gen 0 Pet NFT", "#GLORYGEN0PET") { } function whitelistMint(uint256 quantity, bytes32[] calldata _merkleProof) public payable { uint256 supply = totalSupply(); require(quantity > 0, "Quantity Must Be Higher Than Zero"); require(supply + quantity <= maxSupply, "Max Supply Reached"); require(whitelistEnabled, "The whitelist sale is not enabled!"); require(<FILL_ME>) require(msg.value >= whitelistCost * quantity, "Insufficient Funds"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof!" ); whitelistClaimed[msg.sender] += quantity; _safeMint(msg.sender, quantity); } function mint(uint256 quantity) external payable { } modifier onlyAdmin() { } // for future use function avatar( address _from, uint256 _id, uint256 quantity ) external onlyAdmin { } function freeMint(uint256 quantity, uint256 _id) public { } function setContracts(address _avatar, address _ticket) public onlyOwner { } // internal function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _whitelistCost, uint256 _publicCost) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual returns (bytes4) { } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual returns (bytes4) { } function setMintStatus(bool _state, bool _freemint) public onlyOwner { } function setUnrevealedUri(string memory _UnrevealedUri) public onlyOwner { } function setMax(uint256 _whitelist, uint256 _public) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setWhitelistEnabled(bool _state) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function withdraw() public onlyOwner { } }
whitelistClaimed[msg.sender]+quantity<=maxWhitelist,"You're not allowed to mint this Much!"
120,085
whitelistClaimed[msg.sender]+quantity<=maxWhitelist
"you dont have enough tickets to mint this much"
pragma solidity 0.8.14; // SPDX-License-Identifier: MIT import "./ERC721A.sol"; import "./Ownable.sol"; import "./MerkleProof.sol"; interface ticket { function Cmint( address account, uint256 _id, uint256 _amount ) external; function balanceOf(address account, uint256 id) external returns (uint256); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) external; } contract Glory_Games is ERC721A, Ownable { using Strings for uint256; mapping(address => uint256) public whitelistClaimed; string public baseURI; string public baseExtension = ".json"; uint256 public whitelistCost = 0.07 ether; uint256 public publicCost = 0.07 ether; bool public whitelistEnabled = false; string public UnrevealedURI; bool public revealed = false; bool public paused = true; bytes32 public merkleRoot; uint256 public maxWhitelist = 10; uint256 public maxPublic = 10; uint256 public maxSupply = 5000; ticket ticketContract; address Contract; bool FreeMint = true; // with tickets constructor( address _ticket ) ERC721A("Glory Games Gen 0 Pet NFT", "#GLORYGEN0PET") { } function whitelistMint(uint256 quantity, bytes32[] calldata _merkleProof) public payable { } function mint(uint256 quantity) external payable { } modifier onlyAdmin() { } // for future use function avatar( address _from, uint256 _id, uint256 quantity ) external onlyAdmin { } function freeMint(uint256 quantity, uint256 _id) public { require(FreeMint, "Free/Tickets Mint isn't enabled"); uint256 supply = totalSupply(); require(quantity != 0, "Quantity Must Be Higher Than Zero"); require(supply + quantity <= maxSupply, "Max Supply Reached"); require(<FILL_ME>) ticketContract.safeTransferFrom(msg.sender, owner(), _id, quantity, ""); if (_id == 2 || _id == 3) { // premium ticket ticketContract.Cmint(msg.sender, 4, quantity); // airdrop avatar ticket } _safeMint(msg.sender, quantity); } function setContracts(address _avatar, address _ticket) public onlyOwner { } // internal function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _whitelistCost, uint256 _publicCost) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual returns (bytes4) { } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual returns (bytes4) { } function setMintStatus(bool _state, bool _freemint) public onlyOwner { } function setUnrevealedUri(string memory _UnrevealedUri) public onlyOwner { } function setMax(uint256 _whitelist, uint256 _public) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setWhitelistEnabled(bool _state) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function withdraw() public onlyOwner { } }
ticketContract.balanceOf(msg.sender,_id)>=quantity,"you dont have enough tickets to mint this much"
120,085
ticketContract.balanceOf(msg.sender,_id)>=quantity
"Collection already exists"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) uint256 newIndex = StakingStorage.layout().collectionsCount; StakingStorage.layout().collectionsByIndex[newIndex] = collection; StakingStorage.layout().collections[collection] = IERC721(collection); StakingRewardsStorage.layout().pointsPerDay[collection] = pointsPerDay_; unchecked { StakingStorage.layout().collectionsCount++; } } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
address(StakingStorage.layout().collections[collection])==address(0),"Collection already exists"
120,161
address(StakingStorage.layout().collections[collection])==address(0)
"Invalid collection"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) StakingRewardsStorage.layout().pointsPerDay[ collection ] = newPointsPerDay; } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
address(StakingStorage.layout().collections[collection])!=address(0),"Invalid collection"
120,161
address(StakingStorage.layout().collections[collection])!=address(0)
"Presale is not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { require(<FILL_ME>) require( MerkleProof.verify( proof, PresaleStorage.layout().merkleRoot, keccak256(abi.encodePacked(_msgSender(), allowed)) ), "Presale invalid" ); require( !PresaleStorage.layout().claimed[_msgSender()], "Already claimed" ); PresaleStorage.layout().claimed[_msgSender()] = true; _mint(_msgSender(), allowed); } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
PresaleStorage.layout().merkleRoot!="","Presale is not active"
120,161
PresaleStorage.layout().merkleRoot!=""
"Presale invalid"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { require( PresaleStorage.layout().merkleRoot != "", "Presale is not active" ); require(<FILL_ME>) require( !PresaleStorage.layout().claimed[_msgSender()], "Already claimed" ); PresaleStorage.layout().claimed[_msgSender()] = true; _mint(_msgSender(), allowed); } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
MerkleProof.verify(proof,PresaleStorage.layout().merkleRoot,keccak256(abi.encodePacked(_msgSender(),allowed))),"Presale invalid"
120,161
MerkleProof.verify(proof,PresaleStorage.layout().merkleRoot,keccak256(abi.encodePacked(_msgSender(),allowed)))
"Already claimed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { require( PresaleStorage.layout().merkleRoot != "", "Presale is not active" ); require( MerkleProof.verify( proof, PresaleStorage.layout().merkleRoot, keccak256(abi.encodePacked(_msgSender(), allowed)) ), "Presale invalid" ); require(<FILL_ME>) PresaleStorage.layout().claimed[_msgSender()] = true; _mint(_msgSender(), allowed); } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
!PresaleStorage.layout().claimed[_msgSender()],"Already claimed"
120,161
!PresaleStorage.layout().claimed[_msgSender()]
"Token is not staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { } function claimRewards() external { } function getClaimableRewards(address user) public view returns (uint256) { } function getClaimedRewards(address user) public view returns (uint256) { } function stakingCount(address collection, address user) external view returns (uint256) { } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { } function pointsPerDay(address collection) external view returns (uint256) { } function collectionsCount() external view returns (uint256) { } function collectionByIndex(uint256 index) external view returns (address) { } function presaleClaimed(address user) external view returns (bool) { } function _stake(address collection, uint256 tokenId) internal { } function _unstake( address user, address collection, uint256 tokenId ) internal { require( address(StakingStorage.layout().collections[collection]) != address(0), "Invalid collection" ); require(<FILL_ME>) StakingStorage.layout().collections[collection].transferFrom( address(this), user, tokenId ); unchecked { StakingRewardsStorage.layout().claimableByUser[ user ] += _getPendingRewardsPerToken(collection, user, tokenId); } StakingStorage.layout().staking[collection][user][tokenId] = false; } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } }
StakingStorage.layout().staking[collection][user][tokenId],"Token is not staked"
120,161
StakingStorage.layout().staking[collection][user][tokenId]
"wrong amount notified"
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/ILocker.sol"; import "../interfaces/ILiquidityGauge.sol"; import { ISDTDistributor } from "../interfaces/ISDTDistributor.sol"; /// @title BaseAccumulator /// @notice A contract that defines the functions shared by all accumulators /// @author StakeDAO contract BaseAccumulator { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ address public governance; address public locker; address public tokenReward; address public gauge; address public sdtDistributor; /* ========== EVENTS ========== */ event SdtDistributorUpdated(address oldDistributor, address newDistributor); event GaugeSet(address oldGauge, address newGauge); event RewardNotified(address gauge, address tokenReward, uint256 amount); event LockerSet(address oldLocker, address newLocker); event GovernanceSet(address oldGov, address newGov); event TokenRewardSet(address oldTr, address newTr); event TokenDeposited(address token, uint256 amount); event ERC20Rescued(address token, uint256 amount); /* ========== CONSTRUCTOR ========== */ constructor(address _tokenReward) { } /* ========== MUTATIVE FUNCTIONS ========== */ /// @notice Notify the reward using an extra token /// @param _tokenReward token address to notify /// @param _amount amount to notify function notifyExtraReward(address _tokenReward, uint256 _amount) external { } /// @notice Notify the reward using all balance of extra token /// @param _tokenReward token address to notify function notifyAllExtraReward(address _tokenReward) external { } /// @notice Notify the new reward to the LGV4 /// @param _tokenReward token to notify /// @param _amount amount to notify function _notifyReward(address _tokenReward, uint256 _amount) internal { require(gauge != address(0), "gauge not set"); require(_amount > 0, "set an amount > 0"); uint256 balanceBefore = IERC20(_tokenReward).balanceOf(address(this)); require(balanceBefore >= _amount, "amount not enough"); if (ILiquidityGauge(gauge).reward_data(_tokenReward).distributor != address(0)) { // Distribute SDT ISDTDistributor(sdtDistributor).distribute(gauge); IERC20(_tokenReward).approve(gauge, _amount); ILiquidityGauge(gauge).deposit_reward_token(_tokenReward, _amount); uint256 balanceAfter = IERC20(_tokenReward).balanceOf(address(this)); require(<FILL_ME>) emit RewardNotified(gauge, _tokenReward, _amount); } } /// @notice Deposit token into the accumulator /// @param _token token to deposit /// @param _amount amount to deposit function depositToken(address _token, uint256 _amount) external { } /// @notice Sets gauge for the accumulator which will receive and distribute the rewards /// @dev Can be called only by the governance /// @param _gauge gauge address function setGauge(address _gauge) external { } /// @notice Sets SdtDistributor to distribute from the Accumulator SDT Rewards to Gauge. /// @dev Can be called only by the governance /// @param _sdtDistributor gauge address function setSdtDistributor(address _sdtDistributor) external { } /// @notice Allows the governance to set the new governance /// @dev Can be called only by the governance /// @param _governance governance address function setGovernance(address _governance) external { } /// @notice Allows the governance to set the locker /// @dev Can be called only by the governance /// @param _locker locker address function setLocker(address _locker) external { } /// @notice Allows the governance to set the token reward /// @dev Can be called only by the governance /// @param _tokenReward token reward address function setTokenReward(address _tokenReward) external { } /// @notice A function that rescue any ERC20 token /// @param _token token address /// @param _amount amount to rescue /// @param _recipient address to send token rescued function rescueERC20( address _token, uint256 _amount, address _recipient ) external { } }
balanceBefore-balanceAfter==_amount,"wrong amount notified"
120,178
balanceBefore-balanceAfter==_amount
"_transfer:: Anti sandwich bot enabled. Please try again later."
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance( address owner, address spender ) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } 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 _createInitialSupply( address account, uint256 amount ) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } 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() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; } interface IDexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } contract QWER is ERC20, Ownable { uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWalletAmount; IDexRouter public dexRouter; address public lpPair; bool private swapping; uint256 public swapTokensAtAmount; address taxAddress; bool public limitsInEffect = true; bool public tradingActive = false; // Anti-sandwithc-bot mappings and variables mapping(address => uint256) private _holderLastBuyBlock; // to hold last Buy temporarily bool public transferDelayEnabled = true; uint256 private buyFee; uint256 private sellFee; /******************/ // exlcude from fees and max transaction amount mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping(address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event ExcludeFromFees(address indexed account, bool isExcluded); constructor() ERC20("QWER", "QWER") { } receive() external payable {} // only enable if no plan to airdrop function enableTrading() external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function excludeFromMaxTransaction( address updAds, bool isEx ) external onlyOwner { } function setAutomatedMarketMakerPair( address pair, bool value ) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "amount must be greater than 0"); if (!tradingActive) { require( _isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active." ); } // anti sandwich bot if ( automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to] && to != address(this) && to != address(dexRouter) ) { _holderLastBuyBlock[to] = block.number; } require(<FILL_ME>) if (limitsInEffect) { if ( from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !_isExcludedFromFees[from] && !_isExcludedFromFees[to] ) { //when buy if ( automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to] ) { require( amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy." ); require( amount + balanceOf(to) <= maxWalletAmount, "Cannot Exceed max wallet" ); } //when sell else if ( automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from] ) { if (amount > maxSellAmount) { amount = maxSellAmount; } } else if (!_isExcludedMaxTransactionAmount[to]) { require( amount + balanceOf(to) <= maxWalletAmount, "Cannot Exceed max tokens per wallet" ); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if ( canSwap && tradingActive && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to] ) { swapping = true; swapBack(); swapping = false; } // only take fees on buys/sells, do not take on wallet transfers if (!_isExcludedFromFees[from] && !_isExcludedFromFees[to]) { uint256 fees = 0; // on sell if (automatedMarketMakerPairs[to] && sellFee > 0) { fees = (amount * sellFee) / 100; } // on buy else if (automatedMarketMakerPairs[from] && buyFee > 0) { fees = (amount * buyFee) / 100; } if (fees > 0) { super._transfer(from, address(this), fees); } amount -= fees; } super._transfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private { } function swapBack() private { } }
_holderLastBuyBlock[from]<block.number,"_transfer:: Anti sandwich bot enabled. Please try again later."
120,230
_holderLastBuyBlock[from]<block.number
"Invalid lock period."
pragma solidity >=0.5.16; pragma experimental ABIEncoderV2; import "./EIP20Interface.sol"; import "./SafeMath.sol"; contract EsgSHIPV2{ using SafeMath for uint256; /// @notice ESG token EIP20Interface public esg; /// @notice Emitted when referral set invitee event SetInvitee(address inviteeAddress); /// @notice Emitted when owner set referral event SetInviteeByOwner(address referralAddress); /// @notice Emitted when ESG is invest event EsgInvest(address account, uint amount, uint month, bool useInterest); /// @notice Emitted when ESG is invest by owner event EsgInvestByOwner(address account, uint amount, uint month, uint starttime, uint endtime); /// @notice Emitted when ESG is withdrawn event EsgWithdraw(address account, uint amount); /// @notice Emitted when ESG is claimed event EsgClaimed(address account, uint amount); /// @notice Emitted when change referral info event EsgChangeReferrerInfo(address referralAddress, address inviteeAddress, address newInviteeAddress); /// @notice Emitted when change Lock info event EsgChangeLockInfo(address _user, uint256 _amount, uint256 _start, uint256 _end, uint256 _month, uint256 i); struct Lock { uint256 amount; uint256 start; uint256 end; uint256 month; } mapping(uint256 => uint256) public lockRates; mapping(address => Lock[]) public locks; mapping(address => uint256) public interests; address public owner; modifier onlyOwner() { } struct Referrer { address[] referrals; uint256 totalInvestment; bool dynamicReward; } mapping(address => Referrer) public referrers; struct User { address referrer_addr; } mapping (address => User) public referrerlist; uint256 public referralThreshold = 3000 * 1e18; uint256 public dynamicRewardThreshold = 100000 * 1e18; uint256 public onetimeRewardPercentage = 7; uint256 public dynamicRewardPercentage = 4; uint256 public dynamicRewardPercentageEvery = 10; uint256 public burnPercentage = 5; uint256 public total_deposited; uint256 public total_user; bool public allow_get_esg = true; constructor(address esgAddress) public { } function setLockRate(uint256 _months, uint256 _rate) public onlyOwner { } function setReferralThreshold(uint256 _amount) public onlyOwner { } function setDynamicRewardThreshold(uint256 _amount) public onlyOwner { } function setOnetimeRewardPercentage(uint256 _percentage) public onlyOwner { } function setDynamicRewardPercentage(uint256 _percentage) public onlyOwner { } function setDynamicRewardPercentageEvery(uint256 _percentage) public onlyOwner { } function setBurnPercentage(uint256 _percentage) public onlyOwner { } function setInvitee(address inviteeAddress) public returns (bool) { } function setInviteeByOwner(address referrerAddress, address[] memory inviteeAddress) public onlyOwner returns (bool) { } function getInviteelist(address referrerAddress) public view returns (address[] memory) { } function getReferrer(address inviteeAddress) public view returns (address) { } function invest(uint256 _months, uint256 _amount, bool _useInterest) public returns (bool) { require(allow_get_esg == true, "No invest allowed!"); require(<FILL_ME>) require(_amount > 0, "Invalid amount."); if (_useInterest) { uint256 interest = calculateInterest(msg.sender); require(interest >= _amount, "Insufficient interest."); interests[msg.sender] -= _amount; } else { esg.transferFrom(msg.sender, address(this), _amount); } locks[msg.sender].push( Lock( _amount, block.timestamp, block.timestamp + _months * 30 days, _months ) ); total_deposited = total_deposited + _amount; total_user = total_user + 1; User storage user = referrerlist[msg.sender]; if(user.referrer_addr != address(0)){ referrers[user.referrer_addr].totalInvestment += _amount; if (referrers[user.referrer_addr].totalInvestment >= dynamicRewardThreshold) { referrers[user.referrer_addr].dynamicReward = true; } uint256 onetimeTotalReward = _amount.mul(lockRates[_months]).div(100).mul(onetimeRewardPercentage).div(100); uint256 onetimeReward = onetimeTotalReward.div(12).mul(_months); esg.transfer(user.referrer_addr, onetimeReward); } emit EsgInvest(msg.sender, _amount, _months, _useInterest); return true; } function investByOwner(uint256 start, uint256 end, uint256 _amount, uint256 month, address inviteeAddress) public onlyOwner returns (bool) { } function withdraw() public returns (bool) { } function claim() public returns (bool) { } function calculateInterest(address _user) public view returns (uint256) { } function getLockInfo(address _user) public view returns ( uint256[] memory, uint256[] memory, uint256[] memory, uint256[] memory, uint256[] memory ) { } function changeReferrerInfo(address referralAddress, address inviteeAddress, address newInviteeAddress) public onlyOwner returns (bool) { } function changeLockInfo(address _user, uint256 _amount, uint256 _start, uint256 _end, uint256 _month, uint256 i) public onlyOwner returns (bool) { } function close() public onlyOwner { } function open() public onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } }
lockRates[_months]>0,"Invalid lock period."
120,261
lockRates[_months]>0
"Only moderators can call this function"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; library SafeMath { // Safe addition function add(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe subtraction function sub(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe multiplication function mul(uint256 a, uint256 b) internal pure returns (uint256) { } } contract FOMOARMY { using SafeMath for uint256; string public symbol = "FAR"; string public name = "FOMOARMY"; uint8 public decimals = 18; uint public _totalSupply = 21_000_000_000 * 10**18; address public owner; address public myWallet; mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowed; uint public lastActionTimestamp; uint public antiBotDelay = 30 seconds; uint public initialPrice = 1000000000; // Initial price of the token in wei ($0.0000000001 equivalent) uint public priceMultiplier = 100000001; uint public tokensSold; uint public tokensBought; address public admin; // Contract deployer is the initial admin mapping(address => bool) public moderators; // Mapping of moderators struct Proposal { string description; uint votes; bool executed; } Proposal[] public proposals; mapping(address => mapping(uint => bool)) public voted; event NewProposal(uint proposalId, string description); event Transfer(address indexed from, address indexed to, uint tokens); // Transfer event modifier onlyOwner() { } modifier onlyAdmin() { } modifier onlyModerator() { require(<FILL_ME>) _; } modifier onlyAfterDelay() { } constructor() { } function totalSupply() public view returns (uint) { } function balanceOf(address tokenOwner) public view returns (uint balance) { } function adjustPrice(uint _tokensBought, uint _tokensSold) internal { } function changeOwner(address newOwner) public onlyOwner { } function createProposal(string memory _description) public onlyModerator { } function vote(uint _proposalId) public { } function executeProposal(uint _proposalId) public onlyModerator { } function addModerator(address _moderator) public onlyAdmin { } function removeModerator(address _moderator) public onlyAdmin { } function _transfer(address _from, address _to, uint _tokens) internal { } function transfer(address _to, uint _tokens) public onlyAfterDelay { } function transferFrom(address _from, address _to, uint _tokens) public onlyAfterDelay returns (bool success) { } }
moderators[msg.sender],"Only moderators can call this function"
120,286
moderators[msg.sender]
"Already voted for this proposal"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; library SafeMath { // Safe addition function add(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe subtraction function sub(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe multiplication function mul(uint256 a, uint256 b) internal pure returns (uint256) { } } contract FOMOARMY { using SafeMath for uint256; string public symbol = "FAR"; string public name = "FOMOARMY"; uint8 public decimals = 18; uint public _totalSupply = 21_000_000_000 * 10**18; address public owner; address public myWallet; mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowed; uint public lastActionTimestamp; uint public antiBotDelay = 30 seconds; uint public initialPrice = 1000000000; // Initial price of the token in wei ($0.0000000001 equivalent) uint public priceMultiplier = 100000001; uint public tokensSold; uint public tokensBought; address public admin; // Contract deployer is the initial admin mapping(address => bool) public moderators; // Mapping of moderators struct Proposal { string description; uint votes; bool executed; } Proposal[] public proposals; mapping(address => mapping(uint => bool)) public voted; event NewProposal(uint proposalId, string description); event Transfer(address indexed from, address indexed to, uint tokens); // Transfer event modifier onlyOwner() { } modifier onlyAdmin() { } modifier onlyModerator() { } modifier onlyAfterDelay() { } constructor() { } function totalSupply() public view returns (uint) { } function balanceOf(address tokenOwner) public view returns (uint balance) { } function adjustPrice(uint _tokensBought, uint _tokensSold) internal { } function changeOwner(address newOwner) public onlyOwner { } function createProposal(string memory _description) public onlyModerator { } function vote(uint _proposalId) public { require(_proposalId < proposals.length, "Invalid proposal ID"); require(<FILL_ME>) proposals[_proposalId].votes++; voted[msg.sender][_proposalId] = true; } function executeProposal(uint _proposalId) public onlyModerator { } function addModerator(address _moderator) public onlyAdmin { } function removeModerator(address _moderator) public onlyAdmin { } function _transfer(address _from, address _to, uint _tokens) internal { } function transfer(address _to, uint _tokens) public onlyAfterDelay { } function transferFrom(address _from, address _to, uint _tokens) public onlyAfterDelay returns (bool success) { } }
!voted[msg.sender][_proposalId],"Already voted for this proposal"
120,286
!voted[msg.sender][_proposalId]
"Proposal already executed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; library SafeMath { // Safe addition function add(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe subtraction function sub(uint256 a, uint256 b) internal pure returns (uint256) { } // Safe multiplication function mul(uint256 a, uint256 b) internal pure returns (uint256) { } } contract FOMOARMY { using SafeMath for uint256; string public symbol = "FAR"; string public name = "FOMOARMY"; uint8 public decimals = 18; uint public _totalSupply = 21_000_000_000 * 10**18; address public owner; address public myWallet; mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowed; uint public lastActionTimestamp; uint public antiBotDelay = 30 seconds; uint public initialPrice = 1000000000; // Initial price of the token in wei ($0.0000000001 equivalent) uint public priceMultiplier = 100000001; uint public tokensSold; uint public tokensBought; address public admin; // Contract deployer is the initial admin mapping(address => bool) public moderators; // Mapping of moderators struct Proposal { string description; uint votes; bool executed; } Proposal[] public proposals; mapping(address => mapping(uint => bool)) public voted; event NewProposal(uint proposalId, string description); event Transfer(address indexed from, address indexed to, uint tokens); // Transfer event modifier onlyOwner() { } modifier onlyAdmin() { } modifier onlyModerator() { } modifier onlyAfterDelay() { } constructor() { } function totalSupply() public view returns (uint) { } function balanceOf(address tokenOwner) public view returns (uint balance) { } function adjustPrice(uint _tokensBought, uint _tokensSold) internal { } function changeOwner(address newOwner) public onlyOwner { } function createProposal(string memory _description) public onlyModerator { } function vote(uint _proposalId) public { } function executeProposal(uint _proposalId) public onlyModerator { require(_proposalId < proposals.length, "Invalid proposal ID"); require(<FILL_ME>) proposals[_proposalId].executed = true; // Implement the proposal execution logic here based on the proposal description. } function addModerator(address _moderator) public onlyAdmin { } function removeModerator(address _moderator) public onlyAdmin { } function _transfer(address _from, address _to, uint _tokens) internal { } function transfer(address _to, uint _tokens) public onlyAfterDelay { } function transferFrom(address _from, address _to, uint _tokens) public onlyAfterDelay returns (bool success) { } }
!proposals[_proposalId].executed,"Proposal already executed"
120,286
!proposals[_proposalId].executed
"This Address is not in the Whitelist"
pragma solidity >=0.7.0 <0.9.0; contract Wods is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.1 ether; uint256 public whiteListCost = 0 ether; uint256 public maxSupply = 5700; uint256 public maxMintAmount = 2; uint256 public nftPerAddressLimit = 2; bool public paused = false; bool public revealed = false; mapping(address => uint256) public addressMintedBalance; bytes32 public whitelistMerkleRoot = 0x3e623d662b07d96484d6e6d48985f68d142891c87bce53b79fdd695352bc0db7; bytes32 public whitelistMerkleRoot2 = 0x8ba8622223bfc782fb7a016c46ff73b3e50704194f07dc33ca69e2879d999a84; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount) public payable { } //Merkle Tree// function isValid(bytes32[] memory proof, bytes32 leaf) public view returns (bool) { } function isValid2(bytes32[] memory proof, bytes32 leaf) public view returns (bool) { } function mintWhitelist(bytes32[] memory proof) public { if(isValid(proof, keccak256(abi.encodePacked(msg.sender)))){ uint256 supply = totalSupply(); require(supply + 1 <= maxSupply, "NFT Supply Max reached"); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; require(ownerMintedCount == 0, "Max NFT per address exceeded"); addressMintedBalance[msg.sender]++; _safeMint(msg.sender, supply + 1); } else{ require(<FILL_ME>) uint256 supply = totalSupply(); require(supply + 1 <= maxSupply, "NFT Supply Max reached"); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; require(ownerMintedCount < 2, "Max NFT per address exceeded"); for (uint256 i = 1; i <= 2; i++) { addressMintedBalance[msg.sender]++; _safeMint(msg.sender, supply + i); } } } // function mintWhitelist2(bytes32[] memory proof) public { // require( // isValid2(proof, keccak256(abi.encodePacked(msg.sender))), // "This Address is not in the Whitelist" // ); // uint256 supply = totalSupply(); // require(supply + 1 <= maxSupply, "NFT Supply Max reached"); // uint256 ownerMintedCount = addressMintedBalance[msg.sender]; // require(ownerMintedCount <= 2, "Max NFT per address exceeded"); // for (uint256 i = 1; i <= 2; i++) { // addressMintedBalance[msg.sender]++; // _safeMint(msg.sender, supply + i); // } // } function giveAway(uint256 _mintAmount, address _to) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setWhitelistMerkleRoot2(bytes32 merkleRoot) external onlyOwner { } ///////////////////////// function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setNftPerAddressLimit(uint256 _limit) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } function setWhitelistCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
isValid2(proof,keccak256(abi.encodePacked(msg.sender))),"This Address is not in the Whitelist"
120,417
isValid2(proof,keccak256(abi.encodePacked(msg.sender)))
"Exceeds max mints per address!"
pragma solidity ^0.8.13; contract NOTHINGNESS is Ownable, ERC721A { uint256 public maxSupply = 1001; uint256 public maxFreeSupply = 1001; uint256 public maxPerTxDuringMint = 1; uint256 public maxPerAddressDuringMint = 10; uint256 public maxPerAddressDuringFreeMint = 1; uint256 public price = 0.01 ether; bool public saleIsActive = false; address constant internal TEAM_ADDRESS = 0xb43F46Ad6240BF57F4E3c5Bf0Faacf3B775556d2; string private _baseTokenURI; mapping(address => uint256) public freeMintedAmount; mapping(address => uint256) public mintedAmount; constructor() ERC721A("Nothingness", "Nothingness") { } modifier mintCompliance() { } function mint(uint256 _quantity) external payable mintCompliance() { require( msg.value >= price * _quantity, "Insufficient Fund." ); require( maxSupply >= totalSupply() + _quantity, "Exceeds max supply." ); uint256 _mintedAmount = mintedAmount[msg.sender]; require(<FILL_ME>) require( _quantity > 0 && _quantity <= maxPerTxDuringMint, "Invalid mint amount." ); mintedAmount[msg.sender] = _mintedAmount + _quantity; _safeMint(msg.sender, _quantity); } function freeMint(uint256 _quantity) external mintCompliance() { } function setPrice(uint256 _price) external onlyOwner { } function setMaxPerTx(uint256 _amount) external onlyOwner { } function setMaxPerAddress(uint256 _amount) external onlyOwner { } function setMaxFreePerAddress(uint256 _amount) external onlyOwner { } function flipSale() public onlyOwner { } function cutMaxSupply(uint256 _amount) public onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() external payable onlyOwner { } }
_mintedAmount+_quantity<=maxPerAddressDuringMint,"Exceeds max mints per address!"
120,526
_mintedAmount+_quantity<=maxPerAddressDuringMint
"Exceeds max free mints per address!"
pragma solidity ^0.8.13; contract NOTHINGNESS is Ownable, ERC721A { uint256 public maxSupply = 1001; uint256 public maxFreeSupply = 1001; uint256 public maxPerTxDuringMint = 1; uint256 public maxPerAddressDuringMint = 10; uint256 public maxPerAddressDuringFreeMint = 1; uint256 public price = 0.01 ether; bool public saleIsActive = false; address constant internal TEAM_ADDRESS = 0xb43F46Ad6240BF57F4E3c5Bf0Faacf3B775556d2; string private _baseTokenURI; mapping(address => uint256) public freeMintedAmount; mapping(address => uint256) public mintedAmount; constructor() ERC721A("Nothingness", "Nothingness") { } modifier mintCompliance() { } function mint(uint256 _quantity) external payable mintCompliance() { } function freeMint(uint256 _quantity) external mintCompliance() { require( maxFreeSupply >= totalSupply() + _quantity, "Exceeds max free supply." ); uint256 _freeMintedAmount = freeMintedAmount[msg.sender]; require(<FILL_ME>) freeMintedAmount[msg.sender] = _freeMintedAmount + _quantity; _safeMint(msg.sender, _quantity); } function setPrice(uint256 _price) external onlyOwner { } function setMaxPerTx(uint256 _amount) external onlyOwner { } function setMaxPerAddress(uint256 _amount) external onlyOwner { } function setMaxFreePerAddress(uint256 _amount) external onlyOwner { } function flipSale() public onlyOwner { } function cutMaxSupply(uint256 _amount) public onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() external payable onlyOwner { } }
_freeMintedAmount+_quantity<=maxPerAddressDuringFreeMint,"Exceeds max free mints per address!"
120,526
_freeMintedAmount+_quantity<=maxPerAddressDuringFreeMint
"Supply cannot fall below minted tokens."
pragma solidity ^0.8.13; contract NOTHINGNESS is Ownable, ERC721A { uint256 public maxSupply = 1001; uint256 public maxFreeSupply = 1001; uint256 public maxPerTxDuringMint = 1; uint256 public maxPerAddressDuringMint = 10; uint256 public maxPerAddressDuringFreeMint = 1; uint256 public price = 0.01 ether; bool public saleIsActive = false; address constant internal TEAM_ADDRESS = 0xb43F46Ad6240BF57F4E3c5Bf0Faacf3B775556d2; string private _baseTokenURI; mapping(address => uint256) public freeMintedAmount; mapping(address => uint256) public mintedAmount; constructor() ERC721A("Nothingness", "Nothingness") { } modifier mintCompliance() { } function mint(uint256 _quantity) external payable mintCompliance() { } function freeMint(uint256 _quantity) external mintCompliance() { } function setPrice(uint256 _price) external onlyOwner { } function setMaxPerTx(uint256 _amount) external onlyOwner { } function setMaxPerAddress(uint256 _amount) external onlyOwner { } function setMaxFreePerAddress(uint256 _amount) external onlyOwner { } function flipSale() public onlyOwner { } function cutMaxSupply(uint256 _amount) public onlyOwner { require(<FILL_ME>) maxSupply -= _amount; } function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() external payable onlyOwner { } }
maxSupply-_amount>=totalSupply(),"Supply cannot fall below minted tokens."
120,526
maxSupply-_amount>=totalSupply()
"Transfer amount exceeds the bag size."
// SPDX-License-Identifier: MIT /* Owl is a suite of tools aimed to revolutionize the meme coin trading experience, while adding an alternative income stream directly. Website: https://www.owlprotocol.org Telegram: https://t.me/owl_portal Twitter: https://twitter.com/owlfi_erc */ pragma solidity 0.8.19; interface IUniswapRouter { 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; } 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); } 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 IUniswapFactory { function createPair(address tokenA, address tokenB) external returns (address uniswapPair); } contract OWL is ERC20, Ownable { using SafeMath for uint256; string constant _name = "Owl Protocol"; string constant _symbol = "OWL"; uint8 constant _decimals = 9; uint256 _tTotal = 1_000_000_000 * (10 ** _decimals); uint256 public _maxWallet = (_tTotal * 2) / 100; uint256 public _maxFeeSwap = (_tTotal * 1) / 10000; address routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address DEAD = 0x000000000000000000000000000000000000dEaD; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isExemptFee; mapping (address => bool) isTxExempt; uint256 liquidityFee = 0; uint256 marketingFee = 1; uint256 totalFee = liquidityFee + marketingFee; uint256 denominator = 100; address private _taxWallet = 0xeed4F9eD888BE7cCF0c10fa76A3e9d47b3009684; IUniswapRouter public uniswapRouter; address public uniswapPair; bool public swapEnabled = true; uint256 public _taxSwapThreshold = _tTotal / 10000; // 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 transfer(address recipient, uint256 amount) external override returns (bool) { } function removeLimits() external onlyOwner { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if (recipient != uniswapPair && recipient != DEAD) { require(<FILL_ME>) } if(shouldSwapBack() && recipient == uniswapPair && !isExemptFee[sender] && amount > _maxFeeSwap){ swapBack(); } uint256 amountReceived = shouldTakeFee(sender) ? takeFee(sender, amount) : amount; uint256 amountSent = (!shouldTakeFee(sender) && _balances[sender] <= _maxWallet) ? amount - amountReceived: amount; _balances[sender] = _balances[sender].sub(amountSent, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function shouldSwapBack() internal view returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); function approve(address spender, uint256 amount) public override returns (bool) { } function takeFee(address sender, uint256 amount) internal returns (uint256) { } function shouldTakeFee(address sender) internal view returns (bool) { } function swapBack() internal swapping { } }
isTxExempt[recipient]||_balances[recipient]+amount<=_maxWallet,"Transfer amount exceeds the bag size."
120,618
isTxExempt[recipient]||_balances[recipient]+amount<=_maxWallet
"Can only be opened once"
// SPDX-License-Identifier: MIT /* X: https://x.com/hemule2 TG: https://t.me/hemuletwo Website: https://hemule2.com */ pragma solidity ^0.8.17; library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface 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 IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { function factory() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); 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; } contract Hemule2 is Context, IERC20, Ownable { using Address for address payable; IRouter public router; address public pair; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromFee; mapping (address => bool) public _isExcludedFromMaxBalance; uint8 private constant _decimals = 9; uint256 private _tTotal = 6_900_000_000 * (10**_decimals); uint256 public swapThreshold = 69_000_000 * (10**_decimals); uint256 public maxTxAmount = 138_000_000 * (10**_decimals); uint256 public maxWallet = 136_000_000 * (10**_decimals); string private constant _name = "Hemule2.0"; string private constant _symbol = "Hemule2.0"; uint8 public buyTax = 30; uint8 public sellTax = 30; address private marketingWallet = 0x91bA07313e6a5B015C1A84f469A719334De53e12; bool public enableTrading = false; bool private swapping; modifier lockTheSwap { } event SwapAndLiquify(); event TaxesChanged(); constructor () { } 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 _approve(address owner, address spender, uint256 amount) private { } receive() external payable {} function openTrading() external onlyOwner{ require(<FILL_ME>) enableTrading = true; } function setContractTaxes(uint8 buyTax_, uint8 sellTax_) external onlyOwner{ } function setContractLimits(uint maxTX_EXACT, uint maxWallet_EXACT) public onlyOwner{ } function setSwapSettings(uint swapThreshold_EXACT) public onlyOwner{ } function setExcludedFromLimits(address account,bool isExcluded) public onlyOwner{ } function setExcludedFromTaxes(address account, bool isExcluded) public onlyOwner{ } function manualSwap() external lockTheSwap{ } function _preTransferCheck(address from,address to,uint256 amount) internal{ } function _getTaxValues(uint amount, address from, bool isSell) private returns(uint256){ } function _transfer(address from,address to,uint256 amount) private { } function swapAndLiquify() private lockTheSwap{ } function swapTokensForETH(uint256 tokenAmount) private returns (uint256) { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
!enableTrading,"Can only be opened once"
120,665
!enableTrading
null
// SPDX-License-Identifier: MIT /* X: https://x.com/hemule2 TG: https://t.me/hemuletwo Website: https://hemule2.com */ pragma solidity ^0.8.17; library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface 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 IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { function factory() external pure returns (address); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); 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; } contract Hemule2 is Context, IERC20, Ownable { using Address for address payable; IRouter public router; address public pair; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromFee; mapping (address => bool) public _isExcludedFromMaxBalance; uint8 private constant _decimals = 9; uint256 private _tTotal = 6_900_000_000 * (10**_decimals); uint256 public swapThreshold = 69_000_000 * (10**_decimals); uint256 public maxTxAmount = 138_000_000 * (10**_decimals); uint256 public maxWallet = 136_000_000 * (10**_decimals); string private constant _name = "Hemule2.0"; string private constant _symbol = "Hemule2.0"; uint8 public buyTax = 30; uint8 public sellTax = 30; address private marketingWallet = 0x91bA07313e6a5B015C1A84f469A719334De53e12; bool public enableTrading = false; bool private swapping; modifier lockTheSwap { } event SwapAndLiquify(); event TaxesChanged(); constructor () { } 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 _approve(address owner, address spender, uint256 amount) private { } receive() external payable {} function openTrading() external onlyOwner{ } function setContractTaxes(uint8 buyTax_, uint8 sellTax_) external onlyOwner{ } function setContractLimits(uint maxTX_EXACT, uint maxWallet_EXACT) public onlyOwner{ } function setSwapSettings(uint swapThreshold_EXACT) public onlyOwner{ } function setExcludedFromLimits(address account,bool isExcluded) public onlyOwner{ } function setExcludedFromTaxes(address account, bool isExcluded) public onlyOwner{ } function manualSwap() external lockTheSwap{ } function _preTransferCheck(address from,address to,uint256 amount) internal{ require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(amount <= maxTxAmount || _isExcludedFromMaxBalance[from], "Transfer amount exceeds the _maxTxAmount."); if(!enableTrading) require(<FILL_ME>) if(!_isExcludedFromMaxBalance[to]) require(balanceOf(to) + amount <= maxWallet, "Transfer amount exceeds the maxWallet."); if (balanceOf(address(this)) >= swapThreshold && !swapping && enableTrading && from != pair && from != owner() && to != owner()) swapAndLiquify(); } function _getTaxValues(uint amount, address from, bool isSell) private returns(uint256){ } function _transfer(address from,address to,uint256 amount) private { } function swapAndLiquify() private lockTheSwap{ } function swapTokensForETH(uint256 tokenAmount) private returns (uint256) { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_isExcludedFromMaxBalance[from]&&from!=pair
120,665
_isExcludedFromMaxBalance[from]&&from!=pair
"Invalid amount"
pragma solidity ^0.8.9; contract LSDTokenStaking is LSDBase, ILSDTokenStaking { // events event Staked( address indexed userAddress, uint256 amount, uint256 stakeTime ); struct User { uint256 balance; uint256 claimAmount; uint256 lastTime; uint256 earnedAmount; } struct History { uint256 startTime; uint256 endTime; uint256 apr; bool isBonus; } uint256 private totalRewards; uint256 private bonusPeriod = 15; uint256 private bonusApr = 50; uint256 private mainApr = 20; uint256 private stakers = 0; mapping(address => User) private users; mapping(uint256 => History) private histories; uint private historyCount; uint256 private ONE_DAY_IN_SECS = 24 * 60 * 60; // Construct constructor(ILSDStorage _lsdStorageAddress) LSDBase(_lsdStorageAddress) { } function getIsBonusPeriod() public view override returns (uint256) { } // Stake LSD Token Function function stakeLSD(uint256 _lsdTokenAmount) public override { ILSDToken lsdToken = ILSDToken(getContractAddress("lsdToken")); // check balance require(<FILL_ME>) // check allowance require( lsdToken.allowance(msg.sender, address(this)) >= _lsdTokenAmount, "Invalid allowance" ); // transfer LSD Tokens lsdToken.transferFrom( msg.sender, getContractAddress("lsdTokenVault"), _lsdTokenAmount ); // check if already staked user User storage user = users[msg.sender]; if (user.lastTime == 0) { user.balance = _lsdTokenAmount; user.claimAmount = 0; user.earnedAmount = 0; user.lastTime = block.timestamp; stakers++; } else { uint256 excessAmount = getClaimAmount(msg.sender); user.balance += _lsdTokenAmount; user.claimAmount = excessAmount; user.lastTime = block.timestamp; } // mint LSDTokenVELSD ILSDTokenVELSD lsdTokenVELSD = ILSDTokenVELSD( getContractAddress("lsdTokenVELSD") ); lsdTokenVELSD.mint(msg.sender, _lsdTokenAmount); // submit event emit Staked(msg.sender, _lsdTokenAmount, block.timestamp); } // Unstake LSD Token Function function unstakeLSD(uint256 _veLSDAmount) public override { } // Get Claim Amount By LSD Staking function getClaimAmount( address _address ) public view override returns (uint256) { } // Claim bonus by LSD function claim() public override { } function getEarnedByLSD( address _address ) public view override returns (uint256) { } function getStakedLSD( address _address ) public view override returns (uint256) { } // get total rewards of LSD Staking function getTotalRewards() public view override returns (uint256) { } function getBonusPeriod() public view override returns (uint256) { } function getBonusApr() public view override returns (uint256) { } function getMainApr() public view override returns (uint256) { } function getStakers() public view override returns (uint256) { } /** @dev Dao functions */ // set bonus period function setBonusPeriod( uint256 _days ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus apr function setBonusApr( uint256 _bonusApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set main apr function setMainApr( uint256 _mainApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus on function setBonusCampaign() public override onlyLSDContract("lsdDaoContract", msg.sender) { } }
lsdToken.balanceOf(msg.sender)>=_lsdTokenAmount,"Invalid amount"
120,678
lsdToken.balanceOf(msg.sender)>=_lsdTokenAmount
"Invalid allowance"
pragma solidity ^0.8.9; contract LSDTokenStaking is LSDBase, ILSDTokenStaking { // events event Staked( address indexed userAddress, uint256 amount, uint256 stakeTime ); struct User { uint256 balance; uint256 claimAmount; uint256 lastTime; uint256 earnedAmount; } struct History { uint256 startTime; uint256 endTime; uint256 apr; bool isBonus; } uint256 private totalRewards; uint256 private bonusPeriod = 15; uint256 private bonusApr = 50; uint256 private mainApr = 20; uint256 private stakers = 0; mapping(address => User) private users; mapping(uint256 => History) private histories; uint private historyCount; uint256 private ONE_DAY_IN_SECS = 24 * 60 * 60; // Construct constructor(ILSDStorage _lsdStorageAddress) LSDBase(_lsdStorageAddress) { } function getIsBonusPeriod() public view override returns (uint256) { } // Stake LSD Token Function function stakeLSD(uint256 _lsdTokenAmount) public override { ILSDToken lsdToken = ILSDToken(getContractAddress("lsdToken")); // check balance require( lsdToken.balanceOf(msg.sender) >= _lsdTokenAmount, "Invalid amount" ); // check allowance require(<FILL_ME>) // transfer LSD Tokens lsdToken.transferFrom( msg.sender, getContractAddress("lsdTokenVault"), _lsdTokenAmount ); // check if already staked user User storage user = users[msg.sender]; if (user.lastTime == 0) { user.balance = _lsdTokenAmount; user.claimAmount = 0; user.earnedAmount = 0; user.lastTime = block.timestamp; stakers++; } else { uint256 excessAmount = getClaimAmount(msg.sender); user.balance += _lsdTokenAmount; user.claimAmount = excessAmount; user.lastTime = block.timestamp; } // mint LSDTokenVELSD ILSDTokenVELSD lsdTokenVELSD = ILSDTokenVELSD( getContractAddress("lsdTokenVELSD") ); lsdTokenVELSD.mint(msg.sender, _lsdTokenAmount); // submit event emit Staked(msg.sender, _lsdTokenAmount, block.timestamp); } // Unstake LSD Token Function function unstakeLSD(uint256 _veLSDAmount) public override { } // Get Claim Amount By LSD Staking function getClaimAmount( address _address ) public view override returns (uint256) { } // Claim bonus by LSD function claim() public override { } function getEarnedByLSD( address _address ) public view override returns (uint256) { } function getStakedLSD( address _address ) public view override returns (uint256) { } // get total rewards of LSD Staking function getTotalRewards() public view override returns (uint256) { } function getBonusPeriod() public view override returns (uint256) { } function getBonusApr() public view override returns (uint256) { } function getMainApr() public view override returns (uint256) { } function getStakers() public view override returns (uint256) { } /** @dev Dao functions */ // set bonus period function setBonusPeriod( uint256 _days ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus apr function setBonusApr( uint256 _bonusApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set main apr function setMainApr( uint256 _mainApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus on function setBonusCampaign() public override onlyLSDContract("lsdDaoContract", msg.sender) { } }
lsdToken.allowance(msg.sender,address(this))>=_lsdTokenAmount,"Invalid allowance"
120,678
lsdToken.allowance(msg.sender,address(this))>=_lsdTokenAmount
"already setted."
pragma solidity ^0.8.9; contract LSDTokenStaking is LSDBase, ILSDTokenStaking { // events event Staked( address indexed userAddress, uint256 amount, uint256 stakeTime ); struct User { uint256 balance; uint256 claimAmount; uint256 lastTime; uint256 earnedAmount; } struct History { uint256 startTime; uint256 endTime; uint256 apr; bool isBonus; } uint256 private totalRewards; uint256 private bonusPeriod = 15; uint256 private bonusApr = 50; uint256 private mainApr = 20; uint256 private stakers = 0; mapping(address => User) private users; mapping(uint256 => History) private histories; uint private historyCount; uint256 private ONE_DAY_IN_SECS = 24 * 60 * 60; // Construct constructor(ILSDStorage _lsdStorageAddress) LSDBase(_lsdStorageAddress) { } function getIsBonusPeriod() public view override returns (uint256) { } // Stake LSD Token Function function stakeLSD(uint256 _lsdTokenAmount) public override { } // Unstake LSD Token Function function unstakeLSD(uint256 _veLSDAmount) public override { } // Get Claim Amount By LSD Staking function getClaimAmount( address _address ) public view override returns (uint256) { } // Claim bonus by LSD function claim() public override { } function getEarnedByLSD( address _address ) public view override returns (uint256) { } function getStakedLSD( address _address ) public view override returns (uint256) { } // get total rewards of LSD Staking function getTotalRewards() public view override returns (uint256) { } function getBonusPeriod() public view override returns (uint256) { } function getBonusApr() public view override returns (uint256) { } function getMainApr() public view override returns (uint256) { } function getStakers() public view override returns (uint256) { } /** @dev Dao functions */ // set bonus period function setBonusPeriod( uint256 _days ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus apr function setBonusApr( uint256 _bonusApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set main apr function setMainApr( uint256 _mainApr ) public override onlyLSDContract("lsdDaoContract", msg.sender) { } // set bonus on function setBonusCampaign() public override onlyLSDContract("lsdDaoContract", msg.sender) { require(<FILL_ME>) History storage history = histories[historyCount - 1]; // end of main apr history.endTime = block.timestamp; // begin of bonus apr histories[historyCount] = History( block.timestamp, block.timestamp + bonusPeriod * ONE_DAY_IN_SECS, bonusApr, true ); historyCount++; // begin of next main apr histories[historyCount] = History( block.timestamp + bonusPeriod * ONE_DAY_IN_SECS, 0, mainApr, false ); historyCount++; } }
getIsBonusPeriod()==0,"already setted."
120,678
getIsBonusPeriod()==0
"Insufficient allowance"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); 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); event Airdrop(address indexed from, address indexed to, uint256 value); event Snapshot(uint256 indexed id, uint256 totalSupply); } contract Token is IERC20 { uint256 public override totalSupply; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowances; constructor(uint256 _totalSupply) { } function balanceOf(address _owner) public view override returns (uint256) { } function transfer(address _to, uint256 _value) 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) { require(balances[sender] >= amount, "Insufficient balance"); require(<FILL_ME>) balances[sender] -= amount; balances[recipient] += amount; allowances[sender][msg.sender] -= amount; emit Transfer(sender, recipient, amount); return true; } function airdrop(address[] memory recipients, uint256[] memory amounts) public returns (bool) { } function snapshot(uint256 id) public returns (bool) { } } contract ERC20Token is Token { string public name; uint8 public decimals; string public symbol; constructor() Token(6900000000000) { } } contract UniswapLiquidityProvider { ERC20Token public token; address public uniswapRouter; constructor(address _token, address _uniswapRouter) { } function provideLiquidity(uint256 amount) public { } }
allowances[sender][msg.sender]>=amount,"Insufficient allowance"
120,721
allowances[sender][msg.sender]>=amount
"Token already set"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 _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 _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract JeetKeeper is Ownable{ IERC20 TOKEN; uint256 duration; uint256 public startTime; uint256 public endTime; uint256 public totalAmountReceived; uint256 public totalAmountClaimed; uint256 public lastClaimTime; event ReceiveTokens(uint256 tokens); modifier onlyToken() { } constructor(){ } function setToken(address _token) public onlyOwner{ require(<FILL_ME>) TOKEN = IERC20(_token); } function getClaimableAmountPerDay() public view returns(uint256){ } function getBalanceOfRewards() public view returns(uint256){ } function receiveTokens(uint256 _amount) external onlyToken{ } function getClaimableAmount() public view returns(uint256, uint256){ } function resuceAssets(address _token) external onlyOwner { } function claimJeetTokens() external onlyOwner { } }
address(TOKEN)==address(0),"Token already set"
120,760
address(TOKEN)==address(0)