More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 861 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 17009647 | 478 days ago | IN | 0 ETH | 0.00155853 | ||||
Claim | 17009603 | 478 days ago | IN | 0 ETH | 0.0019422 | ||||
Claim | 16909744 | 492 days ago | IN | 0 ETH | 0.00126711 | ||||
Claim | 16686582 | 523 days ago | IN | 0 ETH | 0.00365307 | ||||
Claim | 16673041 | 525 days ago | IN | 0 ETH | 0.00214075 | ||||
Claim | 16660216 | 527 days ago | IN | 0 ETH | 0.00163654 | ||||
Claim | 16657449 | 527 days ago | IN | 0 ETH | 0.00190798 | ||||
Claim | 16657336 | 527 days ago | IN | 0 ETH | 0.00215245 | ||||
Claim | 16524724 | 546 days ago | IN | 0 ETH | 0.00093927 | ||||
Claim | 16495447 | 550 days ago | IN | 0 ETH | 0.00140979 | ||||
Claim | 16466843 | 554 days ago | IN | 0 ETH | 0.00101069 | ||||
Claim | 16441719 | 557 days ago | IN | 0 ETH | 0.00185112 | ||||
Claim | 16361500 | 569 days ago | IN | 0 ETH | 0.0011236 | ||||
Claim | 16361475 | 569 days ago | IN | 0 ETH | 0.00108996 | ||||
Claim | 16331062 | 573 days ago | IN | 0 ETH | 0.00131274 | ||||
Claim | 16331049 | 573 days ago | IN | 0 ETH | 0.0013196 | ||||
Claim | 16312772 | 575 days ago | IN | 0 ETH | 0.0009126 | ||||
Claim | 16303690 | 577 days ago | IN | 0 ETH | 0.00135413 | ||||
Claim | 16299449 | 577 days ago | IN | 0 ETH | 0.00103657 | ||||
Claim | 16299364 | 577 days ago | IN | 0 ETH | 0.00147363 | ||||
Claim | 16299363 | 577 days ago | IN | 0 ETH | 0.00183348 | ||||
Claim | 16299203 | 577 days ago | IN | 0 ETH | 0.00116033 | ||||
Claim | 16299198 | 577 days ago | IN | 0 ETH | 0.00111663 | ||||
Claim | 16287625 | 579 days ago | IN | 0 ETH | 0.00105209 | ||||
Claim | 16227030 | 587 days ago | IN | 0 ETH | 0.00162339 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract contains unverified libraries: __CACHE_BREAKER__
Contract Name:
LevxStreaming
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract LevxStreaming is Ownable { using SafeERC20 for IERC20; using Address for address; uint256 constant STREAMING_PERIOD = 180 days; struct Stream { address recipient; uint64 startedAt; uint256 amount; uint256 claimed; } address public immutable levx; address public immutable signer; address public immutable wallet; uint64 public immutable deadline; mapping(bytes32 => Stream[]) public streams; event Start(bytes32 indexed id, uint256 nonce, uint256 amount, address indexed recipient); event Claim(bytes32 indexed id, uint256 nonce, uint256 amount, address indexed recipient); constructor( address _levx, address _signer, address _wallet, uint64 _deadline ) { levx = _levx; signer = _signer; wallet = _wallet; deadline = _deadline; } function start( bytes32 id, uint256 amount, uint8 v, bytes32 r, bytes32 s ) external { require(amount > 0, "LEVX: INVALID_AMOUNT"); uint64 _now = uint64(block.timestamp); require(_now < deadline, "LEVX: EXPIRED"); uint256 nonce = streams[id].length; bytes32 message = keccak256(abi.encodePacked(id, nonce, amount)); require(ECDSA.recover(ECDSA.toEthSignedMessageHash(message), v, r, s) == signer, "LEVX: UNAUTHORIZED"); Stream storage stream = streams[id].push(); stream.recipient = msg.sender; stream.startedAt = _now; stream.amount = amount; emit Start(id, nonce, amount, msg.sender); IERC20(levx).safeTransferFrom(wallet, address(this), amount); } function claim( bytes32 id, uint256 nonce, address to, bytes calldata callData ) external { Stream storage stream = streams[id][nonce]; require(stream.recipient == msg.sender, "LEVX: FORBIDDEN"); uint256 amount = _amountReleased(stream); uint256 pending = amount - stream.claimed; stream.claimed = amount; if (to == address(0)) { emit Claim(id, nonce, pending, msg.sender); IERC20(levx).safeTransfer(msg.sender, pending); } else { emit Claim(id, nonce, pending, to); IERC20(levx).safeTransfer(to, pending); to.functionCall(callData); } } function pendingAmount(bytes32 id, uint256 index) external view returns (uint256) { Stream storage stream = streams[id][index]; return _amountReleased(stream) - stream.claimed; } function _amountReleased(Stream storage stream) internal view returns (uint256) { uint256 duration = block.timestamp - stream.startedAt; if (duration > STREAMING_PERIOD) duration = STREAMING_PERIOD; return (stream.amount * duration) / STREAMING_PERIOD; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./MerkleProof.sol"; contract ERC20Airdrops is MerkleProof { using SafeERC20 for IERC20; mapping(address => mapping(bytes32 => uint256)) public deadlineOf; mapping(address => mapping(bytes32 => address)) public walletOf; mapping(address => mapping(bytes32 => mapping(bytes32 => bool))) internal _hasClaimed; event AddMerkleRoot(address indexed token, bytes32 indexed merkleRoot, address wallet, uint256 deadline); event Claim( address indexed token, bytes32 indexed merkleRoot, address wallet, address indexed account, uint256 amount ); function addMerkleRoot( address token, bytes32 merkleRoot, uint256 deadline ) external { address wallet = walletOf[token][merkleRoot]; require(wallet == address(0), "LEVX: DUPLICATE_ROOT"); walletOf[token][merkleRoot] = msg.sender; deadlineOf[token][merkleRoot] = deadline; emit AddMerkleRoot(token, merkleRoot, msg.sender, deadline); } function claim( address token, bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount ) external { address wallet = walletOf[token][merkleRoot]; require(wallet != address(0), "LEVX: INVALID_ROOT"); require(block.timestamp < deadlineOf[token][merkleRoot], "LEVX: EXPIRED"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(!_hasClaimed[token][merkleRoot][leaf], "LEVX: FORBIDDEN"); require(verify(merkleRoot, leaf, merkleProof), "LEVX: INVALID_PROOF"); _hasClaimed[token][merkleRoot][leaf] = true; IERC20(token).safeTransferFrom(wallet, msg.sender, amount); emit Claim(token, merkleRoot, wallet, msg.sender, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } 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)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } 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"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @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"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; contract MerkleProof { function verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) public pure returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash < proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./MerkleProof.sol"; contract LevxAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount); constructor(address _owner, address _levx) { levx = _levx; _transferOwnership(_owner); } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { require(!isValidMerkleRoot[merkleRoot], "SHOYU: DUPLICATE_ROOT"); isValidMerkleRoot[merkleRoot] = true; emit AddMerkleRoot(merkleRoot); } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount ) external { require(isValidMerkleRoot[merkleRoot], "SHOYU: INVALID_ROOT"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(!_hasClaimed[merkleRoot][leaf], "SHOYU: FORBIDDEN"); require(verify(merkleRoot, leaf, merkleProof), "SHOYU: INVALID_PROOF"); _hasClaimed[merkleRoot][leaf] = true; IERC20(levx).safeTransferFrom(owner(), msg.sender, amount); emit Claim(merkleRoot, msg.sender, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./uniswapv2/interfaces/IUniswapV2Router01.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./uniswapv2/interfaces/IWETH.sol"; import "./uniswapv2/libraries/UniswapV2Library.sol"; import "./MerkleProof.sol"; contract ETHAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; address public immutable weth; address public immutable router; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event Deposit(uint256 amount, address from); event Withdraw(uint256 amount, address to); event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount, address to); modifier ensure(uint256 deadline) { require(deadline >= block.timestamp, "LEVX: EXPIRED"); _; } constructor( address _owner, address _levx, address _weth, address _router ) { levx = _levx; weth = _weth; router = _router; _transferOwnership(_owner); } receive() external payable { emit Deposit(msg.value, msg.sender); } function withdraw(uint256 amount) external onlyOwner { payable(msg.sender).transfer(amount); emit Withdraw(amount, msg.sender); } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { require(!isValidMerkleRoot[merkleRoot], "SHOYU: DUPLICATE_ROOT"); isValidMerkleRoot[merkleRoot] = true; emit AddMerkleRoot(merkleRoot); } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, address to ) public { require(isValidMerkleRoot[merkleRoot], "SHOYU: INVALID_ROOT"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(!_hasClaimed[merkleRoot][leaf], "SHOYU: FORBIDDEN"); require(verify(merkleRoot, leaf, merkleProof), "SHOYU: INVALID_PROOF"); _hasClaimed[merkleRoot][leaf] = true; if (to != address(this)) { payable(to).transfer(amount); } emit Claim(merkleRoot, msg.sender, amount, to); } function batchClaim( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, address to ) external { for (uint256 i; i < merkleRoots.length; i++) { claim(merkleRoots[i], merkleProofs[i], amounts[i], to); } } function claimAndSwapToLevx( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { claim(merkleRoot, merkleProof, amount, address(this)); address[] memory path = new address[](2); path[0] = weth; path[1] = levx; uint256[] memory amounts = IUniswapV2Router01(router).swapExactETHForTokens{value: amount}( amountOutMin, path, to, deadline ); amountOut = amounts[1]; } function batchClaimAndSwapToLevx( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { uint256 amountIn; for (uint256 i; i < merkleRoots.length; i++) { uint256 amount = amounts[i]; claim(merkleRoots[i], merkleProofs[i], amount, address(this)); amountIn += amount; } address[] memory path = new address[](2); path[0] = weth; path[1] = levx; uint256[] memory _amounts = IUniswapV2Router01(router).swapExactETHForTokens{value: amountIn}( amountOutMin, path, to, deadline ); amountOut = _amounts[1]; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.8.3; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../interfaces/IUniswapV2Pair.sol"; library UniswapV2Library { using SafeMath for uint256; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES"); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS"); } // calculates the CREATE2 address for a pair without making any external calls function pairFor( address factory, address tokenA, address tokenB ) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address( uint160( uint256( keccak256( abi.encodePacked( hex"ff", factory, keccak256(abi.encodePacked(token0, token1)), hex"e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303" // init code hash ) ) ) ) ); } // fetches and sorts the reserves for a pair function getReserves( address factory, address tokenA, address tokenB ) internal view returns (uint256 reserveA, uint256 reserveB) { (address token0, ) = sortTokens(tokenA, tokenB); (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves(); (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0); } // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) internal pure returns (uint256 amountB) { require(amountA > 0, "UniswapV2Library: INSUFFICIENT_AMOUNT"); require(reserveA > 0 && reserveB > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY"); amountB = amountA.mul(reserveB) / reserveA; } // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); require(reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY"); uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } // given an output amount of an asset and pair reserves, returns a required input amount of the other asset function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountIn) { require(amountOut > 0, "UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT"); require(reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY"); uint256 numerator = reserveIn.mul(amountOut).mul(1000); uint256 denominator = reserveOut.sub(amountOut).mul(997); amountIn = (numerator / denominator).add(1); } // performs chained getAmountOut calculations on any number of pairs function getAmountsOut( address factory, uint256 amountIn, address[] memory path ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "UniswapV2Library: INVALID_PATH"); amounts = new uint256[](path.length); amounts[0] = amountIn; for (uint256 i; i < path.length - 1; i++) { (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]); amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut); } } // performs chained getAmountIn calculations on any number of pairs function getAmountsIn( address factory, uint256 amountOut, address[] memory path ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "UniswapV2Library: INVALID_PATH"); amounts = new uint256[](path.length); amounts[amounts.length - 1] = amountOut; for (uint256 i = path.length - 1; i > 0; i--) { (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]); amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": { "": { "__CACHE_BREAKER__": "0x00000000d41867734bbee4c6863d9255b2b06ac1" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_levx","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint64","name":"_deadline","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"Claim","type":"event"},{"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":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"Start","type":"event"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadline","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"pendingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"streams","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint64","name":"startedAt","type":"uint64"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101006040523480156200001257600080fd5b5060405162001410380380620014108339810160408190526200003591620000e5565b620000403362000078565b606093841b6001600160601b031990811660805292841b831660a052921b1660c09081521b6001600160c01b03191660e0526200014e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000e057600080fd5b919050565b60008060008060808587031215620000fb578384fd5b6200010685620000c8565b93506200011660208601620000c8565b92506200012660408601620000c8565b60608601519092506001600160401b038116811462000143578182fd5b939692955090935050565b60805160601c60a05160601c60c05160601c60e05160c01c611254620001bc6000396000818160f7015261068901526000818161014c01526108ce01526000818160b301526107300152600081816101730152818161034c015281816103cb01526108ac01526112546000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063715018a611610071578063715018a6146101955780638da5cb5b1461019d578063c2449e42146101ae578063d0f00f71146101f4578063f2fde38b14610215578063f89a335f14610228576100a9565b8063238ac933146100ae57806329dcb0cf146100f25780633e3e2df914610132578063521eb2731461014757806362df34721461016e575b600080fd5b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101197f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016100e9565b61014561014036600461105b565b61023b565b005b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b610145610448565b6000546001600160a01b03166100d5565b6101c16101bc36600461103a565b6104ae565b604080516001600160a01b03909516855267ffffffffffffffff90931660208501529183015260608201526080016100e9565b61020761020236600461103a565b61050a565b6040519081526020016100e9565b610145610223366004611000565b61056b565b6101456102363660046110ea565b610636565b600085815260016020526040812080548690811061026957634e487b7160e01b600052603260045260246000fd5b6000918252602090912060039091020180549091506001600160a01b031633146102cc5760405162461bcd60e51b815260206004820152600f60248201526e2622ab2c1d102327a92124a22222a760891b60448201526064015b60405180910390fd5b60006102d7826108f4565b905060008260020154826102eb91906111c5565b6002840183905590506001600160a01b03861661037857604080518881526020810183905233918a917f1960dfd4537d6acbc4c5daa63ceab7e696c3b69223ca133bdb1cbc8ffc105b71910160405180910390a36103736001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610950565b61043e565b60408051888152602081018390526001600160a01b038816918a917f1960dfd4537d6acbc4c5daa63ceab7e696c3b69223ca133bdb1cbc8ffc105b71910160405180910390a36103f26001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168783610950565b61043c85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a16929150506109b8565b505b5050505050505050565b6000546001600160a01b031633146104a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102c3565b6104ac6000610a01565b565b600160205281600052604060002081815481106104ca57600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0382169450600160a01b90910467ffffffffffffffff16925084565b600082815260016020526040812080548291908490811061053b57634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020190508060020154610559826108f4565b61056391906111c5565b949350505050565b6000546001600160a01b031633146105c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102c3565b6001600160a01b03811661062a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102c3565b61063381610a01565b50565b6000841161067d5760405162461bcd60e51b8152602060048201526014602482015273131155960e881253959053125117d05353d5539560621b60448201526064016102c3565b4267ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116908216106106ea5760405162461bcd60e51b815260206004820152600d60248201526c131155960e8811561412549151609a1b60448201526064016102c3565b60008681526001602090815260408083205481519283018a90529082018190526060820188905291906080016040516020818303038152906040528051906020012090507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107ba6107b2836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b888888610a51565b6001600160a01b0316146108055760405162461bcd60e51b8152602060048201526012602482015271131155960e8815539055551213d49256915160721b60448201526064016102c3565b60008881526001602081815260408084208054808501825590855293829020600390940290930180546001600160e01b0319163367ffffffffffffffff60a01b19811691909117600160a01b67ffffffffffffffff8a16021782559281018b905583518681529182018b9052928b917f5b3457de7e5226f80550c41609da83871b7ea7fcf4ba4ee4d55dd3c928a532a7910160405180910390a361043c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000308b610a79565b8054600090819061091690600160a01b900467ffffffffffffffff16426111c5565b905062ed4e00811115610929575062ed4e005b62ed4e0081846001015461093d91906111a6565b6109479190611186565b9150505b919050565b6040516001600160a01b0383166024820152604481018290526109b390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ab7565b505050565b60606109fa83836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610b89565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000610a6287878787610b98565b91509150610a6f81610c85565b5095945050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ab19085906323b872dd60e01b9060840161097c565b50505050565b6000610b0c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b899092919063ffffffff16565b8051909150156109b35780806020019051810190610b2a919061101a565b6109b35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102c3565b60606105638484600085610e88565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610bcf5750600090506003610c7c565b8460ff16601b14158015610be757508460ff16601c14155b15610bf85750600090506004610c7c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610c4c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c7557600060019250925050610c7c565b9150600090505b94509492505050565b6000816004811115610ca757634e487b7160e01b600052602160045260246000fd5b1415610cb257610633565b6001816004811115610cd457634e487b7160e01b600052602160045260246000fd5b1415610d225760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102c3565b6002816004811115610d4457634e487b7160e01b600052602160045260246000fd5b1415610d925760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102c3565b6003816004811115610db457634e487b7160e01b600052602160045260246000fd5b1415610e0d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102c3565b6004816004811115610e2f57634e487b7160e01b600052602160045260246000fd5b14156106335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102c3565b606082471015610ee95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102c3565b843b610f375760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102c3565b600080866001600160a01b03168587604051610f539190611137565b60006040518083038185875af1925050503d8060008114610f90576040519150601f19603f3d011682016040523d82523d6000602084013e610f95565b606091505b5091509150610fa5828286610fb0565b979650505050505050565b60608315610fbf5750816109fa565b825115610fcf5782518084602001fd5b8160405162461bcd60e51b81526004016102c39190611153565b80356001600160a01b038116811461094b57600080fd5b600060208284031215611011578081fd5b6109fa82610fe9565b60006020828403121561102b578081fd5b815180151581146109fa578182fd5b6000806040838503121561104c578081fd5b50508035926020909101359150565b600080600080600060808688031215611072578081fd5b853594506020860135935061108960408701610fe9565b9250606086013567ffffffffffffffff808211156110a5578283fd5b818801915088601f8301126110b8578283fd5b8135818111156110c6578384fd5b8960208285010111156110d7578384fd5b9699959850939650602001949392505050565b600080600080600060a08688031215611101578081fd5b8535945060208601359350604086013560ff8116811461111f578182fd5b94979396509394606081013594506080013592915050565b600082516111498184602087016111dc565b9190910192915050565b60006020825282518060208401526111728160408501602087016111dc565b601f01601f19169190910160400192915050565b6000826111a157634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156111c0576111c0611208565b500290565b6000828210156111d7576111d7611208565b500390565b60005b838110156111f75781810151838201526020016111df565b83811115610ab15750506000910152565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220635b299671159f0b45e87f8753a5924f704b86986e032ac978b1060f40ee5bdf64736f6c63430008030033000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc000000000000000000000000e9d4afb6f8c9196972c6d9a74d5e54bbb7721f5b0000000000000000000000000903f8892c06a99bf1d68088fab597a0762e0bc80000000000000000000000000000000000000000000000000000000062609e80
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063715018a611610071578063715018a6146101955780638da5cb5b1461019d578063c2449e42146101ae578063d0f00f71146101f4578063f2fde38b14610215578063f89a335f14610228576100a9565b8063238ac933146100ae57806329dcb0cf146100f25780633e3e2df914610132578063521eb2731461014757806362df34721461016e575b600080fd5b6100d57f000000000000000000000000e9d4afb6f8c9196972c6d9a74d5e54bbb7721f5b81565b6040516001600160a01b0390911681526020015b60405180910390f35b6101197f0000000000000000000000000000000000000000000000000000000062609e8081565b60405167ffffffffffffffff90911681526020016100e9565b61014561014036600461105b565b61023b565b005b6100d57f0000000000000000000000000903f8892c06a99bf1d68088fab597a0762e0bc881565b6100d57f000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc81565b610145610448565b6000546001600160a01b03166100d5565b6101c16101bc36600461103a565b6104ae565b604080516001600160a01b03909516855267ffffffffffffffff90931660208501529183015260608201526080016100e9565b61020761020236600461103a565b61050a565b6040519081526020016100e9565b610145610223366004611000565b61056b565b6101456102363660046110ea565b610636565b600085815260016020526040812080548690811061026957634e487b7160e01b600052603260045260246000fd5b6000918252602090912060039091020180549091506001600160a01b031633146102cc5760405162461bcd60e51b815260206004820152600f60248201526e2622ab2c1d102327a92124a22222a760891b60448201526064015b60405180910390fd5b60006102d7826108f4565b905060008260020154826102eb91906111c5565b6002840183905590506001600160a01b03861661037857604080518881526020810183905233918a917f1960dfd4537d6acbc4c5daa63ceab7e696c3b69223ca133bdb1cbc8ffc105b71910160405180910390a36103736001600160a01b037f000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc163383610950565b61043e565b60408051888152602081018390526001600160a01b038816918a917f1960dfd4537d6acbc4c5daa63ceab7e696c3b69223ca133bdb1cbc8ffc105b71910160405180910390a36103f26001600160a01b037f000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc168783610950565b61043c85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a16929150506109b8565b505b5050505050505050565b6000546001600160a01b031633146104a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102c3565b6104ac6000610a01565b565b600160205281600052604060002081815481106104ca57600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0382169450600160a01b90910467ffffffffffffffff16925084565b600082815260016020526040812080548291908490811061053b57634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020190508060020154610559826108f4565b61056391906111c5565b949350505050565b6000546001600160a01b031633146105c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102c3565b6001600160a01b03811661062a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102c3565b61063381610a01565b50565b6000841161067d5760405162461bcd60e51b8152602060048201526014602482015273131155960e881253959053125117d05353d5539560621b60448201526064016102c3565b4267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000062609e808116908216106106ea5760405162461bcd60e51b815260206004820152600d60248201526c131155960e8811561412549151609a1b60448201526064016102c3565b60008681526001602090815260408083205481519283018a90529082018190526060820188905291906080016040516020818303038152906040528051906020012090507f000000000000000000000000e9d4afb6f8c9196972c6d9a74d5e54bbb7721f5b6001600160a01b03166107ba6107b2836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b888888610a51565b6001600160a01b0316146108055760405162461bcd60e51b8152602060048201526012602482015271131155960e8815539055551213d49256915160721b60448201526064016102c3565b60008881526001602081815260408084208054808501825590855293829020600390940290930180546001600160e01b0319163367ffffffffffffffff60a01b19811691909117600160a01b67ffffffffffffffff8a16021782559281018b905583518681529182018b9052928b917f5b3457de7e5226f80550c41609da83871b7ea7fcf4ba4ee4d55dd3c928a532a7910160405180910390a361043c6001600160a01b037f000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc167f0000000000000000000000000903f8892c06a99bf1d68088fab597a0762e0bc8308b610a79565b8054600090819061091690600160a01b900467ffffffffffffffff16426111c5565b905062ed4e00811115610929575062ed4e005b62ed4e0081846001015461093d91906111a6565b6109479190611186565b9150505b919050565b6040516001600160a01b0383166024820152604481018290526109b390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610ab7565b505050565b60606109fa83836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610b89565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000610a6287878787610b98565b91509150610a6f81610c85565b5095945050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610ab19085906323b872dd60e01b9060840161097c565b50505050565b6000610b0c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b899092919063ffffffff16565b8051909150156109b35780806020019051810190610b2a919061101a565b6109b35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102c3565b60606105638484600085610e88565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610bcf5750600090506003610c7c565b8460ff16601b14158015610be757508460ff16601c14155b15610bf85750600090506004610c7c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610c4c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c7557600060019250925050610c7c565b9150600090505b94509492505050565b6000816004811115610ca757634e487b7160e01b600052602160045260246000fd5b1415610cb257610633565b6001816004811115610cd457634e487b7160e01b600052602160045260246000fd5b1415610d225760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102c3565b6002816004811115610d4457634e487b7160e01b600052602160045260246000fd5b1415610d925760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102c3565b6003816004811115610db457634e487b7160e01b600052602160045260246000fd5b1415610e0d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102c3565b6004816004811115610e2f57634e487b7160e01b600052602160045260246000fd5b14156106335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102c3565b606082471015610ee95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102c3565b843b610f375760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102c3565b600080866001600160a01b03168587604051610f539190611137565b60006040518083038185875af1925050503d8060008114610f90576040519150601f19603f3d011682016040523d82523d6000602084013e610f95565b606091505b5091509150610fa5828286610fb0565b979650505050505050565b60608315610fbf5750816109fa565b825115610fcf5782518084602001fd5b8160405162461bcd60e51b81526004016102c39190611153565b80356001600160a01b038116811461094b57600080fd5b600060208284031215611011578081fd5b6109fa82610fe9565b60006020828403121561102b578081fd5b815180151581146109fa578182fd5b6000806040838503121561104c578081fd5b50508035926020909101359150565b600080600080600060808688031215611072578081fd5b853594506020860135935061108960408701610fe9565b9250606086013567ffffffffffffffff808211156110a5578283fd5b818801915088601f8301126110b8578283fd5b8135818111156110c6578384fd5b8960208285010111156110d7578384fd5b9699959850939650602001949392505050565b600080600080600060a08688031215611101578081fd5b8535945060208601359350604086013560ff8116811461111f578182fd5b94979396509394606081013594506080013592915050565b600082516111498184602087016111dc565b9190910192915050565b60006020825282518060208401526111728160408501602087016111dc565b601f01601f19169190910160400192915050565b6000826111a157634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156111c0576111c0611208565b500290565b6000828210156111d7576111d7611208565b500390565b60005b838110156111f75781810151838201526020016111df565b83811115610ab15750506000910152565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220635b299671159f0b45e87f8753a5924f704b86986e032ac978b1060f40ee5bdf64736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc000000000000000000000000e9d4afb6f8c9196972c6d9a74d5e54bbb7721f5b0000000000000000000000000903f8892c06a99bf1d68088fab597a0762e0bc80000000000000000000000000000000000000000000000000000000062609e80
-----Decoded View---------------
Arg [0] : _levx (address): 0xf474E526ADe9aD2CC2B66ffCE528B1A51B91FCdC
Arg [1] : _signer (address): 0xE9d4AFB6f8C9196972C6d9a74D5e54bBb7721f5B
Arg [2] : _wallet (address): 0x0903f8892c06A99bf1D68088fAB597a0762e0BC8
Arg [3] : _deadline (uint64): 1650499200
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000f474e526ade9ad2cc2b66ffce528b1a51b91fcdc
Arg [1] : 000000000000000000000000e9d4afb6f8c9196972c6d9a74d5e54bbb7721f5b
Arg [2] : 0000000000000000000000000903f8892c06a99bf1d68088fab597a0762e0bc8
Arg [3] : 0000000000000000000000000000000000000000000000000000000062609e80
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.