Source Code
Overview
S Balance
More Info
ContractCreator
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
PresaleFactory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/token/ERC20/ERC20.sol";import "@openzeppelin/contracts/access/AccessControl.sol";import "@openzeppelin/contracts/proxy/Clones.sol";import "./interfaces/IPresaleFactory.sol";import "./helpers/TransferHelper.sol";import "./Presale.sol";contract PresaleFactory is Ownable, AccessControl, IPresaleFactory {address public implementation;address[] public allPresales;uint16 public salePercentageForEcosystem;address public feeReceiver;uint256 public fee;bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");bytes32 public constant EXCLUDED_FROM_FEE_ROLE = keccak256("EXCLUDED_FROM_FEE_ROLE");modifier onlyOwnerOrAdmin() {require(hasRole(ADMIN_ROLE, _msgSender()) || _msgSender() == owner());_;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)pragma solidity ^0.8.0;import "./IAccessControl.sol";import "../utils/Context.sol";import "../utils/Strings.sol";import "../utils/introspection/ERC165.sol";/*** @dev Contract module that allows children to implement role-based access* control mechanisms. This is a lightweight version that doesn't allow enumerating role* members except through off-chain means by accessing the contract event logs. Some* applications may benefit from on-chain enumerability, for those cases see* {AccessControlEnumerable}.** Roles are referred to by their `bytes32` identifier. These should be exposed* in the external API and be unique. The best way to achieve this is by* using `public constant` hash digests:** ```solidity* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");* ```** Roles can be used to represent a set of permissions. To restrict access to a
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)pragma solidity ^0.8.0;/*** @dev External interface of AccessControl declared to support ERC165 detection.*/interface IAccessControl {/*** @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`** `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite* {RoleAdminChanged} not being emitted signaling this.** _Available since v3.1._*/event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);/*** @dev Emitted when `account` is granted `role`.** `sender` is the account that originated the contract call, an admin role* bearer except when using {AccessControl-_setupRole}.*/event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/*** @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.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)pragma solidity ^0.8.0;/*** @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for* deploying minimal proxy contracts, also known as "clones".** > To simply and cheaply clone contract functionality in an immutable way, this standard specifies* > a minimal bytecode implementation that delegates all calls to a known, fixed address.** The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`* (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the* deterministic method.** _Available since v3.4._*/library Clones {/*** @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.** This function uses the create opcode, which should never revert.*/function clone(address implementation) internal returns (address instance) {/// @solidity memory-safe-assembly
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/*** @dev Contract module which allows children to implement an emergency stop* mechanism that can be triggered by an authorized account.** This module is used through inheritance. It will make available the* modifiers `whenNotPaused` and `whenPaused`, which can be applied to* the functions of your contract. Note that they will not be pausable by* simply including this module, only once the modifiers are put in place.*/abstract contract Pausable is Context {/*** @dev Emitted when the pause is triggered by `account`.*/event Paused(address account);/*** @dev Emitted when the pause is lifted by `account`.*/event Unpaused(address account);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)pragma solidity ^0.8.0;/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/abstract contract ReentrancyGuard {// Booleans are more expensive than uint256 or any type that takes up a full// word because each write operation emits an extra SLOAD to first read the// slot's contents, replace the bits taken up by the boolean, and then write// back. This is the compiler's defense against contract upgrades and
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)pragma solidity ^0.8.0;import "./IERC20.sol";import "./extensions/IERC20Metadata.sol";import "../../utils/Context.sol";/*** @dev Implementation of the {IERC20} interface.** This implementation is agnostic to the way tokens are created. This means* that a supply mechanism has to be added in a derived contract using {_mint}.* For a generic mechanism see {ERC20PresetMinterPauser}.** TIP: For a detailed writeup see our guide* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How* to implement supply mechanisms].** The default value of {decimals} is 18. To change this, you should override* this function so it returns a different value.** We have followed general OpenZeppelin Contracts guidelines: functions revert* instead returning `false` on failure. This behavior is nonetheless* conventional and does not conflict with the expectations of ERC20
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.0;import "../IERC20.sol";/*** @dev Interface for the optional metadata functions from the ERC20 standard.** _Available since v4.1._*/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.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].** Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't* need to send a transaction, and thus is not required to hold Ether at all.** ==== Security Considerations** There are two important considerations concerning the use of `permit`. The first is that a valid permit signature* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be* considered as an intention to spend the allowance in any specific way. The second is that because permits have* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be* generally recommended is:** ```solidity* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}* doThing(..., value);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20 {/*** @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);/*** @dev Returns the amount of tokens in existence.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import "../IERC20.sol";import "../extensions/IERC20Permit.sol";import "../../../utils/Address.sol";/*** @title SafeERC20* @dev Wrappers around ERC20 operations that throw on failure (when the token* contract returns false). Tokens that return no value (and instead revert or* throw on failure) are also supported, non-reverting calls are assumed to be* successful.* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.*/library SafeERC20 {using Address for address;/*** @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,* non-reverting calls are assumed to be successful.*/function safeTransfer(IERC20 token, address to, uint256 value) internal {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed** Furthermore, `isContract` will also return true if the target contract within
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)pragma solidity ^0.8.0;/*** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/abstract contract Context {function _msgSender() internal view virtual returns (address) {return msg.sender;}function _msgData() internal view virtual returns (bytes calldata) {return msg.data;}function _contextSuffixLength() internal view virtual returns (uint256) {return 0;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)pragma solidity ^0.8.0;/*** @dev These functions deal with verification of Merkle Tree proofs.** The tree and the proofs can be generated using our* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].* You will find a quickstart guide in the readme.** WARNING: You should avoid using leaf values that are 64 bytes long prior to* hashing, or use a hash function other than keccak256 for hashing leaves.* This is because the concatenation of a sorted pair of internal nodes in* the merkle tree could be reinterpreted as a leaf value.* OpenZeppelin's JavaScript library generates merkle trees that are safe* against this attack out of the box.*/library MerkleProof {/*** @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree* defined by `root`. For this, a `proof` must be provided, containing* sibling hashes on the branch from the leaf to the root of the tree. Each* pair of leaves and each pair of pre-images are assumed to be sorted.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)pragma solidity ^0.8.0;import "./IERC165.sol";/*** @dev Implementation of the {IERC165} interface.** Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check* for the additional interface id that will be supported. For example:** ```solidity* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);* }* ```** Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.*/abstract contract ERC165 is IERC165 {/*** @dev See {IERC165-supportsInterface}.*/function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC165 standard, as defined in the* https://eips.ethereum.org/EIPS/eip-165[EIP].** Implementers can declare support of contract interfaces, which can then be* queried by others ({ERC165Checker}).** For an implementation, see {ERC165}.*/interface IERC165 {/*** @dev Returns true if this contract implements the interface defined by* `interfaceId`. See the corresponding* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]* to learn more about how these ids are created.** This function call must use less than 30 000 gas.*/function supportsInterface(bytes4 interfaceId) external view returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)pragma solidity ^0.8.0;/*** @dev Standard math utilities missing in the Solidity language.*/library Math {enum Rounding {Down, // Toward negative infinityUp, // Toward infinityZero // Toward zero}/*** @dev Returns the largest of two numbers.*/function max(uint256 a, uint256 b) internal pure returns (uint256) {return a > b ? a : b;}/*** @dev Returns the smallest of two numbers.*/function min(uint256 a, uint256 b) internal pure returns (uint256) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)pragma solidity ^0.8.0;// CAUTION// This version of SafeMath should only be used with Solidity 0.8 or later,// because it relies on the compiler's built in overflow checks./*** @dev Wrappers over Solidity's arithmetic operations.** NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler* now has built in overflow checking.*/library SafeMath {/*** @dev Returns the addition of two unsigned integers, with an overflow flag.** _Available since v3.4._*/function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {unchecked {uint256 c = a + b;if (c < a) return (false, 0);return (true, c);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)pragma solidity ^0.8.0;/*** @dev Standard signed math utilities missing in the Solidity language.*/library SignedMath {/*** @dev Returns the largest of two signed numbers.*/function max(int256 a, int256 b) internal pure returns (int256) {return a > b ? a : b;}/*** @dev Returns the smallest of two signed numbers.*/function min(int256 a, int256 b) internal pure returns (int256) {return a < b ? a : b;}/*** @dev Returns the average of two signed numbers without overflow.* The result is rounded towards zero.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)pragma solidity ^0.8.0;import "./math/Math.sol";import "./math/SignedMath.sol";/*** @dev String operations.*/library Strings {bytes16 private constant _SYMBOLS = "0123456789abcdef";uint8 private constant _ADDRESS_LENGTH = 20;/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {unchecked {uint256 length = Math.log10(value) + 1;string memory buffer = new string(length);uint256 ptr;/// @solidity memory-safe-assemblyassembly {ptr := add(buffer, add(32, length))
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/token/ERC20/ERC20.sol";import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/access/AccessControl.sol";import "./helpers/TransferHelper.sol";import "./Taxable.sol";abstract contract Fundable is Ownable, AccessControl, Taxable, ReentrancyGuard {using SafeERC20 for ERC20;uint64 constant SALE_PRICE_DECIMALS = 10 ** 18;uint64 private constant ONE_HOUR = 3600;uint64 private constant ONE_YEAR = 31556926;uint64 private constant FIVE_YEARS = 157784630;uint64 private constant TEN_YEARS = 315360000;bytes32 public constant FUNDER_ROLE = keccak256("FUNDER_ROLE");bytes32 public constant CASHER_ROLE = keccak256("CASHER_ROLE");uint256 public startTime;uint256 public endTime;ERC20 private paymentToken;ERC20 public saleToken;
1234567891011121314151617181920pragma solidity ^0.8.0;import "@openzeppelin/contracts/utils/Address.sol";library TransferHelpers {using Address for address;function safeTransferERC20(address token, address to, uint256 amount) internal {bytes4 encodedFunc = bytes4(keccak256(bytes("transfer(address,uint256)")));token.functionCall(abi.encodeWithSelector(encodedFunc, to, amount));}function safeTransferFromERC20(address token, address from, address to, uint256 amount) internal {bytes4 encodedFunc = bytes4(keccak256(bytes("transferFrom(address,address,uint256)")));token.functionCall(abi.encodeWithSelector(encodedFunc, from, to, amount));}function safeTransferEther(address to, uint256 amount) internal returns (bool success) {(success, ) = to.call{value: amount}(new bytes(0));}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import "@openzeppelin/contracts/token/ERC20/ERC20.sol";interface IPresale {error AlreadyInitialized();event PresaleCreated(address indexed presaleId,string metadataURI,address funder,uint256 salePrice,address indexed paymentToken,address indexed saleToken,uint256 softCap,uint256 hardCap,uint256 startTime,uint256 endTime,uint256 minTotalPayment,uint256 maxTotalPayment,address owner);function initialize(string memory _metadataURI,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;interface IPresaleFactory {error FeeReceiverIsZeroAddress();error FeeRequired();event PresaleCreated(address indexed presaleId,string metadataURI,address funder,uint256 salePrice,address indexed paymentToken,address indexed saleToken,uint256 softCap,uint256 hardCap,uint256 startTime,uint256 endTime,uint256 minTotalPayment,uint256 maxTotalPayment,uint256 withdrawDelay,address owner);function initialize(string memory metadataURI,
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;interface IStakingPool {event Stake(address indexed account, uint256 amount, uint256 timestamp);event Unstake(address indexed account, uint256 amount);event Withdrawal(address indexed account, uint amount0, uint256 amount1);event StakeFeePercentageChange(uint16 stakeFeePercentageChange);event WithdrawalFeePercentageChange(uint16 withdrawalFeePercentageChange);event APYRateChange(uint24 apyRate);error ZeroAddressForFeesSet();error Blocked();error OnlyModeratorOrOwner();error RewardIsZero();error NoStake();error AlreadyModerator();error NotModerator();error AlreadyInitialized();event RewardsAdded(uint256 reward);event RewardDrained(uint256 amount);function blockedAddresses(address) external view returns (bool);function stakeFeePercentage() external view returns (uint16);
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/security/Pausable.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/math/SafeMath.sol";import "@openzeppelin/contracts/utils/Address.sol";import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";import "./interfaces/IStakingPool.sol";import "./interfaces/IPresale.sol";import "./Purchasable.sol";import "./Fundable.sol";import "./Vestable.sol";import "./Whitelistable.sol";contract Presale is Ownable, Purchasable, Fundable, Vestable, Whitelistable, IPresale {mapping(address => uint256) public claimable;mapping(address => uint256) public totalPurchased;string public metadataURI;event EmergencyWithdrawal(address indexed user);event MetadataURIChanged(string metadataURI);event Refund(address indexed user, uint256 amount);event SetNewStakingPool(address stakingPool);
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/token/ERC20/ERC20.sol";import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/utils/Address.sol";import "./helpers/TransferHelper.sol";abstract contract Purchasable is Ownable, ReentrancyGuard {using Address for address;using SafeERC20 for ERC20;enum StakingTiers {NONE,RANK1,RANK2,RANK3,RANK4,RANK5}// payment tokenERC20 public immutable paymentToken;// price of the sale tokenuint256 public salePrice;
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/access/AccessControl.sol";import "@openzeppelin/contracts/utils/Context.sol";abstract contract Taxable is Context, AccessControl {address public taxCollector;uint16 public taxPercentage = 1000; // Default : 10% (Basis Points)bytes32 public taxSetterRole = keccak256(abi.encode("TAX_SETTER_ROLE"));constructor(address _taxCollector, address _taxSetter) {require(_taxCollector != address(0), "0x0 taxCollector");require(_taxSetter != address(0), "0x0 taxSetter");taxCollector = _taxCollector;_grantRole(taxSetterRole, _taxSetter);}modifier onlyTaxSetter() {require(hasRole(taxSetterRole, _msgSender()), "must be tax setter");_;}function setTaxPercentage(uint16 _taxPercentage) external onlyTaxSetter {taxPercentage = _taxPercentage;}
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/math/SafeMath.sol";import "@openzeppelin/contracts/utils/math/Math.sol";import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "./helpers/TransferHelper.sol";// Inspiration: https://github.com/ImpossibleFinance/launchpad-contracts/blob/main/contracts/IFVestable.solabstract contract Vestable is Ownable {uint256 public withdrawTime;mapping(address => uint256) public latestClaimTime;using SafeMath for uint256;// for linear vestinguint256 public linearVestingEndTime;event SetLinearVestingEndTime(uint256 indexed linearVestingEndTime);// for cliff vestingstruct CliffVesting {uint256 claimTime;uint8 percentage;}CliffVesting[] public cliffPeriod;event SetCliffVestingPeriod(CliffVesting[] indexed cliffPeriod);
1234567891011121314151617181920212223242526pragma solidity ^0.8.0;import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";import "@openzeppelin/contracts/access/AccessControl.sol";abstract contract Whitelistable is Ownable, AccessControl, ReentrancyGuard {bytes32 public whitelistRootHash;bytes32 public constant WHITELIST_SETTER_ROLE = keccak256("WHITELIST_SETTER_ROLE");event SetWhitelistSetter(address indexed whitelistSetter);event RemoveWhitelistSetter(address indexed whitelistSetter);event SetWhitelist(bytes32 indexed whitelistRootHash);modifier onlyWhitelistSetterOrOwner() {require(hasRole(WHITELIST_SETTER_ROLE, _msgSender()) || _msgSender() == owner(), "caller not whitelist setter or owner");_;}function setWhitelistSetter(address _whitelistSetter) public onlyOwner {require(!hasRole(WHITELIST_SETTER_ROLE, _whitelistSetter), "already whitelist setter");_grantRole(WHITELIST_SETTER_ROLE, _whitelistSetter);emit SetWhitelistSetter(_whitelistSetter);}
1234567891011121314151617181920{"viaIR": true,"optimizer": {"enabled": true,"runs": 200},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract ABI
API[{"inputs":[{"internalType":"uint16","name":"_salePercentageForEcosystem","type":"uint16"},{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"address","name":"_implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FeeReceiverIsZeroAddress","type":"error"},{"inputs":[],"name":"FeeRequired","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"presaleId","type":"address"},{"indexed":false,"internalType":"string","name":"metadataURI","type":"string"},{"indexed":false,"internalType":"address","name":"funder","type":"address"},{"indexed":false,"internalType":"uint256","name":"salePrice","type":"uint256"},{"indexed":true,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":true,"internalType":"address","name":"saleToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"softCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"hardCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minTotalPayment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxTotalPayment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawDelay","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"PresaleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXCLUDED_FROM_FEE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPresales","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"includeInFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"metadataURI","type":"string"},{"internalType":"address","name":"funder","type":"address"},{"internalType":"uint256","name":"salePrice","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"address","name":"saleToken","type":"address"},{"internalType":"uint256","name":"softCap","type":"uint256"},{"internalType":"uint256","name":"hardCap","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minTotalPayment","type":"uint256"},{"internalType":"uint256","name":"maxTotalPayment","type":"uint256"},{"internalType":"uint256","name":"withdrawDelay","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[{"internalType":"address","name":"_presale","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePercentageForEcosystem","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_salePercentage","type":"uint16"}],"name":"setSalePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608034620001a257601f6200193938819003918201601f191683019291906001600160401b03841183851017620001a7578160609284926040968752833981010312620001a257805161ffff8116809103620001a25762000070836200006860208501620001bd565b9301620001bd565b60008054336001600160a01b0319808316821784558751939690956001600160a01b0395949390929086167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08980a3600454928582161562000193575062010000600160b01b039060101b169160018060b01b0319161717600455169060025416176002557fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177590818152600160205282812033825260205260ff83822054161562000145575b82516117669081620001d38239f35b8181526001602052828120338252602052828120600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339280a4388062000136565b631b37623f60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620001a25756fe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c806301e336671461102e57806301ffc9a714610fd75780632408f02b14610fb5578063248a9ca314610f895780632f2ff15d14610eda57806336568abe14610e475780633dafaa9c14610e1e578063437823ec14610da15780634fbee19314610d4c5780635c60da1b14610d2357806369fe0e2d14610cda578063715018a614610c8057806375b238fc14610c455780638da5cb5b14610c1e57806391d1485414610bd55780639a19c7b014610ab9578063a217fddf14610a9d578063a9e1a14a14610a41578063af933b5714610a11578063b3f00674146109e4578063b8a0e1cf146109ac578063c634b78e1461089d578063d547741f1461085c578063ddca3f431461083e578063e0f0b7131461034a578063ea2f0b3714610274578063efdcd974146102285763f2fde38b1461015b575061000e565b346102255760203660031901126102255761017461113b565b61017c6115a6565b6001600160a01b039081169081156101d157600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b80fd5b50346102255760203660031901126102255761024261113b565b61024a6115a6565b6004805462010000600160b01b03191660109290921b62010000600160b01b031691909117905580f35b5034610225576020806003193601126103465761028f61113b565b6102976115a6565b6000805160206117118339815191529182845260018152604084209160018060a01b03169182600052815260ff6040600020541615610342578260005260018152604060002082600052815260ff604060002054166102f4578380f35b82600052600181526040600020908260005252604060002060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b600080a43880808380f35b8380fd5b5080fd5b506101a03660031901126102255760043567ffffffffffffffff811161034657366023820112156103465781816004013591610385836111c0565b92610393604051948561119e565b808452366024828401011161083a578060246020930183860137830101526103b9611156565b906064356001600160a01b038116900361083a576084356001600160a01b038116900361083a57610184356001600160a01b038116900361083a57600080516020611711833981519152835260016020526040832033845260205260ff604084205416156107d1575b6040516104e96101b0835161043e8160208601602088016114e8565b6bffffffffffffffffffffffff19606087811b82166020938701938401526044356034840152606435811b82166054840152608435811b8216606884015260a435607c84015260c435609c84015260e43560bc8401526101043560dc8401526101243560fc8401526101443561011c8401526101643561013c84015261018435901b1661015c820152426101708201524361019080830191909152908490039081018452018261119e565b8051602091820120600254608881901c62ffffff16763d602d80600a3d3981f3363d3d373d3d3d363d7300000017865260781b6effffffffffffffffffffffffffffff19166e5af43d82803e903d91602b57fd5bf3179091526001600160a01b03906037600986f51691821561078c57823b156103425760405163e0f0b71360e01b81526101a060048201528481806105866101a482018761150b565b6001600160a01b0386811660248401526044803590840152606480358216908401526084803582169084015260a480359084015260c480359084015260e4803590840152610104803590840152610124803590840152610144803590840152610164803590840152610184803590911690830152038183885af1801561078157610751575b50600354936801000000000000000085101561073d575060018401806003558410156107275760209360036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01836bffffffffffffffffffffffff60a01b8254161790556106876040519261016080855284019061150b565b6001600160a01b0391821683860152604435604084015260a435606084015260c435608084015260e43560a08401526101043560c08401526101243560e084015261014435610100840152610164356101208401526101843582166101408401526084358216926064359092169184917fdad2f0af5998628ec1e6febfbb32733aac58a702aa36781df7629b5aad004cf6919081900390a4604051908152f35b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b81526041600452602490fd5b67ffffffffffffffff819592951161076d57604052923861060b565b634e487b7160e01b82526041600452602482fd5b6040513d87823e3d90fd5b60405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606490fd5b60055434106108075760045460101c6001600160a01b0316806107f5575b50610422565b6108009034906116d8565b50386107ef565b60405162461bcd60e51b815260206004820152600b60248201526a11995954995c5d5a5c995960aa1b6044820152606490fd5b8280fd5b50346102255780600319360112610225576020600554604051908152f35b50346102255760403660031901126102255761089a60043561087c611156565b90808452600160205261089560016040862001546111dc565b611530565b80f35b503461022557602080600319360112610346576108b861113b565b6108c06115a6565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758084526001835260408085206001600160a01b0390931680865292845284205490929060ff16610978578284526001815260408420828552815260ff6040852054161561092c578380f35b8284526001815260408420908285525260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a43880808380f35b6064906040519062461bcd60e51b82526004820152600d60248201526c30b63932b0b23c9030b236b4b760991b6044820152fd5b50346102255760203660031901126102255760043561ffff8116809103610346576109d56115a6565b61ffff19600454161760045580f35b503461022557806003193601126102255760045460405160109190911c6001600160a01b03168152602090f35b503461022557602036600319011261022557610a3d610a2e61113b565b610a366115a6565b47906116d8565b5080f35b5034610225576020366003190112610225576004356003548110156103465760039091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01546040516001600160a01b039091168152602090f35b5034610225578060031936011261022557602090604051908152f35b50346102255760208060031936011261034657610ad461113b565b610adc6115a6565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758084526001835260408085206001600160a01b0390931680865292845284205490929060ff1615610b91578284526001815260408420828552815260ff604085205416610b48578380f35b828452600181526040842090828552526040832060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a43880808380f35b6064906040519062461bcd60e51b82526004820152601760248201527f6163636f756e74206973206e6f7420616e2061646d696e0000000000000000006044820152fd5b50346102255760403660031901126102255760ff6040602092610bf6611156565b6004358252600185528282206001600160a01b03909116825284522054604051911615158152f35b5034610225578060031936011261022557546040516001600160a01b039091168152602090f35b503461022557806003193601126102255760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b5034610225578060031936011261022557610c996115a6565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461022557602036600319011261022557610cf46115a6565b60045460101c6001600160a01b031615610d115760043560055580f35b604051631b37623f60e11b8152600490fd5b50346102255780600319360112610225576002546040516001600160a01b039091168152602090f35b50346102255760203660031901126102255760ff6040602092610d6d61113b565b6000805160206117118339815191528252600185528282206001600160a01b03909116825284522054604051911615158152f35b50346102255760208060031936011261034657610dbc61113b565b610dc46115a6565b6000805160206117118339815191528084526001835260408085206001600160a01b0390931680865292845284205490929060ff16610342578284526001815260408420828552815260ff6040852054161561092c578380f35b503461022557806003193601126102255760206040516000805160206117118339815191528152f35b503461022557604036600319011261022557610e61611156565b336001600160a01b03821603610e7d5761089a90600435611530565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461022557604036600319011261022557600435610ef7611156565b8183526001602052610f0f60016040852001546111dc565b8183526001602052604083209060018060a01b03169081845260205260ff60408420541615610f3c578280f35b81835260016020526040832081845260205260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461022557602036600319011261022557600160406020926004358152828452200154604051908152f35b5034610225578060031936011261022557602061ffff60045416604051908152f35b50346102255760203660031901126102255760043563ffffffff60e01b811680910361034657602090637965db0b60e01b811490811561101d575b506040519015158152f35b6301ffc9a760e01b14905082611012565b50346102255760603660031901126102255761104861113b565b90611051611156565b9161105a6115a6565b7f7472616e7366657228616464726573732c75696e74323536290000000000000060206040516110898161116c565b60198152015260405163a9059cbb60e01b602082019081526001600160a01b0390941660248201526044803581830152815260808101919067ffffffffffffffff8311818410176111275792808095610a3d95856040526110e98661116c565b601e86527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000060a0820152519082855af161112161160f565b9161163f565b634e487b7160e01b84526041600452602484fd5b600435906001600160a01b038216820361115157565b600080fd5b602435906001600160a01b038216820361115157565b6040810190811067ffffffffffffffff82111761118857604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761118857604052565b67ffffffffffffffff811161118857601f01601f191660200190565b60008181526001602091818352604093848220338352845260ff858320541615611207575050505050565b33855193606085019267ffffffffffffffff9386811085821117611414578852602a865286860192883685378651156114d4576030845386518310156114d4576078602188015360295b83811161146a5750611428579087519360808501908582109082111761141457885260428452868401946060368737845115611400576030865384518210156114005790607860218601536041915b818311611392575050506113505761134c938693611330936113216048946112f89a519a8b957f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008c88015251809260378801906114e8565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906114e8565b0103602881018752018561119e565b5192839262461bcd60e51b84526004840152602483019061150b565b0390fd5b60648587519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f811660108110156113ec576f181899199a1a9b1b9c1cb0b131b232b360811b901a6113c285886115fe565b5360041c9280156113d8576000190191906112a0565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b86526041600452602486fd5b60648789519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f811660108110156114c0576f181899199a1a9b1b9c1cb0b131b232b360811b901a611498838a6115fe565b5360041c9080156114ac5760001901611251565b634e487b7160e01b87526011600452602487fd5b634e487b7160e01b88526032600452602488fd5b634e487b7160e01b86526032600452602486fd5b60005b8381106114fb5750506000910152565b81810151838201526020016114eb565b90602091611524815180928185528580860191016114e8565b601f01601f1916010190565b906000918083526001602052604083209160018060a01b03169182845260205260ff60408420541661156157505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b6000546001600160a01b031633036115ba57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b908151811015610727570160200190565b3d1561163a573d90611620826111c0565b9161162e604051938461119e565b82523d6000602084013e565b606090565b919290156116a15750815115611653575090565b3b1561165c5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156116b45750805190602001fd5b60405162461bcd60e51b81526020600482015290819061134c90602483019061150b565b604051602081019080821067ffffffffffffffff831117611188576000938493848094938194604052525af161170c61160f565b509056feaa2bf0f18a184595f311714f88137302cdcad3d20639b5595c7fe0d3db0658faa26469706673582212203e2772763d0eb0b0ea331d06c9c746eb661391e1bbc12b1e9f7f7a4a9eec78f464736f6c634300081100330000000000000000000000000000000000000000000000000000000000000064000000000000000000000000426dcf053185c099cbe05dcb23775544bbee16d6000000000000000000000000ab107f1e1dac3f2a0f9c2eea5871ddd0850c9829
Deployed Bytecode
0x6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c806301e336671461102e57806301ffc9a714610fd75780632408f02b14610fb5578063248a9ca314610f895780632f2ff15d14610eda57806336568abe14610e475780633dafaa9c14610e1e578063437823ec14610da15780634fbee19314610d4c5780635c60da1b14610d2357806369fe0e2d14610cda578063715018a614610c8057806375b238fc14610c455780638da5cb5b14610c1e57806391d1485414610bd55780639a19c7b014610ab9578063a217fddf14610a9d578063a9e1a14a14610a41578063af933b5714610a11578063b3f00674146109e4578063b8a0e1cf146109ac578063c634b78e1461089d578063d547741f1461085c578063ddca3f431461083e578063e0f0b7131461034a578063ea2f0b3714610274578063efdcd974146102285763f2fde38b1461015b575061000e565b346102255760203660031901126102255761017461113b565b61017c6115a6565b6001600160a01b039081169081156101d157600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b80fd5b50346102255760203660031901126102255761024261113b565b61024a6115a6565b6004805462010000600160b01b03191660109290921b62010000600160b01b031691909117905580f35b5034610225576020806003193601126103465761028f61113b565b6102976115a6565b6000805160206117118339815191529182845260018152604084209160018060a01b03169182600052815260ff6040600020541615610342578260005260018152604060002082600052815260ff604060002054166102f4578380f35b82600052600181526040600020908260005252604060002060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b600080a43880808380f35b8380fd5b5080fd5b506101a03660031901126102255760043567ffffffffffffffff811161034657366023820112156103465781816004013591610385836111c0565b92610393604051948561119e565b808452366024828401011161083a578060246020930183860137830101526103b9611156565b906064356001600160a01b038116900361083a576084356001600160a01b038116900361083a57610184356001600160a01b038116900361083a57600080516020611711833981519152835260016020526040832033845260205260ff604084205416156107d1575b6040516104e96101b0835161043e8160208601602088016114e8565b6bffffffffffffffffffffffff19606087811b82166020938701938401526044356034840152606435811b82166054840152608435811b8216606884015260a435607c84015260c435609c84015260e43560bc8401526101043560dc8401526101243560fc8401526101443561011c8401526101643561013c84015261018435901b1661015c820152426101708201524361019080830191909152908490039081018452018261119e565b8051602091820120600254608881901c62ffffff16763d602d80600a3d3981f3363d3d373d3d3d363d7300000017865260781b6effffffffffffffffffffffffffffff19166e5af43d82803e903d91602b57fd5bf3179091526001600160a01b03906037600986f51691821561078c57823b156103425760405163e0f0b71360e01b81526101a060048201528481806105866101a482018761150b565b6001600160a01b0386811660248401526044803590840152606480358216908401526084803582169084015260a480359084015260c480359084015260e4803590840152610104803590840152610124803590840152610144803590840152610164803590840152610184803590911690830152038183885af1801561078157610751575b50600354936801000000000000000085101561073d575060018401806003558410156107275760209360036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01836bffffffffffffffffffffffff60a01b8254161790556106876040519261016080855284019061150b565b6001600160a01b0391821683860152604435604084015260a435606084015260c435608084015260e43560a08401526101043560c08401526101243560e084015261014435610100840152610164356101208401526101843582166101408401526084358216926064359092169184917fdad2f0af5998628ec1e6febfbb32733aac58a702aa36781df7629b5aad004cf6919081900390a4604051908152f35b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b81526041600452602490fd5b67ffffffffffffffff819592951161076d57604052923861060b565b634e487b7160e01b82526041600452602482fd5b6040513d87823e3d90fd5b60405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606490fd5b60055434106108075760045460101c6001600160a01b0316806107f5575b50610422565b6108009034906116d8565b50386107ef565b60405162461bcd60e51b815260206004820152600b60248201526a11995954995c5d5a5c995960aa1b6044820152606490fd5b8280fd5b50346102255780600319360112610225576020600554604051908152f35b50346102255760403660031901126102255761089a60043561087c611156565b90808452600160205261089560016040862001546111dc565b611530565b80f35b503461022557602080600319360112610346576108b861113b565b6108c06115a6565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758084526001835260408085206001600160a01b0390931680865292845284205490929060ff16610978578284526001815260408420828552815260ff6040852054161561092c578380f35b8284526001815260408420908285525260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a43880808380f35b6064906040519062461bcd60e51b82526004820152600d60248201526c30b63932b0b23c9030b236b4b760991b6044820152fd5b50346102255760203660031901126102255760043561ffff8116809103610346576109d56115a6565b61ffff19600454161760045580f35b503461022557806003193601126102255760045460405160109190911c6001600160a01b03168152602090f35b503461022557602036600319011261022557610a3d610a2e61113b565b610a366115a6565b47906116d8565b5080f35b5034610225576020366003190112610225576004356003548110156103465760039091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01546040516001600160a01b039091168152602090f35b5034610225578060031936011261022557602090604051908152f35b50346102255760208060031936011261034657610ad461113b565b610adc6115a6565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758084526001835260408085206001600160a01b0390931680865292845284205490929060ff1615610b91578284526001815260408420828552815260ff604085205416610b48578380f35b828452600181526040842090828552526040832060ff19815416905533917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a43880808380f35b6064906040519062461bcd60e51b82526004820152601760248201527f6163636f756e74206973206e6f7420616e2061646d696e0000000000000000006044820152fd5b50346102255760403660031901126102255760ff6040602092610bf6611156565b6004358252600185528282206001600160a01b03909116825284522054604051911615158152f35b5034610225578060031936011261022557546040516001600160a01b039091168152602090f35b503461022557806003193601126102255760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b5034610225578060031936011261022557610c996115a6565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461022557602036600319011261022557610cf46115a6565b60045460101c6001600160a01b031615610d115760043560055580f35b604051631b37623f60e11b8152600490fd5b50346102255780600319360112610225576002546040516001600160a01b039091168152602090f35b50346102255760203660031901126102255760ff6040602092610d6d61113b565b6000805160206117118339815191528252600185528282206001600160a01b03909116825284522054604051911615158152f35b50346102255760208060031936011261034657610dbc61113b565b610dc46115a6565b6000805160206117118339815191528084526001835260408085206001600160a01b0390931680865292845284205490929060ff16610342578284526001815260408420828552815260ff6040852054161561092c578380f35b503461022557806003193601126102255760206040516000805160206117118339815191528152f35b503461022557604036600319011261022557610e61611156565b336001600160a01b03821603610e7d5761089a90600435611530565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461022557604036600319011261022557600435610ef7611156565b8183526001602052610f0f60016040852001546111dc565b8183526001602052604083209060018060a01b03169081845260205260ff60408420541615610f3c578280f35b81835260016020526040832081845260205260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461022557602036600319011261022557600160406020926004358152828452200154604051908152f35b5034610225578060031936011261022557602061ffff60045416604051908152f35b50346102255760203660031901126102255760043563ffffffff60e01b811680910361034657602090637965db0b60e01b811490811561101d575b506040519015158152f35b6301ffc9a760e01b14905082611012565b50346102255760603660031901126102255761104861113b565b90611051611156565b9161105a6115a6565b7f7472616e7366657228616464726573732c75696e74323536290000000000000060206040516110898161116c565b60198152015260405163a9059cbb60e01b602082019081526001600160a01b0390941660248201526044803581830152815260808101919067ffffffffffffffff8311818410176111275792808095610a3d95856040526110e98661116c565b601e86527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000060a0820152519082855af161112161160f565b9161163f565b634e487b7160e01b84526041600452602484fd5b600435906001600160a01b038216820361115157565b600080fd5b602435906001600160a01b038216820361115157565b6040810190811067ffffffffffffffff82111761118857604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761118857604052565b67ffffffffffffffff811161118857601f01601f191660200190565b60008181526001602091818352604093848220338352845260ff858320541615611207575050505050565b33855193606085019267ffffffffffffffff9386811085821117611414578852602a865286860192883685378651156114d4576030845386518310156114d4576078602188015360295b83811161146a5750611428579087519360808501908582109082111761141457885260428452868401946060368737845115611400576030865384518210156114005790607860218601536041915b818311611392575050506113505761134c938693611330936113216048946112f89a519a8b957f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008c88015251809260378801906114e8565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906114e8565b0103602881018752018561119e565b5192839262461bcd60e51b84526004840152602483019061150b565b0390fd5b60648587519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f811660108110156113ec576f181899199a1a9b1b9c1cb0b131b232b360811b901a6113c285886115fe565b5360041c9280156113d8576000190191906112a0565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b86526041600452602486fd5b60648789519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f811660108110156114c0576f181899199a1a9b1b9c1cb0b131b232b360811b901a611498838a6115fe565b5360041c9080156114ac5760001901611251565b634e487b7160e01b87526011600452602487fd5b634e487b7160e01b88526032600452602488fd5b634e487b7160e01b86526032600452602486fd5b60005b8381106114fb5750506000910152565b81810151838201526020016114eb565b90602091611524815180928185528580860191016114e8565b601f01601f1916010190565b906000918083526001602052604083209160018060a01b03169182845260205260ff60408420541661156157505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b6000546001600160a01b031633036115ba57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b908151811015610727570160200190565b3d1561163a573d90611620826111c0565b9161162e604051938461119e565b82523d6000602084013e565b606090565b919290156116a15750815115611653575090565b3b1561165c5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156116b45750805190602001fd5b60405162461bcd60e51b81526020600482015290819061134c90602483019061150b565b604051602081019080821067ffffffffffffffff831117611188576000938493848094938194604052525af161170c61160f565b509056feaa2bf0f18a184595f311714f88137302cdcad3d20639b5595c7fe0d3db0658faa26469706673582212203e2772763d0eb0b0ea331d06c9c746eb661391e1bbc12b1e9f7f7a4a9eec78f464736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000426dcf053185c099cbe05dcb23775544bbee16d6000000000000000000000000ab107f1e1dac3f2a0f9c2eea5871ddd0850c9829
-----Decoded View---------------
Arg [0] : _salePercentageForEcosystem (uint16): 100
Arg [1] : _feeReceiver (address): 0x426DcF053185c099cbE05dcb23775544bbEe16d6
Arg [2] : _implementation (address): 0xaB107F1E1daC3f2A0f9c2EEa5871DDD0850c9829
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [1] : 000000000000000000000000426dcf053185c099cbe05dcb23775544bbee16d6
Arg [2] : 000000000000000000000000ab107f1e1dac3f2a0f9c2eea5871ddd0850c9829
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.