From c539b0818c8d8fc54a0cb6750b92c0de3563c750 Mon Sep 17 00:00:00 2001 From: Noy <59097122+noyyyy@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:34:49 +0800 Subject: [PATCH] chore: deploy erc20 distributor --- .../linea/003_deploy_ERC20Distributor.ts | 28 + .../deployments/linea/ERC20Distributor.json | 529 ++++++++++++++++++ packages/dev/hardhat.config.ts | 9 +- 3 files changed, 561 insertions(+), 5 deletions(-) create mode 100644 packages/dev/deploy/linea/003_deploy_ERC20Distributor.ts create mode 100644 packages/dev/deployments/linea/ERC20Distributor.json diff --git a/packages/dev/deploy/linea/003_deploy_ERC20Distributor.ts b/packages/dev/deploy/linea/003_deploy_ERC20Distributor.ts new file mode 100644 index 0000000..e722387 --- /dev/null +++ b/packages/dev/deploy/linea/003_deploy_ERC20Distributor.ts @@ -0,0 +1,28 @@ +import { DeployFunction } from 'hardhat-deploy/types'; + +const func: DeployFunction = async function ({ deployments, getNamedAccounts }) { + const { deploy, execute } = deployments; + + const { prodDeployer } = await getNamedAccounts(); + + await deploy('ERC20Distributor', { + from: prodDeployer, + // USDC on linea + // https://lineascan.build/address/0x176211869ca2b568f2a7d4ee941e073a821ee1ff + args: [prodDeployer, '0x176211869ca2b568f2a7d4ee941e073a821ee1ff'], + log: true, + }); + + await execute( + 'ERC20Distributor', + { from: prodDeployer, log: true }, + 'setMerkleRoot', + '0x12cd0132016024cd4f350d9aabb515293431327ad6e5e1dcd7064ccc6a4e6d3c', + ); + + await execute('ERC20Distributor', { from: prodDeployer, log: true }, 'setClaimPeriodEnds', 1698681600); +}; + +func.tags = ['ERC20Distributor']; + +export default func; diff --git a/packages/dev/deployments/linea/ERC20Distributor.json b/packages/dev/deployments/linea/ERC20Distributor.json new file mode 100644 index 0000000..a591aca --- /dev/null +++ b/packages/dev/deployments/linea/ERC20Distributor.json @@ -0,0 +1,529 @@ +{ + "address": "0x69369927AEA310b0423F475330A6Cc7302e2d060", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "rewardToken_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyClaimed", + "type": "error" + }, + { + "inputs": [], + "name": "ClaimPeriodNotStartOrEnd", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressSet", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroRootSet", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "claimant", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "claimPeriodEnds", + "type": "uint256" + } + ], + "name": "ClaimPeriodEndsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + } + ], + "name": "MerkleRootChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "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": false, + "internalType": "address", + "name": "dest", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimPeriodEnds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "claimTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "isClaimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "merkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimPeriodEnds_", + "type": "uint256" + } + ], + "name": "setClaimPeriodEnds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "newMerkleRoot", + "type": "bytes32" + } + ], + "name": "setMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x9ba85ddefd96454a48a1300aad32d11092d921118524807aa919f6afe5a90ce2", + "receipt": { + "to": null, + "from": "0xBa1d495D8cfcad60d56442F1f1a9917ddE0e3231", + "contractAddress": "0x69369927AEA310b0423F475330A6Cc7302e2d060", + "transactionIndex": 8, + "gasUsed": "967794", + "logsBloom": "0x00000000400000000000000000000000000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000008000000000000000000000000000000001000000000000014000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x805c3b83a3459a63e2ec1eff4da6e353950df5974c2061a5d3b3601c4099b94c", + "transactionHash": "0x9ba85ddefd96454a48a1300aad32d11092d921118524807aa919f6afe5a90ce2", + "logs": [ + { + "transactionIndex": 8, + "blockNumber": 622770, + "transactionHash": "0x9ba85ddefd96454a48a1300aad32d11092d921118524807aa919f6afe5a90ce2", + "address": "0x69369927AEA310b0423F475330A6Cc7302e2d060", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000ba1d495d8cfcad60d56442f1f1a9917dde0e3231" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0x805c3b83a3459a63e2ec1eff4da6e353950df5974c2061a5d3b3601c4099b94c" + }, + { + "transactionIndex": 8, + "blockNumber": 622770, + "transactionHash": "0x9ba85ddefd96454a48a1300aad32d11092d921118524807aa919f6afe5a90ce2", + "address": "0x69369927AEA310b0423F475330A6Cc7302e2d060", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000ba1d495d8cfcad60d56442f1f1a9917dde0e3231", + "0x000000000000000000000000ba1d495d8cfcad60d56442f1f1a9917dde0e3231" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0x805c3b83a3459a63e2ec1eff4da6e353950df5974c2061a5d3b3601c4099b94c" + } + ], + "blockNumber": 622770, + "cumulativeGasUsed": "1686504", + "status": 1, + "byzantium": true + }, + "args": [ + "0xBa1d495D8cfcad60d56442F1f1a9917ddE0e3231", + "0x176211869ca2b568f2a7d4ee941e073a821ee1ff" + ], + "numDeployments": 1, + "solcInputHash": "ccbbecda311cd73eb95369b7cc05f5ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"rewardToken_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimPeriodNotStartOrEnd\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRootSet\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claimPeriodEnds\",\"type\":\"uint256\"}],\"name\":\"ClaimPeriodEndsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"name\":\"MerkleRootChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"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\":false,\"internalType\":\"address\",\"name\":\"dest\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimPeriodEnds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merkleProof\",\"type\":\"bytes32[]\"}],\"name\":\"claimTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"isClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimPeriodEnds_\",\"type\":\"uint256\"}],\"name\":\"setClaimPeriodEnds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"newMerkleRoot\",\"type\":\"bytes32\"}],\"name\":\"setMerkleRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"claimTokens(uint256,bytes32[])\":{\"details\":\"Claims airdropped tokens.\",\"params\":{\"amount\":\"The amount of the claim being made.\",\"merkleProof\":\"A merkle proof proving the claim is valid.\"}},\"isClaimed(address)\":{\"details\":\"Returns true if the claim at the given index in the merkle tree has already been made.\",\"params\":{\"user\":\"The index into the merkle tree.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setClaimPeriodEnds(uint256)\":{\"details\":\"Sets the claim period ends.\",\"params\":{\"claimPeriodEnds_\":\"The merkle root to set.\"}},\"setMerkleRoot(bytes32)\":{\"details\":\"Sets the merkle root.\",\"params\":{\"newMerkleRoot\":\"The merkle root to set.\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"withdraw(address)\":{\"details\":\"withdraw remaining native tokens.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"setMerkleRoot(bytes32)\":{\"notice\":\"allow set twice here\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arcana/v1/ERC20Distributor.sol\":\"ERC20Distributor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":contracts/=contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":foundry-upgrades/=lib/foundry-upgrades/src/\",\":solady/=lib/solady/src/\",\":src/=src/\"]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable2Step.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Ownable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides 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} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2Step is Ownable {\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n}\\n\",\"keccak256\":\"0xde231558366826d7cb61725af8147965a61c53b77a352cc8c9af38fc5a92ac3c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\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 * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\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 cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \\\"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (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\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/MerkleProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev These functions deal with verification of Merkle Tree proofs.\\n *\\n * The tree and the proofs can be generated using our\\n * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\\n * You will find a quickstart guide in the readme.\\n *\\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\\n * hashing, or use a hash function other than keccak256 for hashing leaves.\\n * This is because the concatenation of a sorted pair of internal nodes in\\n * the merkle tree could be reinterpreted as a leaf value.\\n * OpenZeppelin's JavaScript library generates merkle trees that are safe\\n * against this attack out of the box.\\n */\\nlibrary MerkleProof {\\n /**\\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\\n * defined by `root`. For this, a `proof` must be provided, containing\\n * sibling hashes on the branch from the leaf to the root of the tree. Each\\n * pair of leaves and each pair of pre-images are assumed to be sorted.\\n */\\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\\n return processProof(proof, leaf) == root;\\n }\\n\\n /**\\n * @dev Calldata version of {verify}\\n *\\n * _Available since v4.7._\\n */\\n function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\\n return processProofCalldata(proof, leaf) == root;\\n }\\n\\n /**\\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\\n * hash matches the root of the tree. When processing the proof, the pairs\\n * of leafs & pre-images are assumed to be sorted.\\n *\\n * _Available since v4.4._\\n */\\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\\n bytes32 computedHash = leaf;\\n for (uint256 i = 0; i < proof.length; i++) {\\n computedHash = _hashPair(computedHash, proof[i]);\\n }\\n return computedHash;\\n }\\n\\n /**\\n * @dev Calldata version of {processProof}\\n *\\n * _Available since v4.7._\\n */\\n function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {\\n bytes32 computedHash = leaf;\\n for (uint256 i = 0; i < proof.length; i++) {\\n computedHash = _hashPair(computedHash, proof[i]);\\n }\\n return computedHash;\\n }\\n\\n /**\\n * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by\\n * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.\\n *\\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\\n *\\n * _Available since v4.7._\\n */\\n function multiProofVerify(\\n bytes32[] memory proof,\\n bool[] memory proofFlags,\\n bytes32 root,\\n bytes32[] memory leaves\\n ) internal pure returns (bool) {\\n return processMultiProof(proof, proofFlags, leaves) == root;\\n }\\n\\n /**\\n * @dev Calldata version of {multiProofVerify}\\n *\\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\\n *\\n * _Available since v4.7._\\n */\\n function multiProofVerifyCalldata(\\n bytes32[] calldata proof,\\n bool[] calldata proofFlags,\\n bytes32 root,\\n bytes32[] memory leaves\\n ) internal pure returns (bool) {\\n return processMultiProofCalldata(proof, proofFlags, leaves) == root;\\n }\\n\\n /**\\n * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction\\n * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another\\n * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false\\n * respectively.\\n *\\n * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree\\n * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the\\n * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).\\n *\\n * _Available since v4.7._\\n */\\n function processMultiProof(\\n bytes32[] memory proof,\\n bool[] memory proofFlags,\\n bytes32[] memory leaves\\n ) internal pure returns (bytes32 merkleRoot) {\\n // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by\\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\\n // the merkle tree.\\n uint256 leavesLen = leaves.length;\\n uint256 proofLen = proof.length;\\n uint256 totalHashes = proofFlags.length;\\n\\n // Check proof validity.\\n require(leavesLen + proofLen - 1 == totalHashes, \\\"MerkleProof: invalid multiproof\\\");\\n\\n // The xxxPos values are \\\"pointers\\\" to the next value to consume in each array. All accesses are done using\\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \\\"pop\\\".\\n bytes32[] memory hashes = new bytes32[](totalHashes);\\n uint256 leafPos = 0;\\n uint256 hashPos = 0;\\n uint256 proofPos = 0;\\n // At each step, we compute the next hash using two values:\\n // - a value from the \\\"main queue\\\". If not all leaves have been consumed, we get the next leaf, otherwise we\\n // get the next hash.\\n // - depending on the flag, either another value from the \\\"main queue\\\" (merging branches) or an element from the\\n // `proof` array.\\n for (uint256 i = 0; i < totalHashes; i++) {\\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\\n bytes32 b = proofFlags[i]\\n ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])\\n : proof[proofPos++];\\n hashes[i] = _hashPair(a, b);\\n }\\n\\n if (totalHashes > 0) {\\n require(proofPos == proofLen, \\\"MerkleProof: invalid multiproof\\\");\\n unchecked {\\n return hashes[totalHashes - 1];\\n }\\n } else if (leavesLen > 0) {\\n return leaves[0];\\n } else {\\n return proof[0];\\n }\\n }\\n\\n /**\\n * @dev Calldata version of {processMultiProof}.\\n *\\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\\n *\\n * _Available since v4.7._\\n */\\n function processMultiProofCalldata(\\n bytes32[] calldata proof,\\n bool[] calldata proofFlags,\\n bytes32[] memory leaves\\n ) internal pure returns (bytes32 merkleRoot) {\\n // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by\\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\\n // the merkle tree.\\n uint256 leavesLen = leaves.length;\\n uint256 proofLen = proof.length;\\n uint256 totalHashes = proofFlags.length;\\n\\n // Check proof validity.\\n require(leavesLen + proofLen - 1 == totalHashes, \\\"MerkleProof: invalid multiproof\\\");\\n\\n // The xxxPos values are \\\"pointers\\\" to the next value to consume in each array. All accesses are done using\\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \\\"pop\\\".\\n bytes32[] memory hashes = new bytes32[](totalHashes);\\n uint256 leafPos = 0;\\n uint256 hashPos = 0;\\n uint256 proofPos = 0;\\n // At each step, we compute the next hash using two values:\\n // - a value from the \\\"main queue\\\". If not all leaves have been consumed, we get the next leaf, otherwise we\\n // get the next hash.\\n // - depending on the flag, either another value from the \\\"main queue\\\" (merging branches) or an element from the\\n // `proof` array.\\n for (uint256 i = 0; i < totalHashes; i++) {\\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\\n bytes32 b = proofFlags[i]\\n ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])\\n : proof[proofPos++];\\n hashes[i] = _hashPair(a, b);\\n }\\n\\n if (totalHashes > 0) {\\n require(proofPos == proofLen, \\\"MerkleProof: invalid multiproof\\\");\\n unchecked {\\n return hashes[totalHashes - 1];\\n }\\n } else if (leavesLen > 0) {\\n return leaves[0];\\n } else {\\n return proof[0];\\n }\\n }\\n\\n function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {\\n return a < b ? _efficientHash(a, b) : _efficientHash(b, a);\\n }\\n\\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, a)\\n mstore(0x20, b)\\n value := keccak256(0x00, 0x40)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcf688741f79f4838d5301dcf72d0af9eff11bbab6ab0bb112ad144c7fb672dac\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/BitMaps.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.\\n * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].\\n */\\nlibrary BitMaps {\\n struct BitMap {\\n mapping(uint256 => uint256) _data;\\n }\\n\\n /**\\n * @dev Returns whether the bit at `index` is set.\\n */\\n function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n return bitmap._data[bucket] & mask != 0;\\n }\\n\\n /**\\n * @dev Sets the bit at `index` to the boolean `value`.\\n */\\n function setTo(BitMap storage bitmap, uint256 index, bool value) internal {\\n if (value) {\\n set(bitmap, index);\\n } else {\\n unset(bitmap, index);\\n }\\n }\\n\\n /**\\n * @dev Sets the bit at `index`.\\n */\\n function set(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] |= mask;\\n }\\n\\n /**\\n * @dev Unsets the bit at `index`.\\n */\\n function unset(BitMap storage bitmap, uint256 index) internal {\\n uint256 bucket = index >> 8;\\n uint256 mask = 1 << (index & 0xff);\\n bitmap._data[bucket] &= ~mask;\\n }\\n}\\n\",\"keccak256\":\"0xac946730f979a447732a5bed58aa30c995ae666c3e1663b312ab5fd11dbe3eb6\",\"license\":\"MIT\"},\"src/arcana/v1/ERC20Distributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {MerkleProof} from \\\"@openzeppelin/contracts/utils/cryptography/MerkleProof.sol\\\";\\nimport {BitMaps} from \\\"@openzeppelin/contracts/utils/structs/BitMaps.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {Ownable2Step} from \\\"@openzeppelin/contracts/access/Ownable2Step.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {IERC20Distributor} from \\\"src/arcana/v1/interfaces/IERC20Distributor.sol\\\";\\n\\ncontract ERC20Distributor is IERC20Distributor, Ownable2Step {\\n using BitMaps for BitMaps.BitMap;\\n using SafeERC20 for IERC20;\\n\\n IERC20 public rewardToken;\\n bytes32 public merkleRoot;\\n uint256 public claimPeriodEnds;\\n BitMaps.BitMap private claimed;\\n\\n constructor(address owner_, IERC20 rewardToken_) {\\n _transferOwnership(owner_);\\n rewardToken = rewardToken_;\\n }\\n\\n /**\\n * @dev Claims airdropped tokens.\\n * @param amount The amount of the claim being made.\\n * @param merkleProof A merkle proof proving the claim is valid.\\n */\\n function claimTokens(\\n uint256 amount,\\n bytes32[] calldata merkleProof\\n ) external {\\n if (block.timestamp >= claimPeriodEnds) {\\n revert ClaimPeriodNotStartOrEnd();\\n }\\n\\n bytes32 leaf = keccak256(\\n bytes.concat(keccak256(abi.encode(msg.sender, amount)))\\n );\\n bool valid = MerkleProof.verify(merkleProof, merkleRoot, leaf);\\n\\n if (!valid) {\\n revert InvalidProof();\\n }\\n if (isClaimed(_msgSender())) {\\n revert AlreadyClaimed();\\n }\\n\\n claimed.set(uint160(_msgSender()));\\n rewardToken.safeTransfer(_msgSender(),amount);\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * @dev Returns true if the claim at the given index in the merkle tree has already been made.\\n * @param user The index into the merkle tree.\\n */\\n function isClaimed(address user) public view returns (bool) {\\n return claimed.get(uint256(uint160(user)));\\n }\\n\\n /**\\n * @dev Sets the merkle root.\\n * @notice allow set twice here\\n * @param newMerkleRoot The merkle root to set.\\n */\\n function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner {\\n if (newMerkleRoot == bytes32(0)) {\\n revert ZeroRootSet();\\n }\\n merkleRoot = newMerkleRoot;\\n emit MerkleRootChanged(merkleRoot);\\n }\\n\\n /**\\n * @dev Sets the claim period ends.\\n * @param claimPeriodEnds_ The merkle root to set.\\n */\\n function setClaimPeriodEnds(uint256 claimPeriodEnds_) external onlyOwner {\\n if (claimPeriodEnds_ <= block.timestamp) {\\n revert InvalidTimestamp();\\n }\\n claimPeriodEnds = claimPeriodEnds_;\\n emit ClaimPeriodEndsChanged(claimPeriodEnds);\\n }\\n\\n /**\\n * @dev withdraw remaining native tokens.\\n */\\n function withdraw(address to) external onlyOwner {\\n uint256 balance = rewardToken.balanceOf(address(this));\\n rewardToken.safeTransfer(to,balance);\\n emit Withdrawn(to, balance);\\n }\\n\\n}\\n\",\"keccak256\":\"0xc2cdf2eb55ce0216df7af5444e3f3452d707324804c0cf315da415c39297ca7f\",\"license\":\"GPL-3.0\"},\"src/arcana/v1/interfaces/IERC20Distributor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity 0.8.19;\\n\\ninterface IERC20DistributorDef {\\n error ZeroAddressSet();\\n error ClaimPeriodNotStartOrEnd();\\n error InvalidProof();\\n error AlreadyClaimed();\\n error ZeroRootSet();\\n error InvalidTimestamp();\\n\\n event Claim(address indexed claimant, uint256 amount);\\n\\n event MerkleRootChanged(bytes32 merkleRoot);\\n event ClaimPeriodEndsChanged(uint256 claimPeriodEnds);\\n event Withdrawn(address dest, uint256 amount);\\n\\n}\\n\\ninterface IERC20Distributor is IERC20DistributorDef {}\\n\",\"keccak256\":\"0xccb8b4701b2ee80953a72580bf4e48ae96a6b158a8415180476c67ecce83af98\",\"license\":\"GPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620010eb380380620010eb8339810160408190526200003491620000f5565b6200003f3362000071565b6200004a8262000071565b600280546001600160a01b0319166001600160a01b03929092169190911790555062000134565b600180546001600160a01b03191690556200008c816200008f565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200008c57600080fd5b600080604083850312156200010957600080fd5b82516200011681620000df565b60208401519092506200012981620000df565b809150509250929050565b610fa780620001446000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80637cb647591161008c5780639a114cb2116100665780639a114cb2146101ea578063e30c3978146101fd578063f2fde38b1461021b578063f7c618c11461022e57600080fd5b80637cb64759146101415780638cc08025146101545780638da5cb5b146101ab57600080fd5b806366deac47116100bd57806366deac4714610128578063715018a61461013157806379ba50971461013957600080fd5b80632503c057146100e45780632eb4a7ab146100f957806351cff8d914610115575b600080fd5b6100f76100f2366004610d72565b61024e565b005b61010260035481565b6040519081526020015b60405180910390f35b6100f7610123366004610d8b565b6102cb565b61010260045481565b6100f76103e0565b6100f76103f4565b6100f761014f366004610d72565b6104ae565b61019b610162366004610d8b565b72ffffffffffffffffffffffffffffffffffffff600882901c16600090815260056020526040812054600160ff84161b16151592915050565b604051901515815260200161010c565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010c565b6100f76101f8366004610dc1565b610522565b60015473ffffffffffffffffffffffffffffffffffffffff166101c5565b6100f7610229366004610d8b565b610756565b6002546101c59073ffffffffffffffffffffffffffffffffffffffff1681565b610256610806565b42811161028f576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048190556040518181527f15671967934582a50a78abf9731094ac6d395d1f9a63f2f4675748b1b121882b906020015b60405180910390a150565b6102d3610806565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103669190610e40565b60025490915061038d9073ffffffffffffffffffffffffffffffffffffffff168383610887565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5910160405180910390a15050565b6103e8610806565b6103f26000610919565b565b600154339073ffffffffffffffffffffffffffffffffffffffff1681146104a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104ab81610919565b50565b6104b6610806565b806104ed576040517f9efc87ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60038190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c906020016102c0565b600454421061055d576040517f622e516700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051336020820152908101849052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015201604051602081830303815290604052805190602001209050600061060984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600354915085905061094a565b905080610642576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61067f3372ffffffffffffffffffffffffffffffffffffff600882901c16600090815260056020526040812054600160ff84161b16151592915050565b156106b6576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106f63372ffffffffffffffffffffffffffffffffffffff600882901c1660009081526005602052604090208054600160ff9093169290921b9091179055565b61071a3360025473ffffffffffffffffffffffffffffffffffffffff169087610887565b60405185815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a25050505050565b61075e610806565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556107c160005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610499565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610914908490610960565b505050565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556104ab81610a6f565b6000826109578584610ae4565b14949350505050565b60006109c2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610b319092919063ffffffff16565b90508051600014806109e35750808060200190518101906109e39190610e59565b610914576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610499565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b8451811015610b2957610b1582868381518110610b0857610b08610e7b565b6020026020010151610b48565b915080610b2181610eaa565b915050610ae9565b509392505050565b6060610b408484600085610b7a565b949350505050565b6000818310610b64576000828152602084905260409020610b73565b60008381526020839052604090205b9392505050565b606082471015610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610499565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c359190610f2d565b60006040518083038185875af1925050503d8060008114610c72576040519150601f19603f3d011682016040523d82523d6000602084013e610c77565b606091505b5091509150610c8887838387610c93565b979650505050505050565b60608315610d29578251600003610d225773ffffffffffffffffffffffffffffffffffffffff85163b610d22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610499565b5081610b40565b610b408383815115610d3e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104999190610f49565b600060208284031215610d8457600080fd5b5035919050565b600060208284031215610d9d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b7357600080fd5b600080600060408486031215610dd657600080fd5b83359250602084013567ffffffffffffffff80821115610df557600080fd5b818601915086601f830112610e0957600080fd5b813581811115610e1857600080fd5b8760208260051b8501011115610e2d57600080fd5b6020830194508093505050509250925092565b600060208284031215610e5257600080fd5b5051919050565b600060208284031215610e6b57600080fd5b81518015158114610b7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610f02577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60005b83811015610f24578181015183820152602001610f0c565b50506000910152565b60008251610f3f818460208701610f09565b9190910192915050565b6020815260008251806020840152610f68816040850160208701610f09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000813000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80637cb647591161008c5780639a114cb2116100665780639a114cb2146101ea578063e30c3978146101fd578063f2fde38b1461021b578063f7c618c11461022e57600080fd5b80637cb64759146101415780638cc08025146101545780638da5cb5b146101ab57600080fd5b806366deac47116100bd57806366deac4714610128578063715018a61461013157806379ba50971461013957600080fd5b80632503c057146100e45780632eb4a7ab146100f957806351cff8d914610115575b600080fd5b6100f76100f2366004610d72565b61024e565b005b61010260035481565b6040519081526020015b60405180910390f35b6100f7610123366004610d8b565b6102cb565b61010260045481565b6100f76103e0565b6100f76103f4565b6100f761014f366004610d72565b6104ae565b61019b610162366004610d8b565b72ffffffffffffffffffffffffffffffffffffff600882901c16600090815260056020526040812054600160ff84161b16151592915050565b604051901515815260200161010c565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010c565b6100f76101f8366004610dc1565b610522565b60015473ffffffffffffffffffffffffffffffffffffffff166101c5565b6100f7610229366004610d8b565b610756565b6002546101c59073ffffffffffffffffffffffffffffffffffffffff1681565b610256610806565b42811161028f576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048190556040518181527f15671967934582a50a78abf9731094ac6d395d1f9a63f2f4675748b1b121882b906020015b60405180910390a150565b6102d3610806565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103669190610e40565b60025490915061038d9073ffffffffffffffffffffffffffffffffffffffff168383610887565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5910160405180910390a15050565b6103e8610806565b6103f26000610919565b565b600154339073ffffffffffffffffffffffffffffffffffffffff1681146104a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104ab81610919565b50565b6104b6610806565b806104ed576040517f9efc87ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60038190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c906020016102c0565b600454421061055d576040517f622e516700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051336020820152908101849052600090606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015201604051602081830303815290604052805190602001209050600061060984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600354915085905061094a565b905080610642576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61067f3372ffffffffffffffffffffffffffffffffffffff600882901c16600090815260056020526040812054600160ff84161b16151592915050565b156106b6576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106f63372ffffffffffffffffffffffffffffffffffffff600882901c1660009081526005602052604090208054600160ff9093169290921b9091179055565b61071a3360025473ffffffffffffffffffffffffffffffffffffffff169087610887565b60405185815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a25050505050565b61075e610806565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556107c160005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610499565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610914908490610960565b505050565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556104ab81610a6f565b6000826109578584610ae4565b14949350505050565b60006109c2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610b319092919063ffffffff16565b90508051600014806109e35750808060200190518101906109e39190610e59565b610914576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610499565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b8451811015610b2957610b1582868381518110610b0857610b08610e7b565b6020026020010151610b48565b915080610b2181610eaa565b915050610ae9565b509392505050565b6060610b408484600085610b7a565b949350505050565b6000818310610b64576000828152602084905260409020610b73565b60008381526020839052604090205b9392505050565b606082471015610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610499565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c359190610f2d565b60006040518083038185875af1925050503d8060008114610c72576040519150601f19603f3d011682016040523d82523d6000602084013e610c77565b606091505b5091509150610c8887838387610c93565b979650505050505050565b60608315610d29578251600003610d225773ffffffffffffffffffffffffffffffffffffffff85163b610d22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610499565b5081610b40565b610b408383815115610d3e5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104999190610f49565b600060208284031215610d8457600080fd5b5035919050565b600060208284031215610d9d57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b7357600080fd5b600080600060408486031215610dd657600080fd5b83359250602084013567ffffffffffffffff80821115610df557600080fd5b818601915086601f830112610e0957600080fd5b813581811115610e1857600080fd5b8760208260051b8501011115610e2d57600080fd5b6020830194508093505050509250925092565b600060208284031215610e5257600080fd5b5051919050565b600060208284031215610e6b57600080fd5b81518015158114610b7357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610f02577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60005b83811015610f24578181015183820152602001610f0c565b50506000910152565b60008251610f3f818460208701610f09565b9190910192915050565b6020815260008251806020840152610f68816040850160208701610f09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000813000a", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "claimTokens(uint256,bytes32[])": { + "details": "Claims airdropped tokens.", + "params": { + "amount": "The amount of the claim being made.", + "merkleProof": "A merkle proof proving the claim is valid." + } + }, + "isClaimed(address)": { + "details": "Returns true if the claim at the given index in the merkle tree has already been made.", + "params": { + "user": "The index into the merkle tree." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pendingOwner()": { + "details": "Returns the address of the pending owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "setClaimPeriodEnds(uint256)": { + "details": "Sets the claim period ends.", + "params": { + "claimPeriodEnds_": "The merkle root to set." + } + }, + "setMerkleRoot(bytes32)": { + "details": "Sets the merkle root.", + "params": { + "newMerkleRoot": "The merkle root to set." + } + }, + "transferOwnership(address)": { + "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner." + }, + "withdraw(address)": { + "details": "withdraw remaining native tokens." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "setMerkleRoot(bytes32)": { + "notice": "allow set twice here" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1397, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1510, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "_pendingOwner", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 5327, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "rewardToken", + "offset": 0, + "slot": "2", + "type": "t_contract(IERC20)1663" + }, + { + "astId": 5329, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "merkleRoot", + "offset": 0, + "slot": "3", + "type": "t_bytes32" + }, + { + "astId": 5331, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "claimPeriodEnds", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 5334, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "claimed", + "offset": 0, + "slot": "5", + "type": "t_struct(BitMap)3109_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20)1663": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(BitMap)3109_storage": { + "encoding": "inplace", + "label": "struct BitMaps.BitMap", + "members": [ + { + "astId": 3108, + "contract": "src/arcana/v1/ERC20Distributor.sol:ERC20Distributor", + "label": "_data", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/dev/hardhat.config.ts b/packages/dev/hardhat.config.ts index 8fa1e5a..76d1887 100644 --- a/packages/dev/hardhat.config.ts +++ b/packages/dev/hardhat.config.ts @@ -37,7 +37,7 @@ task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => { const accounts = process.env.ACCOUNTS ? process.env.ACCOUNTS.split(',') : []; const deployer = process.env.DEPLOYER || '0x0000000000000000000000000000000000000000'; -// const prodDeployer = process.env.PROD_DEPLOYER || '0x0000000000000000000000000000000000000000'; +const prodDeployer = process.env.PROD_DEPLOYER || '0x0000000000000000000000000000000000000000'; const prodDeployerKey = process.env.PROD_DEPLOYER_KEY || '0x0000000000000000000000000000000000000000000000000000000000000000'; const config: HardhatUserConfig = { @@ -183,16 +183,15 @@ const config: HardhatUserConfig = { // default address provided by hardhat hardhat: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', lineaGoerli: deployer, - linea: deployer, bnbTest: deployer, mumbai: deployer, butcher: deployer, - bnb: deployer, - polygon: deployer, polygonFork: deployer, zetaChainAthens: deployer, }, - owner: {}, + prodDeployer: { + linea: prodDeployer, + }, }, paths: { sources: './src', // Use ./src rather than ./contracts as Hardhat expects