@levxdao/airdrop
Version:
[](http://www.wtfpl.net/)
340 lines • 48.7 kB
JSON
{
"address": "0x4a55099386DE9d044E7F0BafD3C341739e4b2096",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "address",
"name": "_levx",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
}
],
"name": "AddMerkleRoot",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"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"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
}
],
"name": "addMerkleRoot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "isValidMerkleRoot",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"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": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "root",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "leaf",
"type": "bytes32"
},
{
"internalType": "bytes32[]",
"name": "proof",
"type": "bytes32[]"
}
],
"name": "verify",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"transactionHash": "0x6afc572a0c96907252dd736c2d36de1bd54fe7fa394de38db472b61d0d0386e0",
"receipt": {
"to": null,
"from": "0x5b8C253517b6Bd003369173109693B01cb6841B5",
"contractAddress": "0x4a55099386DE9d044E7F0BafD3C341739e4b2096",
"transactionIndex": 86,
"gasUsed": "731685",
"logsBloom": "0x00000000000000000100000001000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000008000000000000000000000000000000000000000000000",
"blockHash": "0x6dc35b135ab13535c9097be3d943a98839a8f98a353fb7c2cdf6be27a52e7dec",
"transactionHash": "0x6afc572a0c96907252dd736c2d36de1bd54fe7fa394de38db472b61d0d0386e0",
"logs": [
{
"transactionIndex": 86,
"blockNumber": 13710811,
"transactionHash": "0x6afc572a0c96907252dd736c2d36de1bd54fe7fa394de38db472b61d0d0386e0",
"address": "0x4a55099386DE9d044E7F0BafD3C341739e4b2096",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000005b8c253517b6bd003369173109693b01cb6841b5"
],
"data": "0x",
"logIndex": 96,
"blockHash": "0x6dc35b135ab13535c9097be3d943a98839a8f98a353fb7c2cdf6be27a52e7dec"
},
{
"transactionIndex": 86,
"blockNumber": 13710811,
"transactionHash": "0x6afc572a0c96907252dd736c2d36de1bd54fe7fa394de38db472b61d0d0386e0",
"address": "0x4a55099386DE9d044E7F0BafD3C341739e4b2096",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000005b8c253517b6bd003369173109693b01cb6841b5",
"0x0000000000000000000000005b8c253517b6bd003369173109693b01cb6841b5"
],
"data": "0x",
"logIndex": 97,
"blockHash": "0x6dc35b135ab13535c9097be3d943a98839a8f98a353fb7c2cdf6be27a52e7dec"
}
],
"blockNumber": 13710811,
"cumulativeGasUsed": "4996228",
"status": 1,
"byzantium": true
},
"args": [
"0x5b8C253517b6Bd003369173109693B01cb6841B5",
"0xf474E526ADe9aD2CC2B66ffCE528B1A51B91FCdC"
],
"solcInputHash": "1f423ca3622065542fd188b6151b4da4",
"metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_levx\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"AddMerkleRoot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"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\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"addMerkleRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"merkleProof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isValidMerkleRoot\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"leaf\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LevxAirdrop.sol\":\"LevxAirdrop\"},\"evmVersion\":\"istanbul\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa1b27b3f44ff825974e5268e8f63ad3b03add5b464880d860fbb8cae043e17f7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xc1452b054778f1926419196ef12ae200758a4ee728df69ae1cd13e5c16ca7df7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x671741933530f343f023a40e58e61bc09d62494b96c6f3e39e647f315facd519\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9944d1038f27dcebff810d7ba16b3b8058b967173d76874fb72dd7cd84129656\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x7736c187e6f1358c1ea9350a2a21aa8528dec1c2f43b374a9067465a3a51f5d3\",\"license\":\"MIT\"},\"contracts/LevxAirdrop.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity =0.8.3;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"./MerkleProof.sol\\\";\\n\\ncontract LevxAirdrop is Ownable, MerkleProof {\\n using SafeERC20 for IERC20;\\n\\n address public immutable levx;\\n mapping(bytes32 => bool) public isValidMerkleRoot;\\n mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed;\\n\\n event AddMerkleRoot(bytes32 indexed merkleRoot);\\n event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount);\\n\\n constructor(address _owner, address _levx) {\\n levx = _levx;\\n _transferOwnership(_owner);\\n }\\n\\n function addMerkleRoot(bytes32 merkleRoot) external onlyOwner {\\n require(!isValidMerkleRoot[merkleRoot], \\\"SHOYU: DUPLICATE_ROOT\\\");\\n isValidMerkleRoot[merkleRoot] = true;\\n\\n emit AddMerkleRoot(merkleRoot);\\n }\\n\\n function claim(\\n bytes32 merkleRoot,\\n bytes32[] calldata merkleProof,\\n uint256 amount\\n ) external {\\n require(isValidMerkleRoot[merkleRoot], \\\"SHOYU: INVALID_ROOT\\\");\\n\\n bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount));\\n require(!_hasClaimed[merkleRoot][leaf], \\\"SHOYU: FORBIDDEN\\\");\\n require(verify(merkleRoot, leaf, merkleProof), \\\"SHOYU: INVALID_PROOF\\\");\\n\\n _hasClaimed[merkleRoot][leaf] = true;\\n IERC20(levx).safeTransferFrom(owner(), msg.sender, amount);\\n\\n emit Claim(merkleRoot, msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9f0f480dff1c4c418d18cf545f6acbc5ad81af43863afe8fef264838c92f8ffa\",\"license\":\"UNLICENSED\"},\"contracts/MerkleProof.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity =0.8.3;\\n\\ncontract MerkleProof {\\n function verify(\\n bytes32 root,\\n bytes32 leaf,\\n bytes32[] memory proof\\n ) public pure returns (bool) {\\n bytes32 computedHash = leaf;\\n\\n for (uint256 i = 0; i < proof.length; i++) {\\n bytes32 proofElement = proof[i];\\n\\n if (computedHash < proofElement) {\\n // Hash(current computed hash + current element of the proof)\\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\\n } else {\\n // Hash(current element of the proof + current computed hash)\\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\\n }\\n }\\n\\n // Check if the computed hash (root) is equal to the provided root\\n return computedHash == root;\\n }\\n}\\n\",\"keccak256\":\"0xa2580b5332ea27ce626df7151b099d63c8136644814c475307be8a884984b58c\",\"license\":\"UNLICENSED\"}},\"version\":1}",
"bytecode": "0x60a060405234801561001057600080fd5b50604051610cd7380380610cd783398101604081905261002f916100c6565b6100383361005a565b6001600160601b0319606082901b166080526100538261005a565b50506100f8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100c157600080fd5b919050565b600080604083850312156100d8578182fd5b6100e1836100aa565b91506100ef602084016100aa565b90509250929050565b60805160601c610bbb61011c6000396000818160cf01526104e40152610bbb6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806389331e821161005b57806389331e82146101115780638da5cb5b14610124578063e9cd3b3714610135578063f2fde38b1461015857610088565b80633323c8071461008d5780633423e548146100a257806362df3472146100ca578063715018a614610109575b600080fd5b6100a061009b36600461092b565b61016b565b005b6100b56100b03660046109c3565b61023b565b60405190151581526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b6100a06102fb565b6100a061011f366004610943565b610331565b6000546001600160a01b03166100f1565b6100b561014336600461092b565b60016020526000908152604090205460ff1681565b6100a06101663660046108e4565b61054a565b6000546001600160a01b0316331461019e5760405162461bcd60e51b815260040161019590610ae7565b60405180910390fd5b60008181526001602052604090205460ff16156101f55760405162461bcd60e51b815260206004820152601560248201527414d213d6554e88111554131250d0551157d493d3d5605a1b6044820152606401610195565b6000818152600160208190526040808320805460ff19169092179091555182917f8335f1ab0fe93a301747e8c2784fbbb5dc7bd3556e84e498c9c9aeac306d5df991a250565b600082815b83518110156102ee57600084828151811061026b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808310156102ae5760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506102db565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806102e681610b48565b915050610240565b50841490505b9392505050565b6000546001600160a01b031633146103255760405162461bcd60e51b815260040161019590610ae7565b61032f60006105e5565b565b60008481526001602052604090205460ff166103855760405162461bcd60e51b815260206004820152601360248201527214d213d6554e881253959053125117d493d3d5606a1b6044820152606401610195565b6040516bffffffffffffffffffffffff193360601b1660208201526034810182905260009060540160408051601f19818403018152918152815160209283012060008881526002845282812082825290935291205490915060ff16156104205760405162461bcd60e51b815260206004820152601060248201526f29a427acaa9d102327a92124a22222a760811b6044820152606401610195565b61045e858286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061023b92505050565b6104a15760405162461bcd60e51b815260206004820152601460248201527329a427acaa9d1024a72b20a624a22fa82927a7a360611b6044820152606401610195565b60008581526002602090815260408083208484529091529020805460ff1916600117905561050c6104da6000546001600160a01b031690565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903385610635565b604051828152339086907f46e470efd1d5601791612d2263f0a4437104a35be37a932cdc59dfe948c8dfbc9060200160405180910390a35050505050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260040161019590610ae7565b6001600160a01b0381166105d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610195565b6105e2816105e5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261068f908590610695565b50505050565b60006106ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661076c9092919063ffffffff16565b8051909150156107675780806020019051810190610708919061090b565b6107675760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610195565b505050565b606061077b8484600085610783565b949350505050565b6060824710156107e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610195565b843b6108325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610195565b600080866001600160a01b0316858760405161084e9190610a98565b60006040518083038185875af1925050503d806000811461088b576040519150601f19603f3d011682016040523d82523d6000602084013e610890565b606091505b50915091506108a08282866108ab565b979650505050505050565b606083156108ba5750816102f4565b8251156108ca5782518084602001fd5b8160405162461bcd60e51b81526004016101959190610ab4565b6000602082840312156108f5578081fd5b81356001600160a01b03811681146102f4578182fd5b60006020828403121561091c578081fd5b815180151581146102f4578182fd5b60006020828403121561093c578081fd5b5035919050565b60008060008060608587031215610958578283fd5b84359350602085013567ffffffffffffffff80821115610976578485fd5b818701915087601f830112610989578485fd5b813581811115610997578586fd5b8860208260051b85010111156109ab578586fd5b95986020929092019750949560400135945092505050565b6000806000606084860312156109d7578283fd5b833592506020808501359250604085013567ffffffffffffffff808211156109fd578384fd5b818701915087601f830112610a10578384fd5b813581811115610a2257610a22610b6f565b8060051b604051601f19603f83011681018181108582111715610a4757610a47610b6f565b604052828152858101935084860182860187018c1015610a65578788fd5b8795505b83861015610a87578035855260019590950194938601938601610a69565b508096505050505050509250925092565b60008251610aaa818460208701610b1c565b9190910192915050565b6000602082528251806020840152610ad3816040850160208701610b1c565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b83811015610b37578181015183820152602001610b1f565b8381111561068f5750506000910152565b6000600019821415610b6857634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220918da4d5ab063f1708cab34e65402af9e822738b4c4e4760976e5635d43ed52e64736f6c63430008030033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806389331e821161005b57806389331e82146101115780638da5cb5b14610124578063e9cd3b3714610135578063f2fde38b1461015857610088565b80633323c8071461008d5780633423e548146100a257806362df3472146100ca578063715018a614610109575b600080fd5b6100a061009b36600461092b565b61016b565b005b6100b56100b03660046109c3565b61023b565b60405190151581526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b6100a06102fb565b6100a061011f366004610943565b610331565b6000546001600160a01b03166100f1565b6100b561014336600461092b565b60016020526000908152604090205460ff1681565b6100a06101663660046108e4565b61054a565b6000546001600160a01b0316331461019e5760405162461bcd60e51b815260040161019590610ae7565b60405180910390fd5b60008181526001602052604090205460ff16156101f55760405162461bcd60e51b815260206004820152601560248201527414d213d6554e88111554131250d0551157d493d3d5605a1b6044820152606401610195565b6000818152600160208190526040808320805460ff19169092179091555182917f8335f1ab0fe93a301747e8c2784fbbb5dc7bd3556e84e498c9c9aeac306d5df991a250565b600082815b83518110156102ee57600084828151811061026b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808310156102ae5760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506102db565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806102e681610b48565b915050610240565b50841490505b9392505050565b6000546001600160a01b031633146103255760405162461bcd60e51b815260040161019590610ae7565b61032f60006105e5565b565b60008481526001602052604090205460ff166103855760405162461bcd60e51b815260206004820152601360248201527214d213d6554e881253959053125117d493d3d5606a1b6044820152606401610195565b6040516bffffffffffffffffffffffff193360601b1660208201526034810182905260009060540160408051601f19818403018152918152815160209283012060008881526002845282812082825290935291205490915060ff16156104205760405162461bcd60e51b815260206004820152601060248201526f29a427acaa9d102327a92124a22222a760811b6044820152606401610195565b61045e858286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061023b92505050565b6104a15760405162461bcd60e51b815260206004820152601460248201527329a427acaa9d1024a72b20a624a22fa82927a7a360611b6044820152606401610195565b60008581526002602090815260408083208484529091529020805460ff1916600117905561050c6104da6000546001600160a01b031690565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903385610635565b604051828152339086907f46e470efd1d5601791612d2263f0a4437104a35be37a932cdc59dfe948c8dfbc9060200160405180910390a35050505050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260040161019590610ae7565b6001600160a01b0381166105d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610195565b6105e2816105e5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261068f908590610695565b50505050565b60006106ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661076c9092919063ffffffff16565b8051909150156107675780806020019051810190610708919061090b565b6107675760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610195565b505050565b606061077b8484600085610783565b949350505050565b6060824710156107e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610195565b843b6108325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610195565b600080866001600160a01b0316858760405161084e9190610a98565b60006040518083038185875af1925050503d806000811461088b576040519150601f19603f3d011682016040523d82523d6000602084013e610890565b606091505b50915091506108a08282866108ab565b979650505050505050565b606083156108ba5750816102f4565b8251156108ca5782518084602001fd5b8160405162461bcd60e51b81526004016101959190610ab4565b6000602082840312156108f5578081fd5b81356001600160a01b03811681146102f4578182fd5b60006020828403121561091c578081fd5b815180151581146102f4578182fd5b60006020828403121561093c578081fd5b5035919050565b60008060008060608587031215610958578283fd5b84359350602085013567ffffffffffffffff80821115610976578485fd5b818701915087601f830112610989578485fd5b813581811115610997578586fd5b8860208260051b85010111156109ab578586fd5b95986020929092019750949560400135945092505050565b6000806000606084860312156109d7578283fd5b833592506020808501359250604085013567ffffffffffffffff808211156109fd578384fd5b818701915087601f830112610a10578384fd5b813581811115610a2257610a22610b6f565b8060051b604051601f19603f83011681018181108582111715610a4757610a47610b6f565b604052828152858101935084860182860187018c1015610a65578788fd5b8795505b83861015610a87578035855260019590950194938601938601610a69565b508096505050505050509250925092565b60008251610aaa818460208701610b1c565b9190910192915050565b6000602082528251806020840152610ad3816040850160208701610b1c565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b83811015610b37578181015183820152602001610b1f565b8381111561068f5750506000910152565b6000600019821415610b6857634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220918da4d5ab063f1708cab34e65402af9e822738b4c4e4760976e5635d43ed52e64736f6c63430008030033",
"devdoc": {
"kind": "dev",
"methods": {
"owner()": {
"details": "Returns the address of the current owner."
},
"renounceOwnership()": {
"details": "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."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 7,
"contract": "contracts/LevxAirdrop.sol:LevxAirdrop",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 745,
"contract": "contracts/LevxAirdrop.sol:LevxAirdrop",
"label": "isValidMerkleRoot",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_bool)"
},
{
"astId": 751,
"contract": "contracts/LevxAirdrop.sol:LevxAirdrop",
"label": "_hasClaimed",
"offset": 0,
"slot": "2",
"type": "t_mapping(t_bytes32,t_mapping(t_bytes32,t_bool))"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_bool)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_bytes32,t_mapping(t_bytes32,t_bool))": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => mapping(bytes32 => bool))",
"numberOfBytes": "32",
"value": "t_mapping(t_bytes32,t_bool)"
}
}
}
}