More Info
Private Name Tags
ContractCreator
Latest 12 from a total of 12 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy Tokens | 454674 | 193 days ago | IN | 0.005 ETH | 0.00000403 | ||||
Buy Tokens | 365475 | 227 days ago | IN | 0.001 ETH | 0.00001148 | ||||
Buy Tokens | 277864 | 254 days ago | IN | 0.4 ETH | 0.00000403 | ||||
Buy Tokens | 264912 | 257 days ago | IN | 0.05 ETH | 0.00000574 | ||||
Buy Tokens | 243084 | 263 days ago | IN | 0.175138 ETH | 0.00000403 | ||||
Buy Tokens | 243078 | 263 days ago | IN | 0.001 ETH | 0.00000574 | ||||
Buy Tokens | 242260 | 263 days ago | IN | 0.036 ETH | 0.00000161 | ||||
Buy Tokens | 242135 | 263 days ago | IN | 0.0005 ETH | 0.00000574 | ||||
Buy Tokens | 239819 | 264 days ago | IN | 0.014 ETH | 0.00000088 | ||||
Buy Tokens | 239769 | 264 days ago | IN | 0.001 ETH | 0.00000126 | ||||
Transfer | 239314 | 264 days ago | IN | 0.0001 ETH | 0.00000079 | ||||
Buy Tokens | 239314 | 264 days ago | IN | 0.00033 ETH | 0.00000145 |
Latest 12 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
454674 | 193 days ago | 0.005 ETH | ||||
365475 | 227 days ago | 0.001 ETH | ||||
277864 | 254 days ago | 0.4 ETH | ||||
264912 | 257 days ago | 0.05 ETH | ||||
243084 | 263 days ago | 0.175138 ETH | ||||
243078 | 263 days ago | 0.001 ETH | ||||
242260 | 263 days ago | 0.036 ETH | ||||
242135 | 263 days ago | 0.0005 ETH | ||||
239819 | 264 days ago | 0.014 ETH | ||||
239769 | 264 days ago | 0.001 ETH | ||||
239314 | 264 days ago | 0.0001 ETH | ||||
239314 | 264 days ago | 0.00033 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TDDCrowdsale
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "./Crowdsale.sol"; contract TDDCrowdsale is Crowdsale { mapping(address => uint256) private _contributions; mapping(address => uint256) public wlStatus; address private wlToken; uint256 private _indCap; constructor( uint256 _rate, address payable _wallet, IERC20 _token, address _wlToken, uint256 _cap ) Crowdsale(_rate, _wallet, _token) { wlToken = _wlToken; _indCap = _cap; } function whitelistCheckIn() public { uint256 wlTokenBal = IERC20(wlToken).balanceOf(msg.sender); if (wlTokenBal >= 4_000_000 * 1e18) { wlStatus[msg.sender] = 2; } else if (wlTokenBal <= 500_000 * 1e18) { wlStatus[msg.sender] = 1; } } /** * @dev Returns the amount contributed so far by a specific beneficiary. * @param beneficiary Address of contributor * @return Beneficiary contribution so far */ function getContribution(address beneficiary) public view returns (uint256) { return _contributions[beneficiary]; } function _preValidatePurchase( address beneficiary, uint256 weiAmount ) internal override view { super._preValidatePurchase(beneficiary, weiAmount); uint256 cap = _indCap; if (wlStatus[msg.sender] > 0) { cap = wlStatus[msg.sender] == 2 ? _indCap * 32 : _indCap * 4; } require( _contributions[beneficiary] + (weiAmount) <= cap ); } function _getTokenAmount(uint256 weiAmount) internal view override returns (uint256) { uint256 tknAmount = weiAmount * rate(); if (wlStatus[msg.sender] > 0) { tknAmount = wlStatus[msg.sender] == 1 ? tknAmount * 110 / 100 : tknAmount * 120 / 100; } if (weiRaised() >= token().totalSupply() / rate() / 50) { tknAmount = tknAmount / 10; } return tknAmount; } /** * @dev Extend parent behavior to update beneficiary contributions * @param beneficiary Token purchaser * @param weiAmount Amount of wei contributed */ function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal override { super._updatePurchasingState(beneficiary, weiAmount); _contributions[beneficiary] = _contributions[beneficiary] + weiAmount; } function _forwardFunds() internal override { (bool success, ) = wallet().call{value: msg.value}(""); require(success, "Transfer failed"); } }
// 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 // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// 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); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// 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. */ 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
// 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 { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// 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 * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The external interface represents the basic interface for purchasing tokens, and conforms * the base architecture for crowdsales. It is *not* intended to be modified / overridden. * The internal interface conforms the extensible and modifiable surface of crowdsales. Override * the methods to add functionality. Consider using 'super' where appropriate to concatenate * behavior. */ abstract contract Crowdsale is Context, ReentrancyGuard { // using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 private _token; // Address where funds are collected address payable private _wallet; // How many token units a buyer gets per wei. // The rate is the conversion between wei and the smallest and indivisible token unit. // So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK // 1 wei will give you 1 unit, or 0.001 TOK. uint256 private _rate; // Amount of wei raised uint256 private _weiRaised; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); /** * @param _r Number of token units a buyer gets per wei * @dev The rate is the conversion between wei and the smallest and indivisible * token unit. So, if you are using a rate of 1 with a ERC20Detailed token * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK. * @param _w Address where collected funds will be forwarded to * @param _t Address of the token being sold */ constructor (uint256 _r, address payable _w, IERC20 _t) { require(_r > 0, "Crowdsale: rate is 0"); require(_w != address(0), "Crowdsale: wallet is the zero address"); require(address(_t) != address(0), "Crowdsale: token is the zero address"); _rate = _r; _wallet = _w; _token = _t; } /** * @dev [receive function] ***DO NOT OVERRIDE*** * Note that other contracts will transfer funds with a base gas stipend * of 2300, which is not enough to call buyTokens. Consider calling * buyTokens directly when purchasing tokens from a contract. */ receive() external payable { buyTokens(_msgSender()); } /** * @return the token being sold. */ function token() public view returns (IERC20) { return _token; } /** * @return the address where funds are collected. */ function wallet() public view returns (address payable) { return _wallet; } /** * @return the number of token units a buyer gets per wei. */ function rate() public view virtual returns (uint256) { return _rate; } /** * @return the amount of wei raised. */ function weiRaised() public view returns (uint256) { return _weiRaised; } /** * @dev low level token purchase ***DO NOT OVERRIDE*** * This function has a non-reentrancy guard, so it shouldn't be called by * another `nonReentrant` function. * @param beneficiary Recipient of the token purchase */ function buyTokens(address beneficiary) public nonReentrant payable { uint256 weiAmount = msg.value; _preValidatePurchase(beneficiary, weiAmount); // calculate token amount to be created uint256 tokens = _getTokenAmount(weiAmount); // update state _weiRaised = _weiRaised + weiAmount; _processPurchase(beneficiary, tokens); emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokens); _updatePurchasingState(beneficiary, weiAmount); _forwardFunds(); _postValidatePurchase(beneficiary, weiAmount); } /** * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. * Use `super` in contracts that inherit from Crowdsale to extend their validations. * @param beneficiary Address performing the token purchase * @param weiAmount Value in wei involved in the purchase */ function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view virtual { require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address"); require(weiAmount != 0, "Crowdsale: weiAmount is 0"); this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 } /** * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid * conditions are not met. * @param beneficiary Address performing the token purchase * @param weiAmount Value in wei involved in the purchase */ function _postValidatePurchase(address beneficiary, uint256 weiAmount) internal view virtual { // solhint-disable-previous-line no-empty-blocks } /** * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends * its tokens. * @param beneficiary Address performing the token purchase * @param tokenAmount Number of tokens to be emitted */ function _deliverTokens(address beneficiary, uint256 tokenAmount) internal virtual { _token.safeTransfer(beneficiary, tokenAmount); } /** * @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send * tokens. * @param beneficiary Address receiving the tokens * @param tokenAmount Number of tokens to be purchased */ function _processPurchase(address beneficiary, uint256 tokenAmount) internal virtual { _deliverTokens(beneficiary, tokenAmount); } /** * @dev Override for extensions that require an internal state to check for validity (current user contributions, * etc.) * @param beneficiary Address receiving the tokens * @param weiAmount Value in wei involved in the purchase */ function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal virtual { // solhint-disable-previous-line no-empty-blocks } /** * @dev Override to extend the way in which ether is converted to tokens. * @param weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */ function _getTokenAmount(uint256 weiAmount) internal view virtual returns (uint256) { return weiAmount * _rate; } /** * @dev Determines how ETH is stored/forwarded on purchases. */ function _forwardFunds() internal virtual { _wallet.transfer(msg.value); } }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"address payable","name":"_wallet","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_wlToken","type":"address"},{"internalType":"uint256","name":"_cap","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getContribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistCheckIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wlStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001bfc38038062001bfc83398181016040528101906200003791906200037a565b84848460016000819055506000831162000088576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007f9062000463565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000fa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000f190620004fb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036200016c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001639062000593565b60405180910390fd5b8260038190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806008819055505050505050620005b5565b600080fd5b6000819050919050565b620002658162000250565b81146200027157600080fd5b50565b60008151905062000285816200025a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002b8826200028b565b9050919050565b620002ca81620002ab565b8114620002d657600080fd5b50565b600081519050620002ea81620002bf565b92915050565b6000620002fd826200028b565b9050919050565b60006200031182620002f0565b9050919050565b620003238162000304565b81146200032f57600080fd5b50565b600081519050620003438162000318565b92915050565b6200035481620002f0565b81146200036057600080fd5b50565b600081519050620003748162000349565b92915050565b600080600080600060a086880312156200039957620003986200024b565b5b6000620003a98882890162000274565b9550506020620003bc88828901620002d9565b9450506040620003cf8882890162000332565b9350506060620003e28882890162000363565b9250506080620003f58882890162000274565b9150509295509295909350565b600082825260208201905092915050565b7f43726f776473616c653a20726174652069732030000000000000000000000000600082015250565b60006200044b60148362000402565b9150620004588262000413565b602082019050919050565b600060208201905081810360008301526200047e816200043c565b9050919050565b7f43726f776473616c653a2077616c6c657420697320746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000620004e360258362000402565b9150620004f08262000485565b604082019050919050565b600060208201905081810360008301526200051681620004d4565b9050919050565b7f43726f776473616c653a20746f6b656e20697320746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006200057b60248362000402565b915062000588826200051d565b604082019050919050565b60006020820190508181036000830152620005ae816200056c565b9050919050565b61163780620005c56000396000f3fe60806040526004361061007f5760003560e01c8063cd71b9581161004e578063cd71b95814610159578063e383043714610170578063ec8ac4d8146101ad578063fc0c546a146101c957610096565b806321eff7fc1461009b5780632c4e722e146100d85780634042b66f14610103578063521eb2731461012e57610096565b366100965761009461008f6101f4565b6101fc565b005b600080fd5b3480156100a757600080fd5b506100c260048036038101906100bd9190610dfa565b6102d5565b6040516100cf9190610e40565b60405180910390f35b3480156100e457600080fd5b506100ed61031e565b6040516100fa9190610e40565b60405180910390f35b34801561010f57600080fd5b50610118610328565b6040516101259190610e40565b60405180910390f35b34801561013a57600080fd5b50610143610332565b6040516101509190610e7c565b60405180910390f35b34801561016557600080fd5b5061016e61035c565b005b34801561017c57600080fd5b5061019760048036038101906101929190610dfa565b6104b3565b6040516101a49190610e40565b60405180910390f35b6101c760048036038101906101c29190610dfa565b6101fc565b005b3480156101d557600080fd5b506101de6104cb565b6040516101eb9190610ef6565b60405180910390f35b600033905090565b6102046104f5565b60003490506102138282610544565b600061021e82610667565b90508160045461022e9190610f40565b60048190555061023e8382610803565b8273ffffffffffffffffffffffffffffffffffffffff1661025d6101f4565b73ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b84846040516102a4929190610f74565b60405180910390a36102b68383610811565b6102be6108ad565b6102c88383610963565b50506102d2610967565b50565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600354905090565b6000600454905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016103b99190610fac565b602060405180830381865afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa9190610ff3565b90506a034f086f3b33b6840000008110610458576002600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104b0565b6969e10de76676d080000081116104af576001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b50565b60066020528060005260406000206000915090505481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60026000540361053a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105319061107d565b60405180910390fd5b6002600081905550565b61054e8282610971565b600060085490506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561060b576002600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146105f85760046008546105f3919061109d565b610608565b6020600854610607919061109d565b5b90505b8082600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106579190610f40565b111561066257600080fd5b505050565b60008061067261031e565b8361067d919061109d565b90506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610749576001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461072c57606460788261071d919061109d565b610727919061110e565b610746565b6064606e8261073b919061109d565b610745919061110e565b5b90505b603261075361031e565b61075b6104cb565b73ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c99190610ff3565b6107d3919061110e565b6107dd919061110e565b6107e5610328565b106107fa57600a816107f7919061110e565b90505b80915050919050565b61080d8282610a27565b5050565b61081b8282610a78565b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108669190610f40565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60006108b7610332565b73ffffffffffffffffffffffffffffffffffffffff16346040516108da90611170565b60006040518083038185875af1925050503d8060008114610917576040519150601f19603f3d011682016040523d82523d6000602084013e61091c565b606091505b5050905080610960576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610957906111d1565b60405180910390fd5b50565b5050565b6001600081905550565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d790611263565b60405180910390fd5b60008103610a23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1a906112cf565b60405180910390fd5b5050565b610a748282600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a7c9092919063ffffffff16565b5050565b5050565b610afd8363a9059cbb60e01b8484604051602401610a9b9291906112ef565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610b02565b505050565b6000610b64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610bca9092919063ffffffff16565b9050600081511480610b86575080806020019051810190610b859190611350565b5b610bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbc906113ef565b60405180910390fd5b505050565b6060610bd98484600085610be2565b90509392505050565b606082471015610c27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1e90611481565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c509190611507565b60006040518083038185875af1925050503d8060008114610c8d576040519150601f19603f3d011682016040523d82523d6000602084013e610c92565b606091505b5091509150610ca387838387610caf565b92505050949350505050565b60608315610d11576000835103610d0957610cc985610d24565b610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff9061156a565b60405180910390fd5b5b829050610d1c565b610d1b8383610d47565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115610d5a5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8e91906115df565b60405180910390fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610dc782610d9c565b9050919050565b610dd781610dbc565b8114610de257600080fd5b50565b600081359050610df481610dce565b92915050565b600060208284031215610e1057610e0f610d97565b5b6000610e1e84828501610de5565b91505092915050565b6000819050919050565b610e3a81610e27565b82525050565b6000602082019050610e556000830184610e31565b92915050565b6000610e6682610d9c565b9050919050565b610e7681610e5b565b82525050565b6000602082019050610e916000830184610e6d565b92915050565b6000819050919050565b6000610ebc610eb7610eb284610d9c565b610e97565b610d9c565b9050919050565b6000610ece82610ea1565b9050919050565b6000610ee082610ec3565b9050919050565b610ef081610ed5565b82525050565b6000602082019050610f0b6000830184610ee7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610f4b82610e27565b9150610f5683610e27565b9250828201905080821115610f6e57610f6d610f11565b5b92915050565b6000604082019050610f896000830185610e31565b610f966020830184610e31565b9392505050565b610fa681610dbc565b82525050565b6000602082019050610fc16000830184610f9d565b92915050565b610fd081610e27565b8114610fdb57600080fd5b50565b600081519050610fed81610fc7565b92915050565b60006020828403121561100957611008610d97565b5b600061101784828501610fde565b91505092915050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000611067601f83611020565b915061107282611031565b602082019050919050565b600060208201905081810360008301526110968161105a565b9050919050565b60006110a882610e27565b91506110b383610e27565b92508282026110c181610e27565b915082820484148315176110d8576110d7610f11565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061111982610e27565b915061112483610e27565b925082611134576111336110df565b5b828204905092915050565b600081905092915050565b50565b600061115a60008361113f565b91506111658261114a565b600082019050919050565b600061117b8261114d565b9150819050919050565b7f5472616e73666572206661696c65640000000000000000000000000000000000600082015250565b60006111bb600f83611020565b91506111c682611185565b602082019050919050565b600060208201905081810360008301526111ea816111ae565b9050919050565b7f43726f776473616c653a2062656e656669636961727920697320746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061124d602a83611020565b9150611258826111f1565b604082019050919050565b6000602082019050818103600083015261127c81611240565b9050919050565b7f43726f776473616c653a20776569416d6f756e74206973203000000000000000600082015250565b60006112b9601983611020565b91506112c482611283565b602082019050919050565b600060208201905081810360008301526112e8816112ac565b9050919050565b60006040820190506113046000830185610f9d565b6113116020830184610e31565b9392505050565b60008115159050919050565b61132d81611318565b811461133857600080fd5b50565b60008151905061134a81611324565b92915050565b60006020828403121561136657611365610d97565b5b60006113748482850161133b565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006113d9602a83611020565b91506113e48261137d565b604082019050919050565b60006020820190508181036000830152611408816113cc565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061146b602683611020565b91506114768261140f565b604082019050919050565b6000602082019050818103600083015261149a8161145e565b9050919050565b600081519050919050565b60005b838110156114ca5780820151818401526020810190506114af565b60008484015250505050565b60006114e1826114a1565b6114eb818561113f565b93506114fb8185602086016114ac565b80840191505092915050565b600061151382846114d6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000611554601d83611020565b915061155f8261151e565b602082019050919050565b6000602082019050818103600083015261158381611547565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006115b18261158a565b6115bb8185611020565b93506115cb8185602086016114ac565b6115d481611595565b840191505092915050565b600060208201905081810360008301526115f981846115a6565b90509291505056fea26469706673582212207ef433adb20cd478d66f76ad1cec1ae0df9aa84829bada14fd11775de0e3838964736f6c6343000818003300000000000000000000000000000000000000000000000000000000002625a0000000000000000000000000eaeb91f3040e8cd1bdff40f1892972df51eeb30e000000000000000000000000288fef763903e734521c761d5133f36d313241770000000000000000000000001fd2f219b59b88bdda7dacd50c6e0667aa2d3ee700000000000000000000000000000000000000000000000006f05b59d3b20000
Deployed Bytecode
0x60806040526004361061007f5760003560e01c8063cd71b9581161004e578063cd71b95814610159578063e383043714610170578063ec8ac4d8146101ad578063fc0c546a146101c957610096565b806321eff7fc1461009b5780632c4e722e146100d85780634042b66f14610103578063521eb2731461012e57610096565b366100965761009461008f6101f4565b6101fc565b005b600080fd5b3480156100a757600080fd5b506100c260048036038101906100bd9190610dfa565b6102d5565b6040516100cf9190610e40565b60405180910390f35b3480156100e457600080fd5b506100ed61031e565b6040516100fa9190610e40565b60405180910390f35b34801561010f57600080fd5b50610118610328565b6040516101259190610e40565b60405180910390f35b34801561013a57600080fd5b50610143610332565b6040516101509190610e7c565b60405180910390f35b34801561016557600080fd5b5061016e61035c565b005b34801561017c57600080fd5b5061019760048036038101906101929190610dfa565b6104b3565b6040516101a49190610e40565b60405180910390f35b6101c760048036038101906101c29190610dfa565b6101fc565b005b3480156101d557600080fd5b506101de6104cb565b6040516101eb9190610ef6565b60405180910390f35b600033905090565b6102046104f5565b60003490506102138282610544565b600061021e82610667565b90508160045461022e9190610f40565b60048190555061023e8382610803565b8273ffffffffffffffffffffffffffffffffffffffff1661025d6101f4565b73ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b84846040516102a4929190610f74565b60405180910390a36102b68383610811565b6102be6108ad565b6102c88383610963565b50506102d2610967565b50565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600354905090565b6000600454905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016103b99190610fac565b602060405180830381865afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa9190610ff3565b90506a034f086f3b33b6840000008110610458576002600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104b0565b6969e10de76676d080000081116104af576001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b50565b60066020528060005260406000206000915090505481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60026000540361053a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105319061107d565b60405180910390fd5b6002600081905550565b61054e8282610971565b600060085490506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561060b576002600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146105f85760046008546105f3919061109d565b610608565b6020600854610607919061109d565b5b90505b8082600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106579190610f40565b111561066257600080fd5b505050565b60008061067261031e565b8361067d919061109d565b90506000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610749576001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461072c57606460788261071d919061109d565b610727919061110e565b610746565b6064606e8261073b919061109d565b610745919061110e565b5b90505b603261075361031e565b61075b6104cb565b73ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c99190610ff3565b6107d3919061110e565b6107dd919061110e565b6107e5610328565b106107fa57600a816107f7919061110e565b90505b80915050919050565b61080d8282610a27565b5050565b61081b8282610a78565b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108669190610f40565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60006108b7610332565b73ffffffffffffffffffffffffffffffffffffffff16346040516108da90611170565b60006040518083038185875af1925050503d8060008114610917576040519150601f19603f3d011682016040523d82523d6000602084013e61091c565b606091505b5050905080610960576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610957906111d1565b60405180910390fd5b50565b5050565b6001600081905550565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d790611263565b60405180910390fd5b60008103610a23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1a906112cf565b60405180910390fd5b5050565b610a748282600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a7c9092919063ffffffff16565b5050565b5050565b610afd8363a9059cbb60e01b8484604051602401610a9b9291906112ef565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610b02565b505050565b6000610b64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610bca9092919063ffffffff16565b9050600081511480610b86575080806020019051810190610b859190611350565b5b610bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbc906113ef565b60405180910390fd5b505050565b6060610bd98484600085610be2565b90509392505050565b606082471015610c27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1e90611481565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c509190611507565b60006040518083038185875af1925050503d8060008114610c8d576040519150601f19603f3d011682016040523d82523d6000602084013e610c92565b606091505b5091509150610ca387838387610caf565b92505050949350505050565b60608315610d11576000835103610d0957610cc985610d24565b610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff9061156a565b60405180910390fd5b5b829050610d1c565b610d1b8383610d47565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115610d5a5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8e91906115df565b60405180910390fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610dc782610d9c565b9050919050565b610dd781610dbc565b8114610de257600080fd5b50565b600081359050610df481610dce565b92915050565b600060208284031215610e1057610e0f610d97565b5b6000610e1e84828501610de5565b91505092915050565b6000819050919050565b610e3a81610e27565b82525050565b6000602082019050610e556000830184610e31565b92915050565b6000610e6682610d9c565b9050919050565b610e7681610e5b565b82525050565b6000602082019050610e916000830184610e6d565b92915050565b6000819050919050565b6000610ebc610eb7610eb284610d9c565b610e97565b610d9c565b9050919050565b6000610ece82610ea1565b9050919050565b6000610ee082610ec3565b9050919050565b610ef081610ed5565b82525050565b6000602082019050610f0b6000830184610ee7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610f4b82610e27565b9150610f5683610e27565b9250828201905080821115610f6e57610f6d610f11565b5b92915050565b6000604082019050610f896000830185610e31565b610f966020830184610e31565b9392505050565b610fa681610dbc565b82525050565b6000602082019050610fc16000830184610f9d565b92915050565b610fd081610e27565b8114610fdb57600080fd5b50565b600081519050610fed81610fc7565b92915050565b60006020828403121561100957611008610d97565b5b600061101784828501610fde565b91505092915050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000611067601f83611020565b915061107282611031565b602082019050919050565b600060208201905081810360008301526110968161105a565b9050919050565b60006110a882610e27565b91506110b383610e27565b92508282026110c181610e27565b915082820484148315176110d8576110d7610f11565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061111982610e27565b915061112483610e27565b925082611134576111336110df565b5b828204905092915050565b600081905092915050565b50565b600061115a60008361113f565b91506111658261114a565b600082019050919050565b600061117b8261114d565b9150819050919050565b7f5472616e73666572206661696c65640000000000000000000000000000000000600082015250565b60006111bb600f83611020565b91506111c682611185565b602082019050919050565b600060208201905081810360008301526111ea816111ae565b9050919050565b7f43726f776473616c653a2062656e656669636961727920697320746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061124d602a83611020565b9150611258826111f1565b604082019050919050565b6000602082019050818103600083015261127c81611240565b9050919050565b7f43726f776473616c653a20776569416d6f756e74206973203000000000000000600082015250565b60006112b9601983611020565b91506112c482611283565b602082019050919050565b600060208201905081810360008301526112e8816112ac565b9050919050565b60006040820190506113046000830185610f9d565b6113116020830184610e31565b9392505050565b60008115159050919050565b61132d81611318565b811461133857600080fd5b50565b60008151905061134a81611324565b92915050565b60006020828403121561136657611365610d97565b5b60006113748482850161133b565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006113d9602a83611020565b91506113e48261137d565b604082019050919050565b60006020820190508181036000830152611408816113cc565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061146b602683611020565b91506114768261140f565b604082019050919050565b6000602082019050818103600083015261149a8161145e565b9050919050565b600081519050919050565b60005b838110156114ca5780820151818401526020810190506114af565b60008484015250505050565b60006114e1826114a1565b6114eb818561113f565b93506114fb8185602086016114ac565b80840191505092915050565b600061151382846114d6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000611554601d83611020565b915061155f8261151e565b602082019050919050565b6000602082019050818103600083015261158381611547565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006115b18261158a565b6115bb8185611020565b93506115cb8185602086016114ac565b6115d481611595565b840191505092915050565b600060208201905081810360008301526115f981846115a6565b90509291505056fea26469706673582212207ef433adb20cd478d66f76ad1cec1ae0df9aa84829bada14fd11775de0e3838964736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000002625a0000000000000000000000000eaeb91f3040e8cd1bdff40f1892972df51eeb30e000000000000000000000000288fef763903e734521c761d5133f36d313241770000000000000000000000001fd2f219b59b88bdda7dacd50c6e0667aa2d3ee700000000000000000000000000000000000000000000000006f05b59d3b20000
-----Decoded View---------------
Arg [0] : _rate (uint256): 2500000
Arg [1] : _wallet (address): 0xeaEb91f3040e8cD1BDFF40F1892972DF51eEB30e
Arg [2] : _token (address): 0x288Fef763903E734521C761D5133f36D31324177
Arg [3] : _wlToken (address): 0x1Fd2f219B59b88bDda7dacd50c6e0667aA2d3Ee7
Arg [4] : _cap (uint256): 500000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000002625a0
Arg [1] : 000000000000000000000000eaeb91f3040e8cd1bdff40f1892972df51eeb30e
Arg [2] : 000000000000000000000000288fef763903e734521c761d5133f36d31324177
Arg [3] : 0000000000000000000000001fd2f219b59b88bdda7dacd50c6e0667aa2d3ee7
Arg [4] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 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.