From 77b430fce1391cc6d2ccbd4817f9222d6389aaf2 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:25:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bsc=EF=BC=8Carb=EF=BC=8Csepol?= =?UTF-8?q?ia=E7=9B=B8=E5=85=B3=E6=B5=8B=E8=AF=95=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/contracts/FT.json | 15769 ++++++++++++++++ config/config_arb_sepolia.js | 59 + config/config_bsc_test.js | 59 + config/config_sepolia_test.js | 3 +- deployments/arb_sepolia/.chainId | 1 + deployments/arb_sepolia/GameItemMall.json | 680 + .../1c04b3fecb15d8649fd77113581951ef.json} | 28 +- deployments/bsc_test/.chainId | 1 + deployments/bsc_test/GameItemMall.json | 680 + .../1c04b3fecb15d8649fd77113581951ef.json | 78 + deployments/sepolia_test/GameItemMall.json | 680 + deployments/sepolia_test/NFTLockMain.json | 969 - .../1c04b3fecb15d8649fd77113581951ef.json | 78 + hardhat.config.ts | 12 +- out/arb_sepolia_dev.json | 20 + out/bsc_test_dev.json | 20 + out/imtbl_test_dev.json | 6 + out/sepolia_test_dev.json | 20 +- 18 files changed, 18177 insertions(+), 986 deletions(-) create mode 100644 build/contracts/FT.json create mode 100644 config/config_arb_sepolia.js create mode 100644 config/config_bsc_test.js create mode 100644 deployments/arb_sepolia/.chainId create mode 100644 deployments/arb_sepolia/GameItemMall.json rename deployments/{sepolia_test/solcInputs/8a2f4516b8e4e7985ccc7dc9c84d3cd1.json => arb_sepolia/solcInputs/1c04b3fecb15d8649fd77113581951ef.json} (51%) create mode 100644 deployments/bsc_test/.chainId create mode 100644 deployments/bsc_test/GameItemMall.json create mode 100644 deployments/bsc_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json create mode 100644 deployments/sepolia_test/GameItemMall.json delete mode 100644 deployments/sepolia_test/NFTLockMain.json create mode 100644 deployments/sepolia_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json create mode 100644 out/arb_sepolia_dev.json create mode 100644 out/bsc_test_dev.json diff --git a/build/contracts/FT.json b/build/contracts/FT.json new file mode 100644 index 0000000..6e49240 --- /dev/null +++ b/build/contracts/FT.json @@ -0,0 +1,15769 @@ +{ + "contractName": "FT", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_supplyLimt", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "supplyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "setMintRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "removeMintRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_supplyLimt\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"removeMintRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"setMintRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supplyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/tokens/erc20/FT.sol\":\"FT\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc117ce50ea746cab6b97ed1a1facee17a715ae0cb95d67b943dacbaf15176fb\",\"dweb:/ipfs/QmYRZ2UGNYwsHwfNu7Wjr8L2j1LBZ1mKv6NvbwgterYMXc\"]},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cac938788bc4be12101e59d45588b4e059579f4e61062e1cda8d6b06c0191b15\",\"dweb:/ipfs/QmV2JKCyjTVH3rkWNrfdJRhAT7tZ3usAN2XcnD4h53Mvih\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\":{\"keccak256\":\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4c0f62d3d5bef22b5ca00cc3903e7de6152cb68d2d22401a463f373cda54c00f\",\"dweb:/ipfs/QmSfzjZux7LC7NW2f7rjCXTHeFMUCWERqDkhpCTBy7kxTe\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b81d9ff6559ea5c47fc573e17ece6d9ba5d6839e213e6ebc3b4c5c8fe4199d7f\",\"dweb:/ipfs/QmPCW1bFisUzJkyjroY3yipwfism9RRCigCcK1hbXtVM8n\"]},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cc8841b3cd48ad125e2f46323c8bad3aa0e88e399ec62acb9e57efa7e7c8058c\",\"dweb:/ipfs/QmSqE4mXHA2BXW58deDbXE8MTcsL5JSKNDbm23sVQxRLPS\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c50fcc459e49a9858b6d8ad5f911295cb7c9ab57567845a250bf0153f84a95c7\",\"dweb:/ipfs/QmcEW85JRzvDkQggxiBBLVAasXWdkhEysqypj9EaB6H2g6\"]},\"project:/contracts/tokens/erc20/FT.sol\":{\"keccak256\":\"0x44e16e7f8599489a81114855aef355458a19081f29b4b343470bf4fd3e27e3cd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ccb78554a48b48bf75d888f4730a655fd121c30e29d049575864796217f28e3a\",\"dweb:/ipfs/QmY7xVAQKApqwLuK15vkNQA8BBLNCtsxafUMGFKmQw1t2o\"]}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162002d2038038062002d208339818101604052810190620000379190620004c8565b828281600390805190602001906200005192919062000240565b5080600490805190602001906200006a92919062000240565b505050620000826000801b33620000c560201b60201c565b620000b47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000c560201b60201c565b8060808181525050505050620005c7565b620000d78282620000db60201b60201c565b5050565b620000ed8282620001cd60201b60201c565b620001c95760016005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200016e6200023860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b8280546200024e9062000591565b90600052602060002090601f016020900481019282620002725760008555620002be565b82601f106200028d57805160ff1916838001178555620002be565b82800160010185558215620002be579182015b82811115620002bd578251825591602001919060010190620002a0565b5b509050620002cd9190620002d1565b5090565b5b80821115620002ec576000816000905550600101620002d2565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000359826200030e565b810181811067ffffffffffffffff821117156200037b576200037a6200031f565b5b80604052505050565b600062000390620002f0565b90506200039e82826200034e565b919050565b600067ffffffffffffffff821115620003c157620003c06200031f565b5b620003cc826200030e565b9050602081019050919050565b60005b83811015620003f9578082015181840152602081019050620003dc565b8381111562000409576000848401525b50505050565b6000620004266200042084620003a3565b62000384565b90508281526020810184848401111562000445576200044462000309565b5b62000452848285620003d9565b509392505050565b600082601f83011262000472576200047162000304565b5b8151620004848482602086016200040f565b91505092915050565b6000819050919050565b620004a2816200048d565b8114620004ae57600080fd5b50565b600081519050620004c28162000497565b92915050565b600080600060608486031215620004e457620004e3620002fa565b5b600084015167ffffffffffffffff811115620005055762000504620002ff565b5b62000513868287016200045a565b935050602084015167ffffffffffffffff811115620005375762000536620002ff565b5b62000545868287016200045a565b92505060406200055886828701620004b1565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620005aa57607f821691505b60208210811415620005c157620005c062000562565b5b50919050565b60805161272f620005f160003960008181610645015281816107f5015261081c015261272f6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806340c10f19116100de57806395d89b4111610097578063a9059cbb11610071578063a9059cbb14610470578063d5391393146104a0578063d547741f146104be578063dd62ed3e146104da57610173565b806395d89b4114610404578063a217fddf14610422578063a457c2d71461044057610173565b806340c10f191461033457806342966c6814610350578063530dd0791461036c57806370a082311461038857806379cc6790146103b857806391d14854146103d457610173565b806323b872dd1161013057806323b872dd1461024e578063248a9ca31461027e5780632f2ff15d146102ae578063313ce567146102ca57806336568abe146102e8578063395093511461030457610173565b806301ffc9a71461017857806306fdde03146101a8578063095ea7b3146101c657806318160ddd146101f657806319d1997a146102145780631cf4e3ee14610232575b600080fd5b610192600480360381019061018d9190611944565b61050a565b60405161019f919061198c565b60405180910390f35b6101b0610584565b6040516101bd9190611a40565b60405180910390f35b6101e060048036038101906101db9190611af6565b610616565b6040516101ed919061198c565b60405180910390f35b6101fe610639565b60405161020b9190611b45565b60405180910390f35b61021c610643565b6040516102299190611b45565b60405180910390f35b61024c60048036038101906102479190611b60565b610667565b005b61026860048036038101906102639190611b8d565b610694565b604051610275919061198c565b60405180910390f35b61029860048036038101906102939190611c16565b6106c3565b6040516102a59190611c52565b60405180910390f35b6102c860048036038101906102c39190611c6d565b6106e3565b005b6102d2610704565b6040516102df9190611cc9565b60405180910390f35b61030260048036038101906102fd9190611c6d565b61070d565b005b61031e60048036038101906103199190611af6565b610790565b60405161032b919061198c565b60405180910390f35b61034e60048036038101906103499190611af6565b6107c7565b005b61036a60048036038101906103659190611ce4565b61089f565b005b61038660048036038101906103819190611b60565b6108b3565b005b6103a2600480360381019061039d9190611b60565b6108e0565b6040516103af9190611b45565b60405180910390f35b6103d260048036038101906103cd9190611af6565b610928565b005b6103ee60048036038101906103e99190611c6d565b610948565b6040516103fb919061198c565b60405180910390f35b61040c6109b3565b6040516104199190611a40565b60405180910390f35b61042a610a45565b6040516104379190611c52565b60405180910390f35b61045a60048036038101906104559190611af6565b610a4c565b604051610467919061198c565b60405180910390f35b61048a60048036038101906104859190611af6565b610ac3565b604051610497919061198c565b60405180910390f35b6104a8610ae6565b6040516104b59190611c52565b60405180910390f35b6104d860048036038101906104d39190611c6d565b610b0a565b005b6104f460048036038101906104ef9190611d11565b610b2b565b6040516105019190611b45565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057d575061057c82610bb2565b5b9050919050565b60606003805461059390611d80565b80601f01602080910402602001604051908101604052809291908181526020018280546105bf90611d80565b801561060c5780601f106105e15761010080835404028352916020019161060c565b820191906000526020600020905b8154815290600101906020018083116105ef57829003601f168201915b5050505050905090565b600080610621610c1c565b905061062e818585610c24565b600191505092915050565b6000600254905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6106917f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682610b0a565b50565b60008061069f610c1c565b90506106ac858285610def565b6106b7858585610e7b565b60019150509392505050565b600060056000838152602001908152602001600020600101549050919050565b6106ec826106c3565b6106f5816110f3565b6106ff8383611107565b505050565b60006012905090565b610715610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077990611e24565b60405180910390fd5b61078c82826111e8565b5050565b60008061079b610c1c565b90506107bc8185856107ad8589610b2b565b6107b79190611e73565b610c24565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f1816110f3565b60007f00000000000000000000000000000000000000000000000000000000000000001115610890577f000000000000000000000000000000000000000000000000000000000000000082610844610639565b61084e9190611e73565b111561088f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088690611f15565b60405180910390fd5b5b61089a83836112ca565b505050565b6108b06108aa610c1c565b82611421565b50565b6108dd7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826106e3565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61093a82610934610c1c565b83610def565b6109448282611421565b5050565b60006005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060600480546109c290611d80565b80601f01602080910402602001604051908101604052809291908181526020018280546109ee90611d80565b8015610a3b5780601f10610a1057610100808354040283529160200191610a3b565b820191906000526020600020905b815481529060010190602001808311610a1e57829003601f168201915b5050505050905090565b6000801b81565b600080610a57610c1c565b90506000610a658286610b2b565b905083811015610aaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa190611fa7565b60405180910390fd5b610ab78286868403610c24565b60019250505092915050565b600080610ace610c1c565b9050610adb818585610e7b565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610b13826106c3565b610b1c816110f3565b610b2683836111e8565b505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90612039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfb906120cb565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610de29190611b45565b60405180910390a3505050565b6000610dfb8484610b2b565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e755781811015610e67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5e90612137565b60405180910390fd5b610e748484848403610c24565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610eeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee2906121c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f529061225b565b60405180910390fd5b610f668383836115ef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe3906122ed565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110da9190611b45565b60405180910390a36110ed8484846115f4565b50505050565b611104816110ff610c1c565b6115f9565b50565b6111118282610948565b6111e45760016005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611189610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6111f28282610948565b156112c65760006005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061126b610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133190612359565b60405180910390fd5b611346600083836115ef565b80600260008282546113589190611e73565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516114099190611b45565b60405180910390a361141d600083836115f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611491576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611488906123eb565b60405180910390fd5b61149d826000836115ef565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151a9061247d565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115d69190611b45565b60405180910390a36115ea836000846115f4565b505050565b505050565b505050565b6116038282610948565b61167a576116108161167e565b61161e8360001c60206116ab565b60405160200161162f929190612571565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116719190611a40565b60405180910390fd5b5050565b60606116a48273ffffffffffffffffffffffffffffffffffffffff16601460ff166116ab565b9050919050565b6060600060028360026116be91906125ab565b6116c89190611e73565b67ffffffffffffffff8111156116e1576116e0612605565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061174b5761174a612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117af576117ae612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026117ef91906125ab565b6117f99190611e73565b90505b6001811115611899577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061183b5761183a612634565b5b1a60f81b82828151811061185257611851612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061189290612663565b90506117fc565b50600084146118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d4906126d9565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611921816118ec565b811461192c57600080fd5b50565b60008135905061193e81611918565b92915050565b60006020828403121561195a576119596118e7565b5b60006119688482850161192f565b91505092915050565b60008115159050919050565b61198681611971565b82525050565b60006020820190506119a1600083018461197d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156119e15780820151818401526020810190506119c6565b838111156119f0576000848401525b50505050565b6000601f19601f8301169050919050565b6000611a12826119a7565b611a1c81856119b2565b9350611a2c8185602086016119c3565b611a35816119f6565b840191505092915050565b60006020820190508181036000830152611a5a8184611a07565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611a8d82611a62565b9050919050565b611a9d81611a82565b8114611aa857600080fd5b50565b600081359050611aba81611a94565b92915050565b6000819050919050565b611ad381611ac0565b8114611ade57600080fd5b50565b600081359050611af081611aca565b92915050565b60008060408385031215611b0d57611b0c6118e7565b5b6000611b1b85828601611aab565b9250506020611b2c85828601611ae1565b9150509250929050565b611b3f81611ac0565b82525050565b6000602082019050611b5a6000830184611b36565b92915050565b600060208284031215611b7657611b756118e7565b5b6000611b8484828501611aab565b91505092915050565b600080600060608486031215611ba657611ba56118e7565b5b6000611bb486828701611aab565b9350506020611bc586828701611aab565b9250506040611bd686828701611ae1565b9150509250925092565b6000819050919050565b611bf381611be0565b8114611bfe57600080fd5b50565b600081359050611c1081611bea565b92915050565b600060208284031215611c2c57611c2b6118e7565b5b6000611c3a84828501611c01565b91505092915050565b611c4c81611be0565b82525050565b6000602082019050611c676000830184611c43565b92915050565b60008060408385031215611c8457611c836118e7565b5b6000611c9285828601611c01565b9250506020611ca385828601611aab565b9150509250929050565b600060ff82169050919050565b611cc381611cad565b82525050565b6000602082019050611cde6000830184611cba565b92915050565b600060208284031215611cfa57611cf96118e7565b5b6000611d0884828501611ae1565b91505092915050565b60008060408385031215611d2857611d276118e7565b5b6000611d3685828601611aab565b9250506020611d4785828601611aab565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611d9857607f821691505b60208210811415611dac57611dab611d51565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000611e0e602f836119b2565b9150611e1982611db2565b604082019050919050565b60006020820190508181036000830152611e3d81611e01565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611e7e82611ac0565b9150611e8983611ac0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ebe57611ebd611e44565b5b828201905092915050565b7f4578636565642074686520746f74616c20737570706c79000000000000000000600082015250565b6000611eff6017836119b2565b9150611f0a82611ec9565b602082019050919050565b60006020820190508181036000830152611f2e81611ef2565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000611f916025836119b2565b9150611f9c82611f35565b604082019050919050565b60006020820190508181036000830152611fc081611f84565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006120236024836119b2565b915061202e82611fc7565b604082019050919050565b6000602082019050818103600083015261205281612016565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006120b56022836119b2565b91506120c082612059565b604082019050919050565b600060208201905081810360008301526120e4816120a8565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612121601d836119b2565b915061212c826120eb565b602082019050919050565b6000602082019050818103600083015261215081612114565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006121b36025836119b2565b91506121be82612157565b604082019050919050565b600060208201905081810360008301526121e2816121a6565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006122456023836119b2565b9150612250826121e9565b604082019050919050565b6000602082019050818103600083015261227481612238565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006122d76026836119b2565b91506122e28261227b565b604082019050919050565b60006020820190508181036000830152612306816122ca565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000612343601f836119b2565b915061234e8261230d565b602082019050919050565b6000602082019050818103600083015261237281612336565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006123d56021836119b2565b91506123e082612379565b604082019050919050565b60006020820190508181036000830152612404816123c8565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006124676022836119b2565b91506124728261240b565b604082019050919050565b600060208201905081810360008301526124968161245a565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b60006124de60178361249d565b91506124e9826124a8565b601782019050919050565b60006124ff826119a7565b612509818561249d565b93506125198185602086016119c3565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061255b60118361249d565b915061256682612525565b601182019050919050565b600061257c826124d1565b915061258882856124f4565b91506125938261254e565b915061259f82846124f4565b91508190509392505050565b60006125b682611ac0565b91506125c183611ac0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125fa576125f9611e44565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061266e82611ac0565b9150600082141561268257612681611e44565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006126c36020836119b2565b91506126ce8261268d565b602082019050919050565b600060208201905081810360008301526126f2816126b6565b905091905056fea26469706673582212209e58240ac803019fdf9fecd6ef29545ba560aacfd02181b3ae8f0e70b4703dd264736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806340c10f19116100de57806395d89b4111610097578063a9059cbb11610071578063a9059cbb14610470578063d5391393146104a0578063d547741f146104be578063dd62ed3e146104da57610173565b806395d89b4114610404578063a217fddf14610422578063a457c2d71461044057610173565b806340c10f191461033457806342966c6814610350578063530dd0791461036c57806370a082311461038857806379cc6790146103b857806391d14854146103d457610173565b806323b872dd1161013057806323b872dd1461024e578063248a9ca31461027e5780632f2ff15d146102ae578063313ce567146102ca57806336568abe146102e8578063395093511461030457610173565b806301ffc9a71461017857806306fdde03146101a8578063095ea7b3146101c657806318160ddd146101f657806319d1997a146102145780631cf4e3ee14610232575b600080fd5b610192600480360381019061018d9190611944565b61050a565b60405161019f919061198c565b60405180910390f35b6101b0610584565b6040516101bd9190611a40565b60405180910390f35b6101e060048036038101906101db9190611af6565b610616565b6040516101ed919061198c565b60405180910390f35b6101fe610639565b60405161020b9190611b45565b60405180910390f35b61021c610643565b6040516102299190611b45565b60405180910390f35b61024c60048036038101906102479190611b60565b610667565b005b61026860048036038101906102639190611b8d565b610694565b604051610275919061198c565b60405180910390f35b61029860048036038101906102939190611c16565b6106c3565b6040516102a59190611c52565b60405180910390f35b6102c860048036038101906102c39190611c6d565b6106e3565b005b6102d2610704565b6040516102df9190611cc9565b60405180910390f35b61030260048036038101906102fd9190611c6d565b61070d565b005b61031e60048036038101906103199190611af6565b610790565b60405161032b919061198c565b60405180910390f35b61034e60048036038101906103499190611af6565b6107c7565b005b61036a60048036038101906103659190611ce4565b61089f565b005b61038660048036038101906103819190611b60565b6108b3565b005b6103a2600480360381019061039d9190611b60565b6108e0565b6040516103af9190611b45565b60405180910390f35b6103d260048036038101906103cd9190611af6565b610928565b005b6103ee60048036038101906103e99190611c6d565b610948565b6040516103fb919061198c565b60405180910390f35b61040c6109b3565b6040516104199190611a40565b60405180910390f35b61042a610a45565b6040516104379190611c52565b60405180910390f35b61045a60048036038101906104559190611af6565b610a4c565b604051610467919061198c565b60405180910390f35b61048a60048036038101906104859190611af6565b610ac3565b604051610497919061198c565b60405180910390f35b6104a8610ae6565b6040516104b59190611c52565b60405180910390f35b6104d860048036038101906104d39190611c6d565b610b0a565b005b6104f460048036038101906104ef9190611d11565b610b2b565b6040516105019190611b45565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057d575061057c82610bb2565b5b9050919050565b60606003805461059390611d80565b80601f01602080910402602001604051908101604052809291908181526020018280546105bf90611d80565b801561060c5780601f106105e15761010080835404028352916020019161060c565b820191906000526020600020905b8154815290600101906020018083116105ef57829003601f168201915b5050505050905090565b600080610621610c1c565b905061062e818585610c24565b600191505092915050565b6000600254905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6106917f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682610b0a565b50565b60008061069f610c1c565b90506106ac858285610def565b6106b7858585610e7b565b60019150509392505050565b600060056000838152602001908152602001600020600101549050919050565b6106ec826106c3565b6106f5816110f3565b6106ff8383611107565b505050565b60006012905090565b610715610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077990611e24565b60405180910390fd5b61078c82826111e8565b5050565b60008061079b610c1c565b90506107bc8185856107ad8589610b2b565b6107b79190611e73565b610c24565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f1816110f3565b60007f00000000000000000000000000000000000000000000000000000000000000001115610890577f000000000000000000000000000000000000000000000000000000000000000082610844610639565b61084e9190611e73565b111561088f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088690611f15565b60405180910390fd5b5b61089a83836112ca565b505050565b6108b06108aa610c1c565b82611421565b50565b6108dd7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826106e3565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61093a82610934610c1c565b83610def565b6109448282611421565b5050565b60006005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060600480546109c290611d80565b80601f01602080910402602001604051908101604052809291908181526020018280546109ee90611d80565b8015610a3b5780601f10610a1057610100808354040283529160200191610a3b565b820191906000526020600020905b815481529060010190602001808311610a1e57829003601f168201915b5050505050905090565b6000801b81565b600080610a57610c1c565b90506000610a658286610b2b565b905083811015610aaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa190611fa7565b60405180910390fd5b610ab78286868403610c24565b60019250505092915050565b600080610ace610c1c565b9050610adb818585610e7b565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610b13826106c3565b610b1c816110f3565b610b2683836111e8565b505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90612039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfb906120cb565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610de29190611b45565b60405180910390a3505050565b6000610dfb8484610b2b565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e755781811015610e67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5e90612137565b60405180910390fd5b610e748484848403610c24565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610eeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee2906121c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f529061225b565b60405180910390fd5b610f668383836115ef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe3906122ed565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110da9190611b45565b60405180910390a36110ed8484846115f4565b50505050565b611104816110ff610c1c565b6115f9565b50565b6111118282610948565b6111e45760016005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611189610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6111f28282610948565b156112c65760006005600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061126b610c1c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133190612359565b60405180910390fd5b611346600083836115ef565b80600260008282546113589190611e73565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516114099190611b45565b60405180910390a361141d600083836115f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611491576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611488906123eb565b60405180910390fd5b61149d826000836115ef565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151a9061247d565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115d69190611b45565b60405180910390a36115ea836000846115f4565b505050565b505050565b505050565b6116038282610948565b61167a576116108161167e565b61161e8360001c60206116ab565b60405160200161162f929190612571565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116719190611a40565b60405180910390fd5b5050565b60606116a48273ffffffffffffffffffffffffffffffffffffffff16601460ff166116ab565b9050919050565b6060600060028360026116be91906125ab565b6116c89190611e73565b67ffffffffffffffff8111156116e1576116e0612605565b5b6040519080825280601f01601f1916602001820160405280156117135781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061174b5761174a612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117af576117ae612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026117ef91906125ab565b6117f99190611e73565b90505b6001811115611899577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061183b5761183a612634565b5b1a60f81b82828151811061185257611851612634565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061189290612663565b90506117fc565b50600084146118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d4906126d9565b60405180910390fd5b8091505092915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611921816118ec565b811461192c57600080fd5b50565b60008135905061193e81611918565b92915050565b60006020828403121561195a576119596118e7565b5b60006119688482850161192f565b91505092915050565b60008115159050919050565b61198681611971565b82525050565b60006020820190506119a1600083018461197d565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156119e15780820151818401526020810190506119c6565b838111156119f0576000848401525b50505050565b6000601f19601f8301169050919050565b6000611a12826119a7565b611a1c81856119b2565b9350611a2c8185602086016119c3565b611a35816119f6565b840191505092915050565b60006020820190508181036000830152611a5a8184611a07565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611a8d82611a62565b9050919050565b611a9d81611a82565b8114611aa857600080fd5b50565b600081359050611aba81611a94565b92915050565b6000819050919050565b611ad381611ac0565b8114611ade57600080fd5b50565b600081359050611af081611aca565b92915050565b60008060408385031215611b0d57611b0c6118e7565b5b6000611b1b85828601611aab565b9250506020611b2c85828601611ae1565b9150509250929050565b611b3f81611ac0565b82525050565b6000602082019050611b5a6000830184611b36565b92915050565b600060208284031215611b7657611b756118e7565b5b6000611b8484828501611aab565b91505092915050565b600080600060608486031215611ba657611ba56118e7565b5b6000611bb486828701611aab565b9350506020611bc586828701611aab565b9250506040611bd686828701611ae1565b9150509250925092565b6000819050919050565b611bf381611be0565b8114611bfe57600080fd5b50565b600081359050611c1081611bea565b92915050565b600060208284031215611c2c57611c2b6118e7565b5b6000611c3a84828501611c01565b91505092915050565b611c4c81611be0565b82525050565b6000602082019050611c676000830184611c43565b92915050565b60008060408385031215611c8457611c836118e7565b5b6000611c9285828601611c01565b9250506020611ca385828601611aab565b9150509250929050565b600060ff82169050919050565b611cc381611cad565b82525050565b6000602082019050611cde6000830184611cba565b92915050565b600060208284031215611cfa57611cf96118e7565b5b6000611d0884828501611ae1565b91505092915050565b60008060408385031215611d2857611d276118e7565b5b6000611d3685828601611aab565b9250506020611d4785828601611aab565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611d9857607f821691505b60208210811415611dac57611dab611d51565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000611e0e602f836119b2565b9150611e1982611db2565b604082019050919050565b60006020820190508181036000830152611e3d81611e01565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611e7e82611ac0565b9150611e8983611ac0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ebe57611ebd611e44565b5b828201905092915050565b7f4578636565642074686520746f74616c20737570706c79000000000000000000600082015250565b6000611eff6017836119b2565b9150611f0a82611ec9565b602082019050919050565b60006020820190508181036000830152611f2e81611ef2565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000611f916025836119b2565b9150611f9c82611f35565b604082019050919050565b60006020820190508181036000830152611fc081611f84565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006120236024836119b2565b915061202e82611fc7565b604082019050919050565b6000602082019050818103600083015261205281612016565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006120b56022836119b2565b91506120c082612059565b604082019050919050565b600060208201905081810360008301526120e4816120a8565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612121601d836119b2565b915061212c826120eb565b602082019050919050565b6000602082019050818103600083015261215081612114565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006121b36025836119b2565b91506121be82612157565b604082019050919050565b600060208201905081810360008301526121e2816121a6565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006122456023836119b2565b9150612250826121e9565b604082019050919050565b6000602082019050818103600083015261227481612238565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006122d76026836119b2565b91506122e28261227b565b604082019050919050565b60006020820190508181036000830152612306816122ca565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000612343601f836119b2565b915061234e8261230d565b602082019050919050565b6000602082019050818103600083015261237281612336565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006123d56021836119b2565b91506123e082612379565b604082019050919050565b60006020820190508181036000830152612404816123c8565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006124676022836119b2565b91506124728261240b565b604082019050919050565b600060208201905081810360008301526124968161245a565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b60006124de60178361249d565b91506124e9826124a8565b601782019050919050565b60006124ff826119a7565b612509818561249d565b93506125198185602086016119c3565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061255b60118361249d565b915061256682612525565b601182019050919050565b600061257c826124d1565b915061258882856124f4565b91506125938261254e565b915061259f82846124f4565b91508190509392505050565b60006125b682611ac0565b91506125c183611ac0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125fa576125f9611e44565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061266e82611ac0565b9150600082141561268257612681611e44565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006126c36020836119b2565b91506126ce8261268d565b602082019050919050565b600060208201905081810360008301526126f2816126b6565b905091905056fea26469706673582212209e58240ac803019fdf9fecd6ef29545ba560aacfd02181b3ae8f0e70b4703dd264736f6c634300080a0033", + "immutableReferences": { + "21454": [ + { + "length": 32, + "start": 1605 + }, + { + "length": 32, + "start": 2037 + }, + { + "length": 32, + "start": 2076 + } + ] + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:4609:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:97", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:97" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:97" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:97", + "type": "" + } + ], + "src": "7:75:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:97" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:97" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "423:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "440:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "443:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "433:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "433:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "433:12:97" + } + ] + }, + "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", + "nodeType": "YulFunctionDefinition", + "src": "334:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "546:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "563:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "566:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "556:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "556:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "556:12:97" + } + ] + }, + "name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae", + "nodeType": "YulFunctionDefinition", + "src": "457:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "628:54:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "638:38:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "656:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "663:2:97", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "652:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "652:14:97" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "672:2:97", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "668:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "668:7:97" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "648:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "648:28:97" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "638:6:97" + } + ] + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "611:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "621:6:97", + "type": "" + } + ], + "src": "580:102:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "716:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "733:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "736:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "726:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "726:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "726:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "830:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "833:4:97", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "823:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "823:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "823:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "854:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "857:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "847:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "847:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "847:15:97" + } + ] + }, + "name": "panic_error_0x41", + "nodeType": "YulFunctionDefinition", + "src": "688:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "917:238:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "927:58:97", + "value": { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "949:6:97" + }, + { + "arguments": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "979:4:97" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "957:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "957:27:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "945:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "945:40:97" + }, + "variables": [ + { + "name": "newFreePtr", + "nodeType": "YulTypedName", + "src": "931:10:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1096:22:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "1098:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "1098:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1098:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "1039:10:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1051:18:97", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1036:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1036:34:97" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "1075:10:97" + }, + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1087:6:97" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1072:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1072:22:97" + } + ], + "functionName": { + "name": "or", + "nodeType": "YulIdentifier", + "src": "1033:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1033:62:97" + }, + "nodeType": "YulIf", + "src": "1030:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1134:2:97", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "1138:10:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1127:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1127:22:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1127:22:97" + } + ] + }, + "name": "finalize_allocation", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "903:6:97", + "type": "" + }, + { + "name": "size", + "nodeType": "YulTypedName", + "src": "911:4:97", + "type": "" + } + ], + "src": "874:281:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1202:88:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1212:30:97", + "value": { + "arguments": [], + "functionName": { + "name": "allocate_unbounded", + "nodeType": "YulIdentifier", + "src": "1222:18:97" + }, + "nodeType": "YulFunctionCall", + "src": "1222:20:97" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1212:6:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1271:6:97" + }, + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "1279:4:97" + } + ], + "functionName": { + "name": "finalize_allocation", + "nodeType": "YulIdentifier", + "src": "1251:19:97" + }, + "nodeType": "YulFunctionCall", + "src": "1251:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1251:33:97" + } + ] + }, + "name": "allocate_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "1186:4:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1195:6:97", + "type": "" + } + ], + "src": "1161:129:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1363:241:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1468:22:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "1470:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "1470:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1470:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1440:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1448:18:97", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1437:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1437:30:97" + }, + "nodeType": "YulIf", + "src": "1434:56:97" + }, + { + "nodeType": "YulAssignment", + "src": "1500:37:97", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1530:6:97" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "1508:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "1508:29:97" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "1500:4:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1574:23:97", + "value": { + "arguments": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "1586:4:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1592:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1582:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1582:15:97" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "1574:4:97" + } + ] + } + ] + }, + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1347:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "1358:4:97", + "type": "" + } + ], + "src": "1296:308:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1659:258:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1669:10:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1678:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nodeType": "YulTypedName", + "src": "1673:1:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1738:63:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "1763:3:97" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1768:1:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1759:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1759:11:97" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "1782:3:97" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1787:1:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1778:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1778:11:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "1772:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "1772:18:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1752:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1752:39:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1752:39:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1699:1:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1702:6:97" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1696:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1696:13:97" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "1710:19:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1712:15:97", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1721:1:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1724:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1717:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1717:10:97" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1712:1:97" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "1692:3:97", + "statements": [] + }, + "src": "1688:113:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1835:76:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "1885:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1890:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1881:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1881:16:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1899:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1874:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1874:27:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1874:27:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1816:1:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1819:6:97" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1813:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1813:13:97" + }, + "nodeType": "YulIf", + "src": "1810:101:97" + } + ] + }, + "name": "copy_memory_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "1641:3:97", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "1646:3:97", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1651:6:97", + "type": "" + } + ], + "src": "1610:307:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2018:326:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2028:75:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2095:6:97" + } + ], + "functionName": { + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "2053:41:97" + }, + "nodeType": "YulFunctionCall", + "src": "2053:49:97" + } + ], + "functionName": { + "name": "allocate_memory", + "nodeType": "YulIdentifier", + "src": "2037:15:97" + }, + "nodeType": "YulFunctionCall", + "src": "2037:66:97" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "2028:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "2119:5:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2126:6:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2112:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2112:21:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2112:21:97" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2142:27:97", + "value": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "2157:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2164:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2153:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2153:16:97" + }, + "variables": [ + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "2146:3:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2207:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae", + "nodeType": "YulIdentifier", + "src": "2209:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "2209:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2209:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "2188:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2193:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2184:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2184:16:97" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2202:3:97" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "2181:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "2181:25:97" + }, + "nodeType": "YulIf", + "src": "2178:112:97" + }, + { + "expression": { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "2321:3:97" + }, + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "2326:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2331:6:97" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "2299:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "2299:39:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2299:39:97" + } + ] + }, + "name": "abi_decode_available_length_t_string_memory_ptr_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "1991:3:97", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1996:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2004:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "2012:5:97", + "type": "" + } + ], + "src": "1923:421:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2437:282:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2486:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", + "nodeType": "YulIdentifier", + "src": "2488:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "2488:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2488:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "2465:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2473:4:97", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2461:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2461:17:97" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2480:3:97" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "2457:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2457:27:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "2450:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2450:35:97" + }, + "nodeType": "YulIf", + "src": "2447:122:97" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2578:27:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "2598:6:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "2592:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "2592:13:97" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2582:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2614:99:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "2686:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2694:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2682:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2682:17:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2701:6:97" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2709:3:97" + } + ], + "functionName": { + "name": "abi_decode_available_length_t_string_memory_ptr_fromMemory", + "nodeType": "YulIdentifier", + "src": "2623:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "2623:90:97" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "2614:5:97" + } + ] + } + ] + }, + "name": "abi_decode_t_string_memory_ptr_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "2415:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2423:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "2431:5:97", + "type": "" + } + ], + "src": "2364:355:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2770:32:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2780:16:97", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2791:5:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "2780:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2752:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "2762:7:97", + "type": "" + } + ], + "src": "2725:77:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2851:79:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2908:16:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2917:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2920:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "2910:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2910:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2910:12:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2874:5:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2899:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "2881:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "2881:24:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "2871:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "2871:35:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "2864:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2864:43:97" + }, + "nodeType": "YulIf", + "src": "2861:63:97" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2844:5:97", + "type": "" + } + ], + "src": "2808:122:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2999:80:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3009:22:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3024:6:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "3018:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "3018:13:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3009:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3067:5:97" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "3040:26:97" + }, + "nodeType": "YulFunctionCall", + "src": "3040:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3040:33:97" + } + ] + }, + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "2977:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2985:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2993:5:97", + "type": "" + } + ], + "src": "2936:143:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3216:878:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3262:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "3264:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "3264:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3264:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "3237:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3246:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3233:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3233:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3258:2:97", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "3229:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3229:32:97" + }, + "nodeType": "YulIf", + "src": "3226:119:97" + }, + { + "nodeType": "YulBlock", + "src": "3355:291:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "3370:38:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3394:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3405:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3390:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3390:17:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "3384:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "3384:24:97" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "3374:6:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3455:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulIdentifier", + "src": "3457:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "3457:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3457:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3427:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3435:18:97", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3424:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "3424:30:97" + }, + "nodeType": "YulIf", + "src": "3421:117:97" + }, + { + "nodeType": "YulAssignment", + "src": "3552:84:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3608:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3619:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3604:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3604:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "3628:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_string_memory_ptr_fromMemory", + "nodeType": "YulIdentifier", + "src": "3562:41:97" + }, + "nodeType": "YulFunctionCall", + "src": "3562:74:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "3552:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "3656:292:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "3671:39:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3695:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3706:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3691:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3691:18:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "3685:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "3685:25:97" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "3675:6:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3757:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulIdentifier", + "src": "3759:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "3759:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3759:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3729:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3737:18:97", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3726:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "3726:30:97" + }, + "nodeType": "YulIf", + "src": "3723:117:97" + }, + { + "nodeType": "YulAssignment", + "src": "3854:84:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3910:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3921:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3906:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3906:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "3930:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_string_memory_ptr_fromMemory", + "nodeType": "YulIdentifier", + "src": "3864:41:97" + }, + "nodeType": "YulFunctionCall", + "src": "3864:74:97" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "3854:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "3958:129:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "3973:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3987:2:97", + "type": "", + "value": "64" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "3977:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "4003:74:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4049:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "4060:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4045:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4045:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "4069:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulIdentifier", + "src": "4013:31:97" + }, + "nodeType": "YulFunctionCall", + "src": "4013:64:97" + }, + "variableNames": [ + { + "name": "value2", + "nodeType": "YulIdentifier", + "src": "4003:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_string_memory_ptrt_string_memory_ptrt_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3170:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "3181:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "3193:6:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "3201:6:97", + "type": "" + }, + { + "name": "value2", + "nodeType": "YulTypedName", + "src": "3209:6:97", + "type": "" + } + ], + "src": "3085:1009:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4128:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4145:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4148:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4138:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "4138:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4138:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4242:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4245:4:97", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4235:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "4235:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4235:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4266:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4269:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4259:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "4259:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4259:15:97" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "4100:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4337:269:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4347:22:97", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4361:4:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4367:1:97", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "4357:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4357:12:97" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4347:6:97" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "4378:38:97", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4408:4:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4414:1:97", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4404:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4404:12:97" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "4382:18:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4455:51:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4469:27:97", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4483:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4491:4:97", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4479:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4479:17:97" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4469:6:97" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4435:18:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4428:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "4428:26:97" + }, + "nodeType": "YulIf", + "src": "4425:81:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4558:42:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "4572:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "4572:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4572:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4522:18:97" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4545:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4553:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4542:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "4542:14:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "4519:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "4519:38:97" + }, + "nodeType": "YulIf", + "src": "4516:84:97" + } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "4321:4:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "4330:6:97", + "type": "" + } + ], + "src": "4286:320:97" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function finalize_allocation(memPtr, size) {\n let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function allocate_memory(size) -> memPtr {\n memPtr := allocate_unbounded()\n finalize_allocation(memPtr, size)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n size := round_up_to_mul_of_32(length)\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function abi_decode_available_length_t_string_memory_ptr_fromMemory(src, length, end) -> array {\n array := allocate_memory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() }\n copy_memory_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr_fromMemory(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n let length := mload(offset)\n array := abi_decode_available_length_t_string_memory_ptr_fromMemory(add(offset, 0x20), length, end)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptrt_string_memory_ptrt_uint256_fromMemory(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := mload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := mload(add(headStart, 32))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value1 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n}\n", + "id": 97, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:26086:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:97", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:97" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:97" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:97", + "type": "" + } + ], + "src": "7:75:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:97" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:97" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "378:105:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "388:89:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "403:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "410:66:97", + "type": "", + "value": "0xffffffff00000000000000000000000000000000000000000000000000000000" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "399:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "399:78:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "388:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_bytes4", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "360:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "370:7:97", + "type": "" + } + ], + "src": "334:149:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "531:78:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "587:16:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "596:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "599:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "589:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "589:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "589:12:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "554:5:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "578:5:97" + } + ], + "functionName": { + "name": "cleanup_t_bytes4", + "nodeType": "YulIdentifier", + "src": "561:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "561:23:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "551:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "551:34:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "544:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "544:42:97" + }, + "nodeType": "YulIf", + "src": "541:62:97" + } + ] + }, + "name": "validator_revert_t_bytes4", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "524:5:97", + "type": "" + } + ], + "src": "489:120:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "666:86:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "676:29:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "698:6:97" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "685:12:97" + }, + "nodeType": "YulFunctionCall", + "src": "685:20:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "676:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "740:5:97" + } + ], + "functionName": { + "name": "validator_revert_t_bytes4", + "nodeType": "YulIdentifier", + "src": "714:25:97" + }, + "nodeType": "YulFunctionCall", + "src": "714:32:97" + }, + "nodeType": "YulExpressionStatement", + "src": "714:32:97" + } + ] + }, + "name": "abi_decode_t_bytes4", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "644:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "652:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "660:5:97", + "type": "" + } + ], + "src": "615:137:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "823:262:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "869:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "871:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "871:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "871:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "844:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "853:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "840:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "840:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "865:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "836:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "836:32:97" + }, + "nodeType": "YulIf", + "src": "833:119:97" + }, + { + "nodeType": "YulBlock", + "src": "962:116:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "977:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "991:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "981:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1006:62:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1040:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1051:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1036:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1036:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1060:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_bytes4", + "nodeType": "YulIdentifier", + "src": "1016:19:97" + }, + "nodeType": "YulFunctionCall", + "src": "1016:52:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1006:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes4", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "793:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "804:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "816:6:97", + "type": "" + } + ], + "src": "758:327:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1133:48:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1143:32:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1168:5:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1161:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1161:13:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1154:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1154:21:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1143:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_bool", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1115:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1125:7:97", + "type": "" + } + ], + "src": "1091:90:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1246:50:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1263:3:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1283:5:97" + } + ], + "functionName": { + "name": "cleanup_t_bool", + "nodeType": "YulIdentifier", + "src": "1268:14:97" + }, + "nodeType": "YulFunctionCall", + "src": "1268:21:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1256:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1256:34:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1256:34:97" + } + ] + }, + "name": "abi_encode_t_bool_to_t_bool_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1234:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1241:3:97", + "type": "" + } + ], + "src": "1187:109:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1394:118:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1404:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1416:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1427:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1412:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1412:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1404:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1478:6:97" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1491:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1502:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1487:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1487:17:97" + } + ], + "functionName": { + "name": "abi_encode_t_bool_to_t_bool_fromStack", + "nodeType": "YulIdentifier", + "src": "1440:37:97" + }, + "nodeType": "YulFunctionCall", + "src": "1440:65:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1440:65:97" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1366:9:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1378:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1389:4:97", + "type": "" + } + ], + "src": "1302:210:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1577:40:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1588:22:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1604:5:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "1598:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "1598:12:97" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1588:6:97" + } + ] + } + ] + }, + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1560:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1570:6:97", + "type": "" + } + ], + "src": "1518:99:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1719:73:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1736:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1741:6:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1729:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1729:19:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1729:19:97" + }, + { + "nodeType": "YulAssignment", + "src": "1757:29:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1776:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1781:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1772:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1772:14:97" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1757:11:97" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1691:3:97", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1696:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1707:11:97", + "type": "" + } + ], + "src": "1623:169:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1847:258:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1857:10:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1866:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nodeType": "YulTypedName", + "src": "1861:1:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1926:63:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "1951:3:97" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1956:1:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1947:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1947:11:97" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "1970:3:97" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1975:1:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1966:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1966:11:97" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "1960:5:97" + }, + "nodeType": "YulFunctionCall", + "src": "1960:18:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1940:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "1940:39:97" + }, + "nodeType": "YulExpressionStatement", + "src": "1940:39:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1887:1:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1890:6:97" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1884:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "1884:13:97" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "1898:19:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1900:15:97", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1909:1:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1912:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1905:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "1905:10:97" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "1900:1:97" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "1880:3:97", + "statements": [] + }, + "src": "1876:113:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2023:76:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "2073:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2078:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2069:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2069:16:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2087:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2062:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2062:27:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2062:27:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "2004:1:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2007:6:97" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "2001:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "2001:13:97" + }, + "nodeType": "YulIf", + "src": "1998:101:97" + } + ] + }, + "name": "copy_memory_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "1829:3:97", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "1834:3:97", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1839:6:97", + "type": "" + } + ], + "src": "1798:307:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2159:54:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2169:38:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2187:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2194:2:97", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2183:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2183:14:97" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2203:2:97", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "2199:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2199:7:97" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "2179:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2179:28:97" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2169:6:97" + } + ] + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2142:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "2152:6:97", + "type": "" + } + ], + "src": "2111:102:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2311:272:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "2321:53:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2368:5:97" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "2335:32:97" + }, + "nodeType": "YulFunctionCall", + "src": "2335:39:97" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2325:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2383:78:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2449:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2454:6:97" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2390:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "2390:71:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2383:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2496:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2503:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2492:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2492:16:97" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2510:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2515:6:97" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "2470:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "2470:52:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2470:52:97" + }, + { + "nodeType": "YulAssignment", + "src": "2531:46:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2542:3:97" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2569:6:97" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "2547:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "2547:29:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2538:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2538:39:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2531:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2292:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2299:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2307:3:97", + "type": "" + } + ], + "src": "2219:364:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2707:195:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2717:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2729:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2740:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2725:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2725:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2717:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2764:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2775:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2760:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2760:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2783:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2789:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2779:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2779:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2753:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "2753:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "2753:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "2809:86:97", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2881:6:97" + }, + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2890:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2817:63:97" + }, + "nodeType": "YulFunctionCall", + "src": "2817:78:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2809:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2679:9:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2691:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2702:4:97", + "type": "" + } + ], + "src": "2589:313:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2953:81:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2963:65:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2978:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2985:42:97", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "2974:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "2974:54:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "2963:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2935:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "2945:7:97", + "type": "" + } + ], + "src": "2908:126:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3085:51:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3095:35:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3124:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "3106:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "3106:24:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "3095:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3067:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "3077:7:97", + "type": "" + } + ], + "src": "3040:96:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3185:79:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3242:16:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3251:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3254:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "3244:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "3244:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3244:12:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3208:5:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3233:5:97" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "3215:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "3215:24:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "3205:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "3205:35:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "3198:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "3198:43:97" + }, + "nodeType": "YulIf", + "src": "3195:63:97" + } + ] + }, + "name": "validator_revert_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3178:5:97", + "type": "" + } + ], + "src": "3142:122:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3322:87:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3332:29:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3354:6:97" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "3341:12:97" + }, + "nodeType": "YulFunctionCall", + "src": "3341:20:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3332:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3397:5:97" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "3370:26:97" + }, + "nodeType": "YulFunctionCall", + "src": "3370:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3370:33:97" + } + ] + }, + "name": "abi_decode_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "3300:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "3308:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3316:5:97", + "type": "" + } + ], + "src": "3270:139:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3460:32:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3470:16:97", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3481:5:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "3470:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3442:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "3452:7:97", + "type": "" + } + ], + "src": "3415:77:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3541:79:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3598:16:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3607:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3610:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "3600:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "3600:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3600:12:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3564:5:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3589:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "3571:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "3571:24:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "3561:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "3561:35:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "3554:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "3554:43:97" + }, + "nodeType": "YulIf", + "src": "3551:63:97" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3534:5:97", + "type": "" + } + ], + "src": "3498:122:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3678:87:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3688:29:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "3710:6:97" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "3697:12:97" + }, + "nodeType": "YulFunctionCall", + "src": "3697:20:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3688:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3753:5:97" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "3726:26:97" + }, + "nodeType": "YulFunctionCall", + "src": "3726:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3726:33:97" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "3656:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "3664:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3672:5:97", + "type": "" + } + ], + "src": "3626:139:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3854:391:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3900:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "3902:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "3902:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "3902:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "3875:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3884:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3871:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3871:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3896:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "3867:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "3867:32:97" + }, + "nodeType": "YulIf", + "src": "3864:119:97" + }, + { + "nodeType": "YulBlock", + "src": "3993:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "4008:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4022:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "4012:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "4037:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4072:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "4083:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4068:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4068:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "4092:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "4047:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "4047:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "4037:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "4120:118:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "4135:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4149:2:97", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "4139:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "4165:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4200:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "4211:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4196:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4196:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "4220:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "4175:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "4175:53:97" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "4165:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3816:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "3827:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "3839:6:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "3847:6:97", + "type": "" + } + ], + "src": "3771:474:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4316:53:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4333:3:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4356:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "4338:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "4338:24:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4326:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "4326:37:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4326:37:97" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "4304:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "4311:3:97", + "type": "" + } + ], + "src": "4251:118:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4473:124:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4483:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4495:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4506:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4491:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4491:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4483:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "4563:6:97" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4576:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4587:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4572:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4572:17:97" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "4519:43:97" + }, + "nodeType": "YulFunctionCall", + "src": "4519:71:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4519:71:97" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4445:9:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "4457:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "4468:4:97", + "type": "" + } + ], + "src": "4375:222:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4669:263:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4715:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "4717:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "4717:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "4717:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "4690:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4699:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "4686:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4686:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4711:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "4682:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4682:32:97" + }, + "nodeType": "YulIf", + "src": "4679:119:97" + }, + { + "nodeType": "YulBlock", + "src": "4808:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "4823:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4837:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "4827:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "4852:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4887:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "4898:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4883:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "4883:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "4907:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "4862:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "4862:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "4852:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4639:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "4650:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "4662:6:97", + "type": "" + } + ], + "src": "4603:329:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5038:519:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5084:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "5086:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "5086:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "5086:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "5059:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5068:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "5055:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5055:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5080:2:97", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "5051:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5051:32:97" + }, + "nodeType": "YulIf", + "src": "5048:119:97" + }, + { + "nodeType": "YulBlock", + "src": "5177:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "5192:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5206:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "5196:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "5221:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5256:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "5267:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5252:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5252:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "5276:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "5231:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "5231:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "5221:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "5304:118:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "5319:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5333:2:97", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "5323:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "5349:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5384:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "5395:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5380:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5380:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "5404:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "5359:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "5359:53:97" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "5349:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "5432:118:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "5447:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5461:2:97", + "type": "", + "value": "64" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "5451:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "5477:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5512:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "5523:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5508:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5508:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "5532:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "5487:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "5487:53:97" + }, + "variableNames": [ + { + "name": "value2", + "nodeType": "YulIdentifier", + "src": "5477:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_addresst_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4992:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "5003:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "5015:6:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "5023:6:97", + "type": "" + }, + { + "name": "value2", + "nodeType": "YulTypedName", + "src": "5031:6:97", + "type": "" + } + ], + "src": "4938:619:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5608:32:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5618:16:97", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5629:5:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "5618:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_bytes32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "5590:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "5600:7:97", + "type": "" + } + ], + "src": "5563:77:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5689:79:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5746:16:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5755:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5758:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5748:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "5748:12:97" + }, + "nodeType": "YulExpressionStatement", + "src": "5748:12:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5712:5:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5737:5:97" + } + ], + "functionName": { + "name": "cleanup_t_bytes32", + "nodeType": "YulIdentifier", + "src": "5719:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "5719:24:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "5709:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "5709:35:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "5702:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "5702:43:97" + }, + "nodeType": "YulIf", + "src": "5699:63:97" + } + ] + }, + "name": "validator_revert_t_bytes32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "5682:5:97", + "type": "" + } + ], + "src": "5646:122:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5826:87:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5836:29:97", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "5858:6:97" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "5845:12:97" + }, + "nodeType": "YulFunctionCall", + "src": "5845:20:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5836:5:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5901:5:97" + } + ], + "functionName": { + "name": "validator_revert_t_bytes32", + "nodeType": "YulIdentifier", + "src": "5874:26:97" + }, + "nodeType": "YulFunctionCall", + "src": "5874:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "5874:33:97" + } + ] + }, + "name": "abi_decode_t_bytes32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "5804:6:97", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "5812:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "5820:5:97", + "type": "" + } + ], + "src": "5774:139:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5985:263:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6031:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "6033:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "6033:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "6033:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "6006:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6015:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "6002:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6002:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6027:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "5998:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "5998:32:97" + }, + "nodeType": "YulIf", + "src": "5995:119:97" + }, + { + "nodeType": "YulBlock", + "src": "6124:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "6139:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6153:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "6143:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "6168:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6203:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "6214:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6199:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6199:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "6223:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_bytes32", + "nodeType": "YulIdentifier", + "src": "6178:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "6178:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "6168:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "5955:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "5966:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "5978:6:97", + "type": "" + } + ], + "src": "5919:329:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6319:53:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "6336:3:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "6359:5:97" + } + ], + "functionName": { + "name": "cleanup_t_bytes32", + "nodeType": "YulIdentifier", + "src": "6341:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "6341:24:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "6329:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "6329:37:97" + }, + "nodeType": "YulExpressionStatement", + "src": "6329:37:97" + } + ] + }, + "name": "abi_encode_t_bytes32_to_t_bytes32_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "6307:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "6314:3:97", + "type": "" + } + ], + "src": "6254:118:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6476:124:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6486:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6498:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6509:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6494:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6494:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6486:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "6566:6:97" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6579:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6590:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6575:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6575:17:97" + } + ], + "functionName": { + "name": "abi_encode_t_bytes32_to_t_bytes32_fromStack", + "nodeType": "YulIdentifier", + "src": "6522:43:97" + }, + "nodeType": "YulFunctionCall", + "src": "6522:71:97" + }, + "nodeType": "YulExpressionStatement", + "src": "6522:71:97" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "6448:9:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "6460:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "6471:4:97", + "type": "" + } + ], + "src": "6378:222:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6689:391:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6735:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "6737:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "6737:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "6737:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "6710:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6719:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "6706:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6706:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6731:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "6702:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6702:32:97" + }, + "nodeType": "YulIf", + "src": "6699:119:97" + }, + { + "nodeType": "YulBlock", + "src": "6828:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "6843:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6857:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "6847:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "6872:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6907:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "6918:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6903:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "6903:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "6927:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_bytes32", + "nodeType": "YulIdentifier", + "src": "6882:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "6882:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "6872:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "6955:118:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "6970:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6984:2:97", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "6974:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "7000:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7035:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "7046:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7031:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7031:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7055:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "7010:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "7010:53:97" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "7000:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bytes32t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "6651:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "6662:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "6674:6:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "6682:6:97", + "type": "" + } + ], + "src": "6606:474:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7129:43:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7139:27:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "7154:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7161:4:97", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "7150:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7150:16:97" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "7139:7:97" + } + ] + } + ] + }, + "name": "cleanup_t_uint8", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "7111:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "7121:7:97", + "type": "" + } + ], + "src": "7086:86:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7239:51:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "7256:3:97" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "7277:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint8", + "nodeType": "YulIdentifier", + "src": "7261:15:97" + }, + "nodeType": "YulFunctionCall", + "src": "7261:22:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "7249:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "7249:35:97" + }, + "nodeType": "YulExpressionStatement", + "src": "7249:35:97" + } + ] + }, + "name": "abi_encode_t_uint8_to_t_uint8_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "7227:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "7234:3:97", + "type": "" + } + ], + "src": "7178:112:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7390:120:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7400:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7412:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7423:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7408:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7408:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "7400:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "7476:6:97" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7489:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7500:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7485:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7485:17:97" + } + ], + "functionName": { + "name": "abi_encode_t_uint8_to_t_uint8_fromStack", + "nodeType": "YulIdentifier", + "src": "7436:39:97" + }, + "nodeType": "YulFunctionCall", + "src": "7436:67:97" + }, + "nodeType": "YulExpressionStatement", + "src": "7436:67:97" + } + ] + }, + "name": "abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "7362:9:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "7374:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "7385:4:97", + "type": "" + } + ], + "src": "7296:214:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7582:263:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7628:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "7630:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "7630:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "7630:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7603:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7612:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "7599:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7599:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7624:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "7595:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7595:32:97" + }, + "nodeType": "YulIf", + "src": "7592:119:97" + }, + { + "nodeType": "YulBlock", + "src": "7721:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "7736:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7750:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "7740:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "7765:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7800:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "7811:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7796:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7796:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7820:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "7775:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "7775:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "7765:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "7552:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "7563:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "7575:6:97", + "type": "" + } + ], + "src": "7516:329:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7934:391:97", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7980:83:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "7982:77:97" + }, + "nodeType": "YulFunctionCall", + "src": "7982:79:97" + }, + "nodeType": "YulExpressionStatement", + "src": "7982:79:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7955:7:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7964:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "7951:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7951:23:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7976:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "7947:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "7947:32:97" + }, + "nodeType": "YulIf", + "src": "7944:119:97" + }, + { + "nodeType": "YulBlock", + "src": "8073:117:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "8088:15:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8102:1:97", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "8092:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "8117:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "8152:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "8163:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8148:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8148:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "8172:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "8127:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "8127:53:97" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "8117:6:97" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "8200:118:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "8215:16:97", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8229:2:97", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "8219:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "8245:63:97", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "8280:9:97" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "8291:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8276:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8276:22:97" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "8300:7:97" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "8255:20:97" + }, + "nodeType": "YulFunctionCall", + "src": "8255:53:97" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "8245:6:97" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "7896:9:97", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "7907:7:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "7919:6:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "7927:6:97", + "type": "" + } + ], + "src": "7851:474:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8359:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8376:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8379:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "8369:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "8369:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "8369:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8473:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8476:4:97", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "8466:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "8466:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "8466:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8497:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8500:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "8490:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "8490:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "8490:15:97" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "8331:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8568:269:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8578:22:97", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "8592:4:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8598:1:97", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "8588:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8588:12:97" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8578:6:97" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "8609:38:97", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "8639:4:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8645:1:97", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "8635:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8635:12:97" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "8613:18:97", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8686:51:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8700:27:97", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8714:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8722:4:97", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "8710:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8710:17:97" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8700:6:97" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "8666:18:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "8659:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "8659:26:97" + }, + "nodeType": "YulIf", + "src": "8656:81:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8789:42:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "8803:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "8803:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "8803:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "8753:18:97" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8776:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8784:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8773:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "8773:14:97" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "8750:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "8750:38:97" + }, + "nodeType": "YulIf", + "src": "8747:84:97" + } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "8552:4:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "8561:6:97", + "type": "" + } + ], + "src": "8517:320:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8949:128:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "8971:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8979:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8967:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "8967:14:97" + }, + { + "hexValue": "416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e6365", + "kind": "string", + "nodeType": "YulLiteral", + "src": "8983:34:97", + "type": "", + "value": "AccessControl: can only renounce" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "8960:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "8960:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "8960:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "9039:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9047:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9035:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "9035:15:97" + }, + { + "hexValue": "20726f6c657320666f722073656c66", + "kind": "string", + "nodeType": "YulLiteral", + "src": "9052:17:97", + "type": "", + "value": " roles for self" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "9028:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "9028:42:97" + }, + "nodeType": "YulExpressionStatement", + "src": "9028:42:97" + } + ] + }, + "name": "store_literal_in_memory_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "8941:6:97", + "type": "" + } + ], + "src": "8843:234:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9229:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9239:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "9305:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9310:2:97", + "type": "", + "value": "47" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "9246:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "9246:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "9239:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "9411:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", + "nodeType": "YulIdentifier", + "src": "9322:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "9322:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "9322:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "9424:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "9435:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9440:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9431:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "9431:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "9424:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "9217:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "9225:3:97", + "type": "" + } + ], + "src": "9083:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9626:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9636:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "9648:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9659:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9644:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "9644:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "9636:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "9683:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9694:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9679:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "9679:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "9702:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "9708:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "9698:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "9698:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "9672:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "9672:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "9672:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "9728:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "9862:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "9736:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "9736:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "9728:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "9606:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "9621:4:97", + "type": "" + } + ], + "src": "9455:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9908:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9925:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9928:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "9918:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "9918:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "9918:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10022:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10025:4:97", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "10015:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "10015:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "10015:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10046:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10049:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "10039:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "10039:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "10039:15:97" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "9880:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10110:261:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10120:25:97", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10143:1:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10125:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "10125:20:97" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10120:1:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "10154:25:97", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10177:1:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10159:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "10159:20:97" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10154:1:97" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10317:22:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "10319:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "10319:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "10319:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10238:1:97" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10245:66:97", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10313:1:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "10241:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "10241:74:97" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "10235:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "10235:81:97" + }, + "nodeType": "YulIf", + "src": "10232:107:97" + }, + { + "nodeType": "YulAssignment", + "src": "10349:16:97", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10360:1:97" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10363:1:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "10356:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "10356:9:97" + }, + "variableNames": [ + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "10349:3:97" + } + ] + } + ] + }, + "name": "checked_add_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "10097:1:97", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "10100:1:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nodeType": "YulTypedName", + "src": "10106:3:97", + "type": "" + } + ], + "src": "10066:305:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10483:67:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "10505:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10513:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "10501:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "10501:14:97" + }, + { + "hexValue": "4578636565642074686520746f74616c20737570706c79", + "kind": "string", + "nodeType": "YulLiteral", + "src": "10517:25:97", + "type": "", + "value": "Exceed the total supply" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "10494:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "10494:49:97" + }, + "nodeType": "YulExpressionStatement", + "src": "10494:49:97" + } + ] + }, + "name": "store_literal_in_memory_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "10475:6:97", + "type": "" + } + ], + "src": "10377:173:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10702:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10712:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "10778:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10783:2:97", + "type": "", + "value": "23" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "10719:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "10719:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "10712:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "10884:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1", + "nodeType": "YulIdentifier", + "src": "10795:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "10795:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "10795:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "10897:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "10908:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10913:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "10904:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "10904:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "10897:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "10690:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "10698:3:97", + "type": "" + } + ], + "src": "10556:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11099:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11109:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "11121:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11132:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11117:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11117:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "11109:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "11156:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11167:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11152:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11152:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "11175:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "11181:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "11171:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11171:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11145:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "11145:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "11145:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "11201:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "11335:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "11209:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "11209:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "11201:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "11079:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "11094:4:97", + "type": "" + } + ], + "src": "10928:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11459:118:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "11481:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11489:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11477:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11477:14:97" + }, + { + "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77", + "kind": "string", + "nodeType": "YulLiteral", + "src": "11493:34:97", + "type": "", + "value": "ERC20: decreased allowance below" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11470:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "11470:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "11470:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "11549:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11557:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11545:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11545:15:97" + }, + { + "hexValue": "207a65726f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "11562:7:97", + "type": "", + "value": " zero" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11538:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "11538:32:97" + }, + "nodeType": "YulExpressionStatement", + "src": "11538:32:97" + } + ] + }, + "name": "store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "11451:6:97", + "type": "" + } + ], + "src": "11353:224:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11729:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11739:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11805:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11810:2:97", + "type": "", + "value": "37" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "11746:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "11746:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11739:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11911:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "nodeType": "YulIdentifier", + "src": "11822:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "11822:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "11822:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "11924:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11935:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11940:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11931:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "11931:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "11924:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "11717:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "11725:3:97", + "type": "" + } + ], + "src": "11583:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12126:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12136:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12148:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12159:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12144:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12144:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12136:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12183:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12194:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12179:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12179:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12202:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12208:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "12198:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12198:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12172:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "12172:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "12172:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "12228:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12362:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "12236:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "12236:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12228:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "12106:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "12121:4:97", + "type": "" + } + ], + "src": "11955:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12486:117:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "12508:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12516:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12504:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12504:14:97" + }, + { + "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f20616464", + "kind": "string", + "nodeType": "YulLiteral", + "src": "12520:34:97", + "type": "", + "value": "ERC20: approve from the zero add" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12497:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "12497:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "12497:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "12576:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12584:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12572:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12572:15:97" + }, + { + "hexValue": "72657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "12589:6:97", + "type": "", + "value": "ress" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12565:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "12565:31:97" + }, + "nodeType": "YulExpressionStatement", + "src": "12565:31:97" + } + ] + }, + "name": "store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "12478:6:97", + "type": "" + } + ], + "src": "12380:223:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12755:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12765:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "12831:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12836:2:97", + "type": "", + "value": "36" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "12772:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "12772:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "12765:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "12937:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "nodeType": "YulIdentifier", + "src": "12848:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "12848:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "12848:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "12950:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "12961:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12966:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12957:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "12957:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "12950:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "12743:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "12751:3:97", + "type": "" + } + ], + "src": "12609:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13152:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "13162:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13174:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13185:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13170:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13170:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13162:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13209:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13220:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13205:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13205:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13228:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13234:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "13224:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13224:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13198:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "13198:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "13198:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "13254:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13388:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "13262:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "13262:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13254:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "13132:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "13147:4:97", + "type": "" + } + ], + "src": "12981:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13512:115:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "13534:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13542:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13530:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13530:14:97" + }, + { + "hexValue": "45524332303a20617070726f766520746f20746865207a65726f206164647265", + "kind": "string", + "nodeType": "YulLiteral", + "src": "13546:34:97", + "type": "", + "value": "ERC20: approve to the zero addre" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13523:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "13523:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "13523:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "13602:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13610:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13598:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13598:15:97" + }, + { + "hexValue": "7373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "13615:4:97", + "type": "", + "value": "ss" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13591:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "13591:29:97" + }, + "nodeType": "YulExpressionStatement", + "src": "13591:29:97" + } + ] + }, + "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "13504:6:97", + "type": "" + } + ], + "src": "13406:221:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13779:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "13789:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13855:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13860:2:97", + "type": "", + "value": "34" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "13796:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "13796:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13789:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13961:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "nodeType": "YulIdentifier", + "src": "13872:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "13872:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "13872:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "13974:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13985:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13990:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13981:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "13981:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "13974:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "13767:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "13775:3:97", + "type": "" + } + ], + "src": "13633:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14176:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "14186:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14198:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14209:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14194:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "14194:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14186:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14233:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14244:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14229:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "14229:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14252:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14258:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "14248:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "14248:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "14222:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "14222:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "14222:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "14278:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14412:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "14286:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "14286:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14278:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "14156:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "14171:4:97", + "type": "" + } + ], + "src": "14005:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14536:73:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "14558:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14566:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14554:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "14554:14:97" + }, + { + "hexValue": "45524332303a20696e73756666696369656e7420616c6c6f77616e6365", + "kind": "string", + "nodeType": "YulLiteral", + "src": "14570:31:97", + "type": "", + "value": "ERC20: insufficient allowance" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "14547:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "14547:55:97" + }, + "nodeType": "YulExpressionStatement", + "src": "14547:55:97" + } + ] + }, + "name": "store_literal_in_memory_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "14528:6:97", + "type": "" + } + ], + "src": "14430:179:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14761:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "14771:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14837:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14842:2:97", + "type": "", + "value": "29" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "14778:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "14778:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14771:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14943:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe", + "nodeType": "YulIdentifier", + "src": "14854:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "14854:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "14854:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "14956:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14967:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14972:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14963:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "14963:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "14956:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "14749:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "14757:3:97", + "type": "" + } + ], + "src": "14615:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "15158:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "15168:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15180:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15191:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15176:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15176:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15168:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15215:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15226:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15211:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15211:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15234:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15240:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "15230:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15230:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "15204:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "15204:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "15204:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "15260:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15394:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "15268:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "15268:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15260:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "15138:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "15153:4:97", + "type": "" + } + ], + "src": "14987:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "15518:118:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "15540:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15548:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15536:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15536:14:97" + }, + { + "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f206164", + "kind": "string", + "nodeType": "YulLiteral", + "src": "15552:34:97", + "type": "", + "value": "ERC20: transfer from the zero ad" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "15529:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "15529:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "15529:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "15608:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15616:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15604:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15604:15:97" + }, + { + "hexValue": "6472657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "15621:7:97", + "type": "", + "value": "dress" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "15597:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "15597:32:97" + }, + "nodeType": "YulExpressionStatement", + "src": "15597:32:97" + } + ] + }, + "name": "store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "15510:6:97", + "type": "" + } + ], + "src": "15412:224:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "15788:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "15798:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15864:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15869:2:97", + "type": "", + "value": "37" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "15805:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "15805:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15798:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15970:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "nodeType": "YulIdentifier", + "src": "15881:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "15881:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "15881:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "15983:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15994:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15999:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15990:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "15990:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "15983:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "15776:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "15784:3:97", + "type": "" + } + ], + "src": "15642:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16185:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "16195:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16207:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16218:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16203:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "16203:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "16195:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16242:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16253:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16238:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "16238:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "16261:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16267:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "16257:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "16257:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "16231:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "16231:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "16231:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "16287:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "16421:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "16295:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "16295:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "16287:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "16165:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "16180:4:97", + "type": "" + } + ], + "src": "16014:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16545:116:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "16567:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16575:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16563:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "16563:14:97" + }, + { + "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472", + "kind": "string", + "nodeType": "YulLiteral", + "src": "16579:34:97", + "type": "", + "value": "ERC20: transfer to the zero addr" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "16556:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "16556:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "16556:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "16635:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16643:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16631:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "16631:15:97" + }, + { + "hexValue": "657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "16648:5:97", + "type": "", + "value": "ess" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "16624:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "16624:30:97" + }, + "nodeType": "YulExpressionStatement", + "src": "16624:30:97" + } + ] + }, + "name": "store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "16537:6:97", + "type": "" + } + ], + "src": "16439:222:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16813:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "16823:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16889:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16894:2:97", + "type": "", + "value": "35" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "16830:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "16830:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16823:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16995:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "nodeType": "YulIdentifier", + "src": "16906:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "16906:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "16906:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "17008:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17019:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17024:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17015:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17015:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "17008:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "16801:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "16809:3:97", + "type": "" + } + ], + "src": "16667:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17210:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "17220:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17232:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17243:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17228:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17228:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17220:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17267:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17278:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17263:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17263:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17286:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17292:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "17282:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17282:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "17256:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "17256:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "17256:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "17312:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17446:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "17320:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "17320:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17312:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "17190:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "17205:4:97", + "type": "" + } + ], + "src": "17039:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17570:119:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "17592:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17600:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17588:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17588:14:97" + }, + { + "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062", + "kind": "string", + "nodeType": "YulLiteral", + "src": "17604:34:97", + "type": "", + "value": "ERC20: transfer amount exceeds b" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "17581:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "17581:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "17581:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "17660:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17668:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17656:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "17656:15:97" + }, + { + "hexValue": "616c616e6365", + "kind": "string", + "nodeType": "YulLiteral", + "src": "17673:8:97", + "type": "", + "value": "alance" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "17649:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "17649:33:97" + }, + "nodeType": "YulExpressionStatement", + "src": "17649:33:97" + } + ] + }, + "name": "store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "17562:6:97", + "type": "" + } + ], + "src": "17464:225:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17841:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "17851:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17917:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17922:2:97", + "type": "", + "value": "38" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "17858:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "17858:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17851:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "18023:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "nodeType": "YulIdentifier", + "src": "17934:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "17934:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "17934:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "18036:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "18047:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18052:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18043:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "18043:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "18036:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "17829:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "17837:3:97", + "type": "" + } + ], + "src": "17695:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18238:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "18248:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18260:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18271:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18256:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "18256:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18248:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18295:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18306:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18291:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "18291:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18314:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18320:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "18310:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "18310:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "18284:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "18284:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "18284:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "18340:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18474:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "18348:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "18348:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18340:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "18218:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "18233:4:97", + "type": "" + } + ], + "src": "18067:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18598:75:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "18620:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18628:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18616:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "18616:14:97" + }, + { + "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "18632:33:97", + "type": "", + "value": "ERC20: mint to the zero address" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "18609:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "18609:57:97" + }, + "nodeType": "YulExpressionStatement", + "src": "18609:57:97" + } + ] + }, + "name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "18590:6:97", + "type": "" + } + ], + "src": "18492:181:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18825:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "18835:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "18901:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18906:2:97", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "18842:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "18842:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "18835:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19007:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "nodeType": "YulIdentifier", + "src": "18918:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "18918:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "18918:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "19020:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19031:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19036:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19027:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19027:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "19020:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "18813:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "18821:3:97", + "type": "" + } + ], + "src": "18679:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19222:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "19232:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19244:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19255:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19240:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19240:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19232:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19279:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19290:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19275:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19275:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19298:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19304:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "19294:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19294:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "19268:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "19268:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "19268:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "19324:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19458:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "19332:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "19332:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19324:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "19202:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "19217:4:97", + "type": "" + } + ], + "src": "19051:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19582:114:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "19604:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19612:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19600:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19600:14:97" + }, + { + "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f20616464726573", + "kind": "string", + "nodeType": "YulLiteral", + "src": "19616:34:97", + "type": "", + "value": "ERC20: burn from the zero addres" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "19593:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "19593:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "19593:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "19672:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19680:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19668:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "19668:15:97" + }, + { + "hexValue": "73", + "kind": "string", + "nodeType": "YulLiteral", + "src": "19685:3:97", + "type": "", + "value": "s" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "19661:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "19661:28:97" + }, + "nodeType": "YulExpressionStatement", + "src": "19661:28:97" + } + ] + }, + "name": "store_literal_in_memory_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "19574:6:97", + "type": "" + } + ], + "src": "19476:220:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19848:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "19858:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19924:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19929:2:97", + "type": "", + "value": "33" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "19865:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "19865:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19858:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20030:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "nodeType": "YulIdentifier", + "src": "19941:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "19941:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "19941:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "20043:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20054:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20059:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20050:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20050:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "20043:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "19836:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "19844:3:97", + "type": "" + } + ], + "src": "19702:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20245:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "20255:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20267:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20278:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20263:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20263:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20255:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20302:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20313:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20298:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20298:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20321:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20327:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "20317:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20317:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "20291:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "20291:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "20291:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "20347:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20481:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "20355:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "20355:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20347:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "20225:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "20240:4:97", + "type": "" + } + ], + "src": "20074:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20605:115:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "20627:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20635:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20623:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20623:14:97" + }, + { + "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "20639:34:97", + "type": "", + "value": "ERC20: burn amount exceeds balan" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "20616:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "20616:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "20616:58:97" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "20695:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20703:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20691:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "20691:15:97" + }, + { + "hexValue": "6365", + "kind": "string", + "nodeType": "YulLiteral", + "src": "20708:4:97", + "type": "", + "value": "ce" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "20684:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "20684:29:97" + }, + "nodeType": "YulExpressionStatement", + "src": "20684:29:97" + } + ] + }, + "name": "store_literal_in_memory_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "20597:6:97", + "type": "" + } + ], + "src": "20499:221:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20872:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "20882:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20948:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20953:2:97", + "type": "", + "value": "34" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "20889:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "20889:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20882:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21054:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "nodeType": "YulIdentifier", + "src": "20965:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "20965:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "20965:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "21067:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21078:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21083:2:97", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21074:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "21074:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "21067:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "20860:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "20868:3:97", + "type": "" + } + ], + "src": "20726:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21269:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "21279:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21291:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21302:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21287:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "21287:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21279:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21326:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21337:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21322:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "21322:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21345:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21351:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "21341:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "21341:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "21315:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "21315:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "21315:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "21371:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21505:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "21379:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "21379:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21371:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "21249:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "21264:4:97", + "type": "" + } + ], + "src": "21098:419:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21637:34:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "21647:18:97", + "value": { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21662:3:97" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "21647:11:97" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "21609:3:97", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "21614:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "21625:11:97", + "type": "" + } + ], + "src": "21523:148:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21783:67:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "21805:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21813:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21801:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "21801:14:97" + }, + { + "hexValue": "416363657373436f6e74726f6c3a206163636f756e7420", + "kind": "string", + "nodeType": "YulLiteral", + "src": "21817:25:97", + "type": "", + "value": "AccessControl: account " + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "21794:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "21794:49:97" + }, + "nodeType": "YulExpressionStatement", + "src": "21794:49:97" + } + ] + }, + "name": "store_literal_in_memory_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "21775:6:97", + "type": "" + } + ], + "src": "21677:173:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22020:238:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "22030:92:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22114:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22119:2:97", + "type": "", + "value": "23" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "22037:76:97" + }, + "nodeType": "YulFunctionCall", + "src": "22037:85:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22030:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22220:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874", + "nodeType": "YulIdentifier", + "src": "22131:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "22131:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "22131:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "22233:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22244:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22249:2:97", + "type": "", + "value": "23" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22240:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "22240:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "22233:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "22008:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "22016:3:97", + "type": "" + } + ], + "src": "21856:402:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22374:267:97", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "22384:53:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "22431:5:97" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "22398:32:97" + }, + "nodeType": "YulFunctionCall", + "src": "22398:39:97" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "22388:6:97", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "22446:96:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22530:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "22535:6:97" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "22453:76:97" + }, + "nodeType": "YulFunctionCall", + "src": "22453:89:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22446:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "22577:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22584:4:97", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22573:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "22573:16:97" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22591:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "22596:6:97" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "22551:21:97" + }, + "nodeType": "YulFunctionCall", + "src": "22551:52:97" + }, + "nodeType": "YulExpressionStatement", + "src": "22551:52:97" + }, + { + "nodeType": "YulAssignment", + "src": "22612:23:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22623:3:97" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "22628:6:97" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22619:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "22619:16:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "22612:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "22355:5:97", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "22362:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "22370:3:97", + "type": "" + } + ], + "src": "22264:377:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22753:61:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "22775:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22783:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22771:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "22771:14:97" + }, + { + "hexValue": "206973206d697373696e6720726f6c6520", + "kind": "string", + "nodeType": "YulLiteral", + "src": "22787:19:97", + "type": "", + "value": " is missing role " + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "22764:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "22764:43:97" + }, + "nodeType": "YulExpressionStatement", + "src": "22764:43:97" + } + ] + }, + "name": "store_literal_in_memory_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "22745:6:97", + "type": "" + } + ], + "src": "22647:167:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22984:238:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "22994:92:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23078:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23083:2:97", + "type": "", + "value": "17" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "23001:76:97" + }, + "nodeType": "YulFunctionCall", + "src": "23001:85:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22994:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23184:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69", + "nodeType": "YulIdentifier", + "src": "23095:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "23095:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "23095:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "23197:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23208:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23213:2:97", + "type": "", + "value": "17" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23204:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "23204:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "23197:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "22972:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "22980:3:97", + "type": "" + } + ], + "src": "22820:402:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "23614:581:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "23625:155:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23776:3:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "23632:142:97" + }, + "nodeType": "YulFunctionCall", + "src": "23632:148:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23625:3:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "23790:102:97", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "23879:6:97" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23888:3:97" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "23797:81:97" + }, + "nodeType": "YulFunctionCall", + "src": "23797:95:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23790:3:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "23902:155:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "24053:3:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "23909:142:97" + }, + "nodeType": "YulFunctionCall", + "src": "23909:148:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23902:3:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "24067:102:97", + "value": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "24156:6:97" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "24165:3:97" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "24074:81:97" + }, + "nodeType": "YulFunctionCall", + "src": "24074:95:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "24067:3:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "24179:10:97", + "value": { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "24186:3:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "24179:3:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_t_string_memory_ptr_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "23585:3:97", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "23591:6:97", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "23599:6:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "23610:3:97", + "type": "" + } + ], + "src": "23228:967:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24249:300:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24259:25:97", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "24282:1:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "24264:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "24264:20:97" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "24259:1:97" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "24293:25:97", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "24316:1:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "24298:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "24298:20:97" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "24293:1:97" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24491:22:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "24493:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "24493:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24493:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "24403:1:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "24396:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24396:9:97" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "24389:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24389:17:97" + }, + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "24411:1:97" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24418:66:97", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "24486:1:97" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "24414:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "24414:74:97" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "24408:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "24408:81:97" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "24385:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "24385:105:97" + }, + "nodeType": "YulIf", + "src": "24382:131:97" + }, + { + "nodeType": "YulAssignment", + "src": "24523:20:97", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "24538:1:97" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "24541:1:97" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "24534:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "24534:9:97" + }, + "variableNames": [ + { + "name": "product", + "nodeType": "YulIdentifier", + "src": "24523:7:97" + } + ] + } + ] + }, + "name": "checked_mul_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "24232:1:97", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "24235:1:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "product", + "nodeType": "YulTypedName", + "src": "24241:7:97", + "type": "" + } + ], + "src": "24201:348:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24583:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24600:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24603:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24593:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24593:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24593:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24697:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24700:4:97", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24690:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24690:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24690:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24721:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24724:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "24714:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24714:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24714:15:97" + } + ] + }, + "name": "panic_error_0x41", + "nodeType": "YulFunctionDefinition", + "src": "24555:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24769:152:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24786:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24789:77:97", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24779:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24779:88:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24779:88:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24883:1:97", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24886:4:97", + "type": "", + "value": "0x32" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24876:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24876:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24876:15:97" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24907:1:97", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24910:4:97", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "24900:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "24900:15:97" + }, + "nodeType": "YulExpressionStatement", + "src": "24900:15:97" + } + ] + }, + "name": "panic_error_0x32", + "nodeType": "YulFunctionDefinition", + "src": "24741:180:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24970:128:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24980:33:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "25007:5:97" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "24989:17:97" + }, + "nodeType": "YulFunctionCall", + "src": "24989:24:97" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "24980:5:97" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25041:22:97", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "25043:16:97" + }, + "nodeType": "YulFunctionCall", + "src": "25043:18:97" + }, + "nodeType": "YulExpressionStatement", + "src": "25043:18:97" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "25028:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25035:4:97", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "25025:2:97" + }, + "nodeType": "YulFunctionCall", + "src": "25025:15:97" + }, + "nodeType": "YulIf", + "src": "25022:41:97" + }, + { + "nodeType": "YulAssignment", + "src": "25072:20:97", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "25083:5:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25090:1:97", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "25079:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25079:13:97" + }, + "variableNames": [ + { + "name": "ret", + "nodeType": "YulIdentifier", + "src": "25072:3:97" + } + ] + } + ] + }, + "name": "decrement_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "24956:5:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "ret", + "nodeType": "YulTypedName", + "src": "24966:3:97", + "type": "" + } + ], + "src": "24927:171:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25210:76:97", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "25232:6:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25240:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25228:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25228:14:97" + }, + { + "hexValue": "537472696e67733a20686578206c656e67746820696e73756666696369656e74", + "kind": "string", + "nodeType": "YulLiteral", + "src": "25244:34:97", + "type": "", + "value": "Strings: hex length insufficient" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "25221:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "25221:58:97" + }, + "nodeType": "YulExpressionStatement", + "src": "25221:58:97" + } + ] + }, + "name": "store_literal_in_memory_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "25202:6:97", + "type": "" + } + ], + "src": "25104:182:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25438:220:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "25448:74:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25514:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25519:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "25455:58:97" + }, + "nodeType": "YulFunctionCall", + "src": "25455:67:97" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25448:3:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25620:3:97" + } + ], + "functionName": { + "name": "store_literal_in_memory_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2", + "nodeType": "YulIdentifier", + "src": "25531:88:97" + }, + "nodeType": "YulFunctionCall", + "src": "25531:93:97" + }, + "nodeType": "YulExpressionStatement", + "src": "25531:93:97" + }, + { + "nodeType": "YulAssignment", + "src": "25633:19:97", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25644:3:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25649:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25640:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25640:12:97" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "25633:3:97" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "25426:3:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "25434:3:97", + "type": "" + } + ], + "src": "25292:366:97" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25835:248:97", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "25845:26:97", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "25857:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25868:2:97", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25853:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25853:18:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "25845:4:97" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "25892:9:97" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25903:1:97", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25888:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25888:17:97" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "25911:4:97" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "25917:9:97" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "25907:3:97" + }, + "nodeType": "YulFunctionCall", + "src": "25907:20:97" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "25881:6:97" + }, + "nodeType": "YulFunctionCall", + "src": "25881:47:97" + }, + "nodeType": "YulExpressionStatement", + "src": "25881:47:97" + }, + { + "nodeType": "YulAssignment", + "src": "25937:139:97", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "26071:4:97" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "25945:124:97" + }, + "nodeType": "YulFunctionCall", + "src": "25945:131:97" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "25937:4:97" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "25815:9:97", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "25830:4:97", + "type": "" + } + ], + "src": "25664:419:97" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_bytes4(value) -> cleaned {\n cleaned := and(value, 0xffffffff00000000000000000000000000000000000000000000000000000000)\n }\n\n function validator_revert_t_bytes4(value) {\n if iszero(eq(value, cleanup_t_bytes4(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_bytes4(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_bytes4(value)\n }\n\n function abi_decode_tuple_t_bytes4(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_bytes4(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_addresst_uint256(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_bytes32(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_bytes32(value) {\n if iszero(eq(value, cleanup_t_bytes32(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_bytes32(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_bytes32(value)\n }\n\n function abi_decode_tuple_t_bytes32(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_bytes32(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_bytes32_to_t_bytes32_fromStack(value, pos) {\n mstore(pos, cleanup_t_bytes32(value))\n }\n\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_decode_tuple_t_bytes32t_address(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_bytes32(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function abi_encode_t_uint8_to_t_uint8_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint8(value))\n }\n\n function abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint8_to_t_uint8_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_address(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function store_literal_in_memory_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b(memPtr) {\n\n mstore(add(memPtr, 0), \"AccessControl: can only renounce\")\n\n mstore(add(memPtr, 32), \" roles for self\")\n\n }\n\n function abi_encode_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 47)\n store_literal_in_memory_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function store_literal_in_memory_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1(memPtr) {\n\n mstore(add(memPtr, 0), \"Exceed the total supply\")\n\n }\n\n function abi_encode_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 23)\n store_literal_in_memory_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: decreased allowance below\")\n\n mstore(add(memPtr, 32), \" zero\")\n\n }\n\n function abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 37)\n store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve from the zero add\")\n\n mstore(add(memPtr, 32), \"ress\")\n\n }\n\n function abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 36)\n store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve to the zero addre\")\n\n mstore(add(memPtr, 32), \"ss\")\n\n }\n\n function abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 34)\n store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: insufficient allowance\")\n\n }\n\n function abi_encode_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 29)\n store_literal_in_memory_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_3b6607e091cba9325f958656d2b5e0622ab7dc0eac71a26ac788cb25bc19f4fe_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer from the zero ad\")\n\n mstore(add(memPtr, 32), \"dress\")\n\n }\n\n function abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 37)\n store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer to the zero addr\")\n\n mstore(add(memPtr, 32), \"ess\")\n\n }\n\n function abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer amount exceeds b\")\n\n mstore(add(memPtr, 32), \"alance\")\n\n }\n\n function abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 38)\n store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: mint to the zero address\")\n\n }\n\n function abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 31)\n store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: burn from the zero addres\")\n\n mstore(add(memPtr, 32), \"s\")\n\n }\n\n function abi_encode_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 33)\n store_literal_in_memory_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: burn amount exceeds balan\")\n\n mstore(add(memPtr, 32), \"ce\")\n\n }\n\n function abi_encode_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 34)\n store_literal_in_memory_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack(pos, length) -> updated_pos {\n updated_pos := pos\n }\n\n function store_literal_in_memory_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874(memPtr) {\n\n mstore(add(memPtr, 0), \"AccessControl: account \")\n\n }\n\n function abi_encode_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_to_t_string_memory_ptr_nonPadded_inplace_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack(pos, 23)\n store_literal_in_memory_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874(pos)\n end := add(pos, 23)\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, length)\n }\n\n function store_literal_in_memory_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69(memPtr) {\n\n mstore(add(memPtr, 0), \" is missing role \")\n\n }\n\n function abi_encode_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_to_t_string_memory_ptr_nonPadded_inplace_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_nonPadded_inplace_fromStack(pos, 17)\n store_literal_in_memory_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69(pos)\n end := add(pos, 17)\n }\n\n function abi_encode_tuple_packed_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_t_string_memory_ptr_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_t_string_memory_ptr__to_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr_t_string_memory_ptr__nonPadded_inplace_fromStack_reversed(pos , value1, value0) -> end {\n\n pos := abi_encode_t_stringliteral_da0d07ce4a2849fbfc4cb9d6f939e9bd93016c372ca4a5ff14fe06caf3d67874_to_t_string_memory_ptr_nonPadded_inplace_fromStack( pos)\n\n pos := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack(value0, pos)\n\n pos := abi_encode_t_stringliteral_f986ce851518a691bccd44ea42a5a185d1b866ef6cb07984a09b81694d20ab69_to_t_string_memory_ptr_nonPadded_inplace_fromStack( pos)\n\n pos := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_nonPadded_inplace_fromStack(value1, pos)\n\n end := pos\n }\n\n function checked_mul_t_uint256(x, y) -> product {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x != 0 and y > (maxValue / x)\n if and(iszero(iszero(x)), gt(y, div(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, x))) { panic_error_0x11() }\n\n product := mul(x, y)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function panic_error_0x32() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n\n function decrement_t_uint256(value) -> ret {\n value := cleanup_t_uint256(value)\n if eq(value, 0x00) { panic_error_0x11() }\n ret := sub(value, 1)\n }\n\n function store_literal_in_memory_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2(memPtr) {\n\n mstore(add(memPtr, 0), \"Strings: hex length insufficient\")\n\n }\n\n function abi_encode_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 32)\n store_literal_in_memory_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_04fc88320d7c9f639317c75102c103ff0044d3075a5c627e24e76e5bbb2733c2_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n", + "id": 97, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "247:819:83:-:0;;;409:240;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;508:5;515:7;2054:5:19;2046;:13;;;;;;;;;;;;:::i;:::-;;2079:7;2069;:17;;;;;;;;;;;;:::i;:::-;;1980:113;;530:42:83::1;2198:4:2;541:18:83::0;::::1;561:10;530;;;:42;;:::i;:::-;578:35;340:24;602:10;578;;;:35;;:::i;:::-;633:11;619:25;;;;::::0;::::1;409:240:::0;;;247:819;;6937:110:2;7015:25;7026:4;7032:7;7015:10;;;:25;;:::i;:::-;6937:110;;:::o;7587:233::-;7670:22;7678:4;7684:7;7670;;;:22;;:::i;:::-;7665:149;;7740:4;7708:6;:12;7715:4;7708:12;;;;;;;;;;;:20;;:29;7729:7;7708:29;;;;;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;7790:12;:10;;;:12;;:::i;:::-;7763:40;;7781:7;7763:40;;7775:4;7763:40;;;;;;;;;;7665:149;7587:233;;:::o;3021:145::-;3107:4;3130:6;:12;3137:4;3130:12;;;;;;;;;;;:20;;:29;3151:7;3130:29;;;;;;;;;;;;;;;;;;;;;;;;;3123:36;;3021:145;;;;:::o;640:96:35:-;693:7;719:10;712:17;;640:96;:::o;247:819:83:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:75:97:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:117;566:1;563;556:12;580:102;621:6;672:2;668:7;663:2;656:5;652:14;648:28;638:38;;580:102;;;:::o;688:180::-;736:77;733:1;726:88;833:4;830:1;823:15;857:4;854:1;847:15;874:281;957:27;979:4;957:27;:::i;:::-;949:6;945:40;1087:6;1075:10;1072:22;1051:18;1039:10;1036:34;1033:62;1030:88;;;1098:18;;:::i;:::-;1030:88;1138:10;1134:2;1127:22;917:238;874:281;;:::o;1161:129::-;1195:6;1222:20;;:::i;:::-;1212:30;;1251:33;1279:4;1271:6;1251:33;:::i;:::-;1161:129;;;:::o;1296:308::-;1358:4;1448:18;1440:6;1437:30;1434:56;;;1470:18;;:::i;:::-;1434:56;1508:29;1530:6;1508:29;:::i;:::-;1500:37;;1592:4;1586;1582:15;1574:23;;1296:308;;;:::o;1610:307::-;1678:1;1688:113;1702:6;1699:1;1696:13;1688:113;;;1787:1;1782:3;1778:11;1772:18;1768:1;1763:3;1759:11;1752:39;1724:2;1721:1;1717:10;1712:15;;1688:113;;;1819:6;1816:1;1813:13;1810:101;;;1899:1;1890:6;1885:3;1881:16;1874:27;1810:101;1659:258;1610:307;;;:::o;1923:421::-;2012:5;2037:66;2053:49;2095:6;2053:49;:::i;:::-;2037:66;:::i;:::-;2028:75;;2126:6;2119:5;2112:21;2164:4;2157:5;2153:16;2202:3;2193:6;2188:3;2184:16;2181:25;2178:112;;;2209:79;;:::i;:::-;2178:112;2299:39;2331:6;2326:3;2321;2299:39;:::i;:::-;2018:326;1923:421;;;;;:::o;2364:355::-;2431:5;2480:3;2473:4;2465:6;2461:17;2457:27;2447:122;;2488:79;;:::i;:::-;2447:122;2598:6;2592:13;2623:90;2709:3;2701:6;2694:4;2686:6;2682:17;2623:90;:::i;:::-;2614:99;;2437:282;2364:355;;;;:::o;2725:77::-;2762:7;2791:5;2780:16;;2725:77;;;:::o;2808:122::-;2881:24;2899:5;2881:24;:::i;:::-;2874:5;2871:35;2861:63;;2920:1;2917;2910:12;2861:63;2808:122;:::o;2936:143::-;2993:5;3024:6;3018:13;3009:22;;3040:33;3067:5;3040:33;:::i;:::-;2936:143;;;;:::o;3085:1009::-;3193:6;3201;3209;3258:2;3246:9;3237:7;3233:23;3229:32;3226:119;;;3264:79;;:::i;:::-;3226:119;3405:1;3394:9;3390:17;3384:24;3435:18;3427:6;3424:30;3421:117;;;3457:79;;:::i;:::-;3421:117;3562:74;3628:7;3619:6;3608:9;3604:22;3562:74;:::i;:::-;3552:84;;3355:291;3706:2;3695:9;3691:18;3685:25;3737:18;3729:6;3726:30;3723:117;;;3759:79;;:::i;:::-;3723:117;3864:74;3930:7;3921:6;3910:9;3906:22;3864:74;:::i;:::-;3854:84;;3656:292;3987:2;4013:64;4069:7;4060:6;4049:9;4045:22;4013:64;:::i;:::-;4003:74;;3958:129;3085:1009;;;;;:::o;4100:180::-;4148:77;4145:1;4138:88;4245:4;4242:1;4235:15;4269:4;4266:1;4259:15;4286:320;4330:6;4367:1;4361:4;4357:12;4347:22;;4414:1;4408:4;4404:12;4435:18;4425:81;;4491:4;4483:6;4479:17;4469:27;;4425:81;4553:2;4545:6;4542:14;4522:18;4519:38;4516:84;;;4572:18;;:::i;:::-;4516:84;4337:269;4286:320;;;:::o;247:819:83:-;;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "247:819:83:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2732:202:2;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2158:98:19;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4444:197;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3255:106;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;368:36:83;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;981:83;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;5203:256:19;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4504:129:2;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4929:145;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3104:91:19;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6038:214:2;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;5854:234:19;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;653:241:83;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;578:89:21;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;898:79:83;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3419:125:19;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;973:161:21;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3021:145:2;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2369:102:19;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2153:49:2;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6575:427:19;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3740:189;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;302:62:83;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5354:147:2;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3987:149:19;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2732:202:2;2817:4;2855:32;2840:47;;;:11;:47;;;;:87;;;;2891:36;2915:11;2891:23;:36::i;:::-;2840:87;2833:94;;2732:202;;;:::o;2158:98:19:-;2212:13;2244:5;2237:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2158:98;:::o;4444:197::-;4527:4;4543:13;4559:12;:10;:12::i;:::-;4543:28;;4581:32;4590:5;4597:7;4606:6;4581:8;:32::i;:::-;4630:4;4623:11;;;4444:197;;;;:::o;3255:106::-;3316:7;3342:12;;3335:19;;3255:106;:::o;368:36:83:-;;;:::o;981:83::-;1032:27;340:24;1056:2;1032:10;:27::i;:::-;981:83;:::o;5203:256:19:-;5300:4;5316:15;5334:12;:10;:12::i;:::-;5316:30;;5356:38;5372:4;5378:7;5387:6;5356:15;:38::i;:::-;5404:27;5414:4;5420:2;5424:6;5404:9;:27::i;:::-;5448:4;5441:11;;;5203:256;;;;;:::o;4504:129:2:-;4578:7;4604:6;:12;4611:4;4604:12;;;;;;;;;;;:22;;;4597:29;;4504:129;;;:::o;4929:145::-;5012:18;5025:4;5012:12;:18::i;:::-;2631:16;2642:4;2631:10;:16::i;:::-;5042:25:::1;5053:4;5059:7;5042:10;:25::i;:::-;4929:145:::0;;;:::o;3104:91:19:-;3162:5;3186:2;3179:9;;3104:91;:::o;6038:214:2:-;6144:12;:10;:12::i;:::-;6133:23;;:7;:23;;;6125:83;;;;;;;;;;;;:::i;:::-;;;;;;;;;6219:26;6231:4;6237:7;6219:11;:26::i;:::-;6038:214;;:::o;5854:234:19:-;5942:4;5958:13;5974:12;:10;:12::i;:::-;5958:28;;5996:64;6005:5;6012:7;6049:10;6021:25;6031:5;6038:7;6021:9;:25::i;:::-;:38;;;;:::i;:::-;5996:8;:64::i;:::-;6077:4;6070:11;;;5854:234;;;;:::o;653:241:83:-;340:24;2631:16:2;2642:4;2631:10;:16::i;:::-;750:1:83::1;736:11;:15;732:135;;;806:11;795:6;779:13;:11;:13::i;:::-;:22;;;;:::i;:::-;778:39;;761:99;;;;;;;;;;;;:::i;:::-;;;;;;;;;732:135;872:17;878:2;882:6;872:5;:17::i;:::-;653:241:::0;;;:::o;578:89:21:-;633:27;639:12;:10;:12::i;:::-;653:6;633:5;:27::i;:::-;578:89;:::o;898:79:83:-;946:26;340:24;969:2;946:9;:26::i;:::-;898:79;:::o;3419:125:19:-;3493:7;3519:9;:18;3529:7;3519:18;;;;;;;;;;;;;;;;3512:25;;3419:125;;;:::o;973:161:21:-;1049:46;1065:7;1074:12;:10;:12::i;:::-;1088:6;1049:15;:46::i;:::-;1105:22;1111:7;1120:6;1105:5;:22::i;:::-;973:161;;:::o;3021:145:2:-;3107:4;3130:6;:12;3137:4;3130:12;;;;;;;;;;;:20;;:29;3151:7;3130:29;;;;;;;;;;;;;;;;;;;;;;;;;3123:36;;3021:145;;;;:::o;2369:102:19:-;2425:13;2457:7;2450:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2369:102;:::o;2153:49:2:-;2198:4;2153:49;;;:::o;6575:427:19:-;6668:4;6684:13;6700:12;:10;:12::i;:::-;6684:28;;6722:24;6749:25;6759:5;6766:7;6749:9;:25::i;:::-;6722:52;;6812:15;6792:16;:35;;6784:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;6903:60;6912:5;6919:7;6947:15;6928:16;:34;6903:8;:60::i;:::-;6991:4;6984:11;;;;6575:427;;;;:::o;3740:189::-;3819:4;3835:13;3851:12;:10;:12::i;:::-;3835:28;;3873;3883:5;3890:2;3894:6;3873:9;:28::i;:::-;3918:4;3911:11;;;3740:189;;;;:::o;302:62:83:-;340:24;302:62;:::o;5354:147:2:-;5438:18;5451:4;5438:12;:18::i;:::-;2631:16;2642:4;2631:10;:16::i;:::-;5468:26:::1;5480:4;5486:7;5468:11;:26::i;:::-;5354:147:::0;;;:::o;3987:149:19:-;4076:7;4102:11;:18;4114:5;4102:18;;;;;;;;;;;;;;;:27;4121:7;4102:27;;;;;;;;;;;;;;;;4095:34;;3987:149;;;;:::o;829:155:39:-;914:4;952:25;937:40;;;:11;:40;;;;930:47;;829:155;;;:::o;640:96:35:-;693:7;719:10;712:17;;640:96;:::o;10457:340:19:-;10575:1;10558:19;;:5;:19;;;;10550:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;10655:1;10636:21;;:7;:21;;;;10628:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;10737:6;10707:11;:18;10719:5;10707:18;;;;;;;;;;;;;;;:27;10726:7;10707:27;;;;;;;;;;;;;;;:36;;;;10774:7;10758:32;;10767:5;10758:32;;;10783:6;10758:32;;;;;;:::i;:::-;;;;;;;;10457:340;;;:::o;11078:411::-;11178:24;11205:25;11215:5;11222:7;11205:9;:25::i;:::-;11178:52;;11264:17;11244:16;:37;11240:243;;11325:6;11305:16;:26;;11297:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;11407:51;11416:5;11423:7;11451:6;11432:16;:25;11407:8;:51::i;:::-;11240:243;11168:321;11078:411;;;:::o;7456:788::-;7568:1;7552:18;;:4;:18;;;;7544:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;7644:1;7630:16;;:2;:16;;;;7622:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;7697:38;7718:4;7724:2;7728:6;7697:20;:38::i;:::-;7746:19;7768:9;:15;7778:4;7768:15;;;;;;;;;;;;;;;;7746:37;;7816:6;7801:11;:21;;7793:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;7931:6;7917:11;:20;7899:9;:15;7909:4;7899:15;;;;;;;;;;;;;;;:38;;;;8131:6;8114:9;:13;8124:2;8114:13;;;;;;;;;;;;;;;;:23;;;;;;;;;;;8178:2;8163:26;;8172:4;8163:26;;;8182:6;8163:26;;;;;;:::i;:::-;;;;;;;;8200:37;8220:4;8226:2;8230:6;8200:19;:37::i;:::-;7534:710;7456:788;;;:::o;3460:103:2:-;3526:30;3537:4;3543:12;:10;:12::i;:::-;3526:10;:30::i;:::-;3460:103;:::o;7587:233::-;7670:22;7678:4;7684:7;7670;:22::i;:::-;7665:149;;7740:4;7708:6;:12;7715:4;7708:12;;;;;;;;;;;:20;;:29;7729:7;7708:29;;;;;;;;;;;;;;;;:36;;;;;;;;;;;;;;;;;;7790:12;:10;:12::i;:::-;7763:40;;7781:7;7763:40;;7775:4;7763:40;;;;;;;;;;7665:149;7587:233;;:::o;7991:234::-;8074:22;8082:4;8088:7;8074;:22::i;:::-;8070:149;;;8144:5;8112:6;:12;8119:4;8112:12;;;;;;;;;;;:20;;:29;8133:7;8112:29;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;8195:12;:10;:12::i;:::-;8168:40;;8186:7;8168:40;;8180:4;8168:40;;;;;;;;;;8070:149;7991:234;;:::o;8520:535:19:-;8622:1;8603:21;;:7;:21;;;;8595:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;8671:49;8700:1;8704:7;8713:6;8671:20;:49::i;:::-;8747:6;8731:12;;:22;;;;;;;:::i;:::-;;;;;;;;8921:6;8899:9;:18;8909:7;8899:18;;;;;;;;;;;;;;;;:28;;;;;;;;;;;8973:7;8952:37;;8969:1;8952:37;;;8982:6;8952:37;;;;;;:::i;:::-;;;;;;;;9000:48;9028:1;9032:7;9041:6;9000:19;:48::i;:::-;8520:535;;:::o;9375:659::-;9477:1;9458:21;;:7;:21;;;;9450:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;9528:49;9549:7;9566:1;9570:6;9528:20;:49::i;:::-;9588:22;9613:9;:18;9623:7;9613:18;;;;;;;;;;;;;;;;9588:43;;9667:6;9649:14;:24;;9641:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;9784:6;9767:14;:23;9746:9;:18;9756:7;9746:18;;;;;;;;;;;;;;;:44;;;;9899:6;9883:12;;:22;;;;;;;;;;;9957:1;9931:37;;9940:7;9931:37;;;9961:6;9931:37;;;;;;:::i;:::-;;;;;;;;9979:48;9999:7;10016:1;10020:6;9979:19;:48::i;:::-;9440:594;9375:659;;:::o;12073:91::-;;;;:::o;12752:90::-;;;;:::o;3844:479:2:-;3932:22;3940:4;3946:7;3932;:22::i;:::-;3927:390;;4115:28;4135:7;4115:19;:28::i;:::-;4214:38;4242:4;4234:13;;4249:2;4214:19;:38::i;:::-;4022:252;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3970:336;;;;;;;;;;;:::i;:::-;;;;;;;;3927:390;3844:479;;:::o;2407:149:37:-;2465:13;2497:52;2525:4;2509:22;;343:2;2497:52;;:11;:52::i;:::-;2490:59;;2407:149;;;:::o;1818:437::-;1893:13;1918:19;1963:1;1954:6;1950:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;1940:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1918:47;;1975:15;:6;1982:1;1975:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;2000;:6;2007:1;2000:9;;;;;;;;:::i;:::-;;;;;:15;;;;;;;;;;;2030:9;2055:1;2046:6;2042:1;:10;;;;:::i;:::-;:14;;;;:::i;:::-;2030:26;;2025:128;2062:1;2058;:5;2025:128;;;2096:8;2113:3;2105:5;:11;2096:21;;;;;;;:::i;:::-;;;;;2084:6;2091:1;2084:9;;;;;;;;:::i;:::-;;;;;:33;;;;;;;;;;;2141:1;2131:11;;;;;2065:3;;;;:::i;:::-;;;2025:128;;;;2179:1;2170:5;:10;2162:55;;;;;;;;;;;;:::i;:::-;;;;;;;;;2241:6;2227:21;;;1818:437;;;;:::o;88:117:97:-;197:1;194;187:12;334:149;370:7;410:66;403:5;399:78;388:89;;334:149;;;:::o;489:120::-;561:23;578:5;561:23;:::i;:::-;554:5;551:34;541:62;;599:1;596;589:12;541:62;489:120;:::o;615:137::-;660:5;698:6;685:20;676:29;;714:32;740:5;714:32;:::i;:::-;615:137;;;;:::o;758:327::-;816:6;865:2;853:9;844:7;840:23;836:32;833:119;;;871:79;;:::i;:::-;833:119;991:1;1016:52;1060:7;1051:6;1040:9;1036:22;1016:52;:::i;:::-;1006:62;;962:116;758:327;;;;:::o;1091:90::-;1125:7;1168:5;1161:13;1154:21;1143:32;;1091:90;;;:::o;1187:109::-;1268:21;1283:5;1268:21;:::i;:::-;1263:3;1256:34;1187:109;;:::o;1302:210::-;1389:4;1427:2;1416:9;1412:18;1404:26;;1440:65;1502:1;1491:9;1487:17;1478:6;1440:65;:::i;:::-;1302:210;;;;:::o;1518:99::-;1570:6;1604:5;1598:12;1588:22;;1518:99;;;:::o;1623:169::-;1707:11;1741:6;1736:3;1729:19;1781:4;1776:3;1772:14;1757:29;;1623:169;;;;:::o;1798:307::-;1866:1;1876:113;1890:6;1887:1;1884:13;1876:113;;;1975:1;1970:3;1966:11;1960:18;1956:1;1951:3;1947:11;1940:39;1912:2;1909:1;1905:10;1900:15;;1876:113;;;2007:6;2004:1;2001:13;1998:101;;;2087:1;2078:6;2073:3;2069:16;2062:27;1998:101;1847:258;1798:307;;;:::o;2111:102::-;2152:6;2203:2;2199:7;2194:2;2187:5;2183:14;2179:28;2169:38;;2111:102;;;:::o;2219:364::-;2307:3;2335:39;2368:5;2335:39;:::i;:::-;2390:71;2454:6;2449:3;2390:71;:::i;:::-;2383:78;;2470:52;2515:6;2510:3;2503:4;2496:5;2492:16;2470:52;:::i;:::-;2547:29;2569:6;2547:29;:::i;:::-;2542:3;2538:39;2531:46;;2311:272;2219:364;;;;:::o;2589:313::-;2702:4;2740:2;2729:9;2725:18;2717:26;;2789:9;2783:4;2779:20;2775:1;2764:9;2760:17;2753:47;2817:78;2890:4;2881:6;2817:78;:::i;:::-;2809:86;;2589:313;;;;:::o;2908:126::-;2945:7;2985:42;2978:5;2974:54;2963:65;;2908:126;;;:::o;3040:96::-;3077:7;3106:24;3124:5;3106:24;:::i;:::-;3095:35;;3040:96;;;:::o;3142:122::-;3215:24;3233:5;3215:24;:::i;:::-;3208:5;3205:35;3195:63;;3254:1;3251;3244:12;3195:63;3142:122;:::o;3270:139::-;3316:5;3354:6;3341:20;3332:29;;3370:33;3397:5;3370:33;:::i;:::-;3270:139;;;;:::o;3415:77::-;3452:7;3481:5;3470:16;;3415:77;;;:::o;3498:122::-;3571:24;3589:5;3571:24;:::i;:::-;3564:5;3561:35;3551:63;;3610:1;3607;3600:12;3551:63;3498:122;:::o;3626:139::-;3672:5;3710:6;3697:20;3688:29;;3726:33;3753:5;3726:33;:::i;:::-;3626:139;;;;:::o;3771:474::-;3839:6;3847;3896:2;3884:9;3875:7;3871:23;3867:32;3864:119;;;3902:79;;:::i;:::-;3864:119;4022:1;4047:53;4092:7;4083:6;4072:9;4068:22;4047:53;:::i;:::-;4037:63;;3993:117;4149:2;4175:53;4220:7;4211:6;4200:9;4196:22;4175:53;:::i;:::-;4165:63;;4120:118;3771:474;;;;;:::o;4251:118::-;4338:24;4356:5;4338:24;:::i;:::-;4333:3;4326:37;4251:118;;:::o;4375:222::-;4468:4;4506:2;4495:9;4491:18;4483:26;;4519:71;4587:1;4576:9;4572:17;4563:6;4519:71;:::i;:::-;4375:222;;;;:::o;4603:329::-;4662:6;4711:2;4699:9;4690:7;4686:23;4682:32;4679:119;;;4717:79;;:::i;:::-;4679:119;4837:1;4862:53;4907:7;4898:6;4887:9;4883:22;4862:53;:::i;:::-;4852:63;;4808:117;4603:329;;;;:::o;4938:619::-;5015:6;5023;5031;5080:2;5068:9;5059:7;5055:23;5051:32;5048:119;;;5086:79;;:::i;:::-;5048:119;5206:1;5231:53;5276:7;5267:6;5256:9;5252:22;5231:53;:::i;:::-;5221:63;;5177:117;5333:2;5359:53;5404:7;5395:6;5384:9;5380:22;5359:53;:::i;:::-;5349:63;;5304:118;5461:2;5487:53;5532:7;5523:6;5512:9;5508:22;5487:53;:::i;:::-;5477:63;;5432:118;4938:619;;;;;:::o;5563:77::-;5600:7;5629:5;5618:16;;5563:77;;;:::o;5646:122::-;5719:24;5737:5;5719:24;:::i;:::-;5712:5;5709:35;5699:63;;5758:1;5755;5748:12;5699:63;5646:122;:::o;5774:139::-;5820:5;5858:6;5845:20;5836:29;;5874:33;5901:5;5874:33;:::i;:::-;5774:139;;;;:::o;5919:329::-;5978:6;6027:2;6015:9;6006:7;6002:23;5998:32;5995:119;;;6033:79;;:::i;:::-;5995:119;6153:1;6178:53;6223:7;6214:6;6203:9;6199:22;6178:53;:::i;:::-;6168:63;;6124:117;5919:329;;;;:::o;6254:118::-;6341:24;6359:5;6341:24;:::i;:::-;6336:3;6329:37;6254:118;;:::o;6378:222::-;6471:4;6509:2;6498:9;6494:18;6486:26;;6522:71;6590:1;6579:9;6575:17;6566:6;6522:71;:::i;:::-;6378:222;;;;:::o;6606:474::-;6674:6;6682;6731:2;6719:9;6710:7;6706:23;6702:32;6699:119;;;6737:79;;:::i;:::-;6699:119;6857:1;6882:53;6927:7;6918:6;6907:9;6903:22;6882:53;:::i;:::-;6872:63;;6828:117;6984:2;7010:53;7055:7;7046:6;7035:9;7031:22;7010:53;:::i;:::-;7000:63;;6955:118;6606:474;;;;;:::o;7086:86::-;7121:7;7161:4;7154:5;7150:16;7139:27;;7086:86;;;:::o;7178:112::-;7261:22;7277:5;7261:22;:::i;:::-;7256:3;7249:35;7178:112;;:::o;7296:214::-;7385:4;7423:2;7412:9;7408:18;7400:26;;7436:67;7500:1;7489:9;7485:17;7476:6;7436:67;:::i;:::-;7296:214;;;;:::o;7516:329::-;7575:6;7624:2;7612:9;7603:7;7599:23;7595:32;7592:119;;;7630:79;;:::i;:::-;7592:119;7750:1;7775:53;7820:7;7811:6;7800:9;7796:22;7775:53;:::i;:::-;7765:63;;7721:117;7516:329;;;;:::o;7851:474::-;7919:6;7927;7976:2;7964:9;7955:7;7951:23;7947:32;7944:119;;;7982:79;;:::i;:::-;7944:119;8102:1;8127:53;8172:7;8163:6;8152:9;8148:22;8127:53;:::i;:::-;8117:63;;8073:117;8229:2;8255:53;8300:7;8291:6;8280:9;8276:22;8255:53;:::i;:::-;8245:63;;8200:118;7851:474;;;;;:::o;8331:180::-;8379:77;8376:1;8369:88;8476:4;8473:1;8466:15;8500:4;8497:1;8490:15;8517:320;8561:6;8598:1;8592:4;8588:12;8578:22;;8645:1;8639:4;8635:12;8666:18;8656:81;;8722:4;8714:6;8710:17;8700:27;;8656:81;8784:2;8776:6;8773:14;8753:18;8750:38;8747:84;;;8803:18;;:::i;:::-;8747:84;8568:269;8517:320;;;:::o;8843:234::-;8983:34;8979:1;8971:6;8967:14;8960:58;9052:17;9047:2;9039:6;9035:15;9028:42;8843:234;:::o;9083:366::-;9225:3;9246:67;9310:2;9305:3;9246:67;:::i;:::-;9239:74;;9322:93;9411:3;9322:93;:::i;:::-;9440:2;9435:3;9431:12;9424:19;;9083:366;;;:::o;9455:419::-;9621:4;9659:2;9648:9;9644:18;9636:26;;9708:9;9702:4;9698:20;9694:1;9683:9;9679:17;9672:47;9736:131;9862:4;9736:131;:::i;:::-;9728:139;;9455:419;;;:::o;9880:180::-;9928:77;9925:1;9918:88;10025:4;10022:1;10015:15;10049:4;10046:1;10039:15;10066:305;10106:3;10125:20;10143:1;10125:20;:::i;:::-;10120:25;;10159:20;10177:1;10159:20;:::i;:::-;10154:25;;10313:1;10245:66;10241:74;10238:1;10235:81;10232:107;;;10319:18;;:::i;:::-;10232:107;10363:1;10360;10356:9;10349:16;;10066:305;;;;:::o;10377:173::-;10517:25;10513:1;10505:6;10501:14;10494:49;10377:173;:::o;10556:366::-;10698:3;10719:67;10783:2;10778:3;10719:67;:::i;:::-;10712:74;;10795:93;10884:3;10795:93;:::i;:::-;10913:2;10908:3;10904:12;10897:19;;10556:366;;;:::o;10928:419::-;11094:4;11132:2;11121:9;11117:18;11109:26;;11181:9;11175:4;11171:20;11167:1;11156:9;11152:17;11145:47;11209:131;11335:4;11209:131;:::i;:::-;11201:139;;10928:419;;;:::o;11353:224::-;11493:34;11489:1;11481:6;11477:14;11470:58;11562:7;11557:2;11549:6;11545:15;11538:32;11353:224;:::o;11583:366::-;11725:3;11746:67;11810:2;11805:3;11746:67;:::i;:::-;11739:74;;11822:93;11911:3;11822:93;:::i;:::-;11940:2;11935:3;11931:12;11924:19;;11583:366;;;:::o;11955:419::-;12121:4;12159:2;12148:9;12144:18;12136:26;;12208:9;12202:4;12198:20;12194:1;12183:9;12179:17;12172:47;12236:131;12362:4;12236:131;:::i;:::-;12228:139;;11955:419;;;:::o;12380:223::-;12520:34;12516:1;12508:6;12504:14;12497:58;12589:6;12584:2;12576:6;12572:15;12565:31;12380:223;:::o;12609:366::-;12751:3;12772:67;12836:2;12831:3;12772:67;:::i;:::-;12765:74;;12848:93;12937:3;12848:93;:::i;:::-;12966:2;12961:3;12957:12;12950:19;;12609:366;;;:::o;12981:419::-;13147:4;13185:2;13174:9;13170:18;13162:26;;13234:9;13228:4;13224:20;13220:1;13209:9;13205:17;13198:47;13262:131;13388:4;13262:131;:::i;:::-;13254:139;;12981:419;;;:::o;13406:221::-;13546:34;13542:1;13534:6;13530:14;13523:58;13615:4;13610:2;13602:6;13598:15;13591:29;13406:221;:::o;13633:366::-;13775:3;13796:67;13860:2;13855:3;13796:67;:::i;:::-;13789:74;;13872:93;13961:3;13872:93;:::i;:::-;13990:2;13985:3;13981:12;13974:19;;13633:366;;;:::o;14005:419::-;14171:4;14209:2;14198:9;14194:18;14186:26;;14258:9;14252:4;14248:20;14244:1;14233:9;14229:17;14222:47;14286:131;14412:4;14286:131;:::i;:::-;14278:139;;14005:419;;;:::o;14430:179::-;14570:31;14566:1;14558:6;14554:14;14547:55;14430:179;:::o;14615:366::-;14757:3;14778:67;14842:2;14837:3;14778:67;:::i;:::-;14771:74;;14854:93;14943:3;14854:93;:::i;:::-;14972:2;14967:3;14963:12;14956:19;;14615:366;;;:::o;14987:419::-;15153:4;15191:2;15180:9;15176:18;15168:26;;15240:9;15234:4;15230:20;15226:1;15215:9;15211:17;15204:47;15268:131;15394:4;15268:131;:::i;:::-;15260:139;;14987:419;;;:::o;15412:224::-;15552:34;15548:1;15540:6;15536:14;15529:58;15621:7;15616:2;15608:6;15604:15;15597:32;15412:224;:::o;15642:366::-;15784:3;15805:67;15869:2;15864:3;15805:67;:::i;:::-;15798:74;;15881:93;15970:3;15881:93;:::i;:::-;15999:2;15994:3;15990:12;15983:19;;15642:366;;;:::o;16014:419::-;16180:4;16218:2;16207:9;16203:18;16195:26;;16267:9;16261:4;16257:20;16253:1;16242:9;16238:17;16231:47;16295:131;16421:4;16295:131;:::i;:::-;16287:139;;16014:419;;;:::o;16439:222::-;16579:34;16575:1;16567:6;16563:14;16556:58;16648:5;16643:2;16635:6;16631:15;16624:30;16439:222;:::o;16667:366::-;16809:3;16830:67;16894:2;16889:3;16830:67;:::i;:::-;16823:74;;16906:93;16995:3;16906:93;:::i;:::-;17024:2;17019:3;17015:12;17008:19;;16667:366;;;:::o;17039:419::-;17205:4;17243:2;17232:9;17228:18;17220:26;;17292:9;17286:4;17282:20;17278:1;17267:9;17263:17;17256:47;17320:131;17446:4;17320:131;:::i;:::-;17312:139;;17039:419;;;:::o;17464:225::-;17604:34;17600:1;17592:6;17588:14;17581:58;17673:8;17668:2;17660:6;17656:15;17649:33;17464:225;:::o;17695:366::-;17837:3;17858:67;17922:2;17917:3;17858:67;:::i;:::-;17851:74;;17934:93;18023:3;17934:93;:::i;:::-;18052:2;18047:3;18043:12;18036:19;;17695:366;;;:::o;18067:419::-;18233:4;18271:2;18260:9;18256:18;18248:26;;18320:9;18314:4;18310:20;18306:1;18295:9;18291:17;18284:47;18348:131;18474:4;18348:131;:::i;:::-;18340:139;;18067:419;;;:::o;18492:181::-;18632:33;18628:1;18620:6;18616:14;18609:57;18492:181;:::o;18679:366::-;18821:3;18842:67;18906:2;18901:3;18842:67;:::i;:::-;18835:74;;18918:93;19007:3;18918:93;:::i;:::-;19036:2;19031:3;19027:12;19020:19;;18679:366;;;:::o;19051:419::-;19217:4;19255:2;19244:9;19240:18;19232:26;;19304:9;19298:4;19294:20;19290:1;19279:9;19275:17;19268:47;19332:131;19458:4;19332:131;:::i;:::-;19324:139;;19051:419;;;:::o;19476:220::-;19616:34;19612:1;19604:6;19600:14;19593:58;19685:3;19680:2;19672:6;19668:15;19661:28;19476:220;:::o;19702:366::-;19844:3;19865:67;19929:2;19924:3;19865:67;:::i;:::-;19858:74;;19941:93;20030:3;19941:93;:::i;:::-;20059:2;20054:3;20050:12;20043:19;;19702:366;;;:::o;20074:419::-;20240:4;20278:2;20267:9;20263:18;20255:26;;20327:9;20321:4;20317:20;20313:1;20302:9;20298:17;20291:47;20355:131;20481:4;20355:131;:::i;:::-;20347:139;;20074:419;;;:::o;20499:221::-;20639:34;20635:1;20627:6;20623:14;20616:58;20708:4;20703:2;20695:6;20691:15;20684:29;20499:221;:::o;20726:366::-;20868:3;20889:67;20953:2;20948:3;20889:67;:::i;:::-;20882:74;;20965:93;21054:3;20965:93;:::i;:::-;21083:2;21078:3;21074:12;21067:19;;20726:366;;;:::o;21098:419::-;21264:4;21302:2;21291:9;21287:18;21279:26;;21351:9;21345:4;21341:20;21337:1;21326:9;21322:17;21315:47;21379:131;21505:4;21379:131;:::i;:::-;21371:139;;21098:419;;;:::o;21523:148::-;21625:11;21662:3;21647:18;;21523:148;;;;:::o;21677:173::-;21817:25;21813:1;21805:6;21801:14;21794:49;21677:173;:::o;21856:402::-;22016:3;22037:85;22119:2;22114:3;22037:85;:::i;:::-;22030:92;;22131:93;22220:3;22131:93;:::i;:::-;22249:2;22244:3;22240:12;22233:19;;21856:402;;;:::o;22264:377::-;22370:3;22398:39;22431:5;22398:39;:::i;:::-;22453:89;22535:6;22530:3;22453:89;:::i;:::-;22446:96;;22551:52;22596:6;22591:3;22584:4;22577:5;22573:16;22551:52;:::i;:::-;22628:6;22623:3;22619:16;22612:23;;22374:267;22264:377;;;;:::o;22647:167::-;22787:19;22783:1;22775:6;22771:14;22764:43;22647:167;:::o;22820:402::-;22980:3;23001:85;23083:2;23078:3;23001:85;:::i;:::-;22994:92;;23095:93;23184:3;23095:93;:::i;:::-;23213:2;23208:3;23204:12;23197:19;;22820:402;;;:::o;23228:967::-;23610:3;23632:148;23776:3;23632:148;:::i;:::-;23625:155;;23797:95;23888:3;23879:6;23797:95;:::i;:::-;23790:102;;23909:148;24053:3;23909:148;:::i;:::-;23902:155;;24074:95;24165:3;24156:6;24074:95;:::i;:::-;24067:102;;24186:3;24179:10;;23228:967;;;;;:::o;24201:348::-;24241:7;24264:20;24282:1;24264:20;:::i;:::-;24259:25;;24298:20;24316:1;24298:20;:::i;:::-;24293:25;;24486:1;24418:66;24414:74;24411:1;24408:81;24403:1;24396:9;24389:17;24385:105;24382:131;;;24493:18;;:::i;:::-;24382:131;24541:1;24538;24534:9;24523:20;;24201:348;;;;:::o;24555:180::-;24603:77;24600:1;24593:88;24700:4;24697:1;24690:15;24724:4;24721:1;24714:15;24741:180;24789:77;24786:1;24779:88;24886:4;24883:1;24876:15;24910:4;24907:1;24900:15;24927:171;24966:3;24989:24;25007:5;24989:24;:::i;:::-;24980:33;;25035:4;25028:5;25025:15;25022:41;;;25043:18;;:::i;:::-;25022:41;25090:1;25083:5;25079:13;25072:20;;24927:171;;;:::o;25104:182::-;25244:34;25240:1;25232:6;25228:14;25221:58;25104:182;:::o;25292:366::-;25434:3;25455:67;25519:2;25514:3;25455:67;:::i;:::-;25448:74;;25531:93;25620:3;25531:93;:::i;:::-;25649:2;25644:3;25640:12;25633:19;;25292:366;;;:::o;25664:419::-;25830:4;25868:2;25857:9;25853:18;25845:26;;25917:9;25911:4;25907:20;25903:1;25892:9;25888:17;25881:47;25945:131;26071:4;25945:131;:::i;:::-;25937:139;;25664:419;;;:::o", + "source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\";\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\n\ncontract FT is ERC20, ERC20Burnable, AccessControl {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n uint256 public immutable supplyLimit;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint256 _supplyLimt\n ) ERC20(name_, symbol_) {\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(MINTER_ROLE, msg.sender);\n supplyLimit = _supplyLimt;\n }\n\n function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {\n if (supplyLimit > 0) {\n require(\n (totalSupply() + amount) <= supplyLimit,\n \"Exceed the total supply\"\n );\n }\n _mint(to, amount);\n }\n\n function setMintRole(address to) external {\n grantRole(MINTER_ROLE, to);\n }\n\n function removeMintRole(address to) external {\n revokeRole(MINTER_ROLE, to);\n }\n}\n", + "sourcePath": "/Users/zhl/Documents/workspace/crypto/becrypto/contracts/tokens/erc20/FT.sol", + "ast": { + "absolutePath": "project:/contracts/tokens/erc20/FT.sol", + "exportedSymbols": { + "AccessControl": [ + 469 + ], + "Context": [ + 6880 + ], + "ERC165": [ + 7573 + ], + "ERC20": [ + 4392 + ], + "ERC20Burnable": [ + 4514 + ], + "FT": [ + 21539 + ], + "IAccessControl": [ + 667 + ], + "IERC165": [ + 7585 + ], + "IERC20": [ + 4470 + ], + "IERC20Metadata": [ + 4539 + ], + "Math": [ + 8451 + ], + "SignedMath": [ + 8868 + ], + "Strings": [ + 7183 + ] + }, + "id": 21540, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21438, + "literals": [ + "solidity", + "0.8", + ".10" + ], + "nodeType": "PragmaDirective", + "src": "32:23:83" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 21439, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 21540, + "sourceUnit": 4393, + "src": "56:55:83", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol", + "file": "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol", + "id": 21440, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 21540, + "sourceUnit": 4515, + "src": "112:74:83", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/AccessControl.sol", + "file": "@openzeppelin/contracts/access/AccessControl.sol", + "id": 21441, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 21540, + "sourceUnit": 470, + "src": "187:58:83", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 21442, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4392, + "src": "262:5:83" + }, + "id": 21443, + "nodeType": "InheritanceSpecifier", + "src": "262:5:83" + }, + { + "baseName": { + "id": 21444, + "name": "ERC20Burnable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4514, + "src": "269:13:83" + }, + "id": 21445, + "nodeType": "InheritanceSpecifier", + "src": "269:13:83" + }, + { + "baseName": { + "id": 21446, + "name": "AccessControl", + "nodeType": "IdentifierPath", + "referencedDeclaration": 469, + "src": "284:13:83" + }, + "id": 21447, + "nodeType": "InheritanceSpecifier", + "src": "284:13:83" + } + ], + "canonicalName": "FT", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 21539, + "linearizedBaseContracts": [ + 21539, + 469, + 7573, + 7585, + 667, + 4514, + 4392, + 4539, + 4470, + 6880 + ], + "name": "FT", + "nameLocation": "256:2:83", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "functionSelector": "d5391393", + "id": 21452, + "mutability": "constant", + "name": "MINTER_ROLE", + "nameLocation": "326:11:83", + "nodeType": "VariableDeclaration", + "scope": 21539, + "src": "302:62:83", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21448, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "302:7:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "4d494e5445525f524f4c45", + "id": 21450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "350:13:83", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "typeString": "literal_string \"MINTER_ROLE\"" + }, + "value": "MINTER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "typeString": "literal_string \"MINTER_ROLE\"" + } + ], + "id": 21449, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "340:9:83", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 21451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "340:24:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "19d1997a", + "id": 21454, + "mutability": "immutable", + "name": "supplyLimit", + "nameLocation": "393:11:83", + "nodeType": "VariableDeclaration", + "scope": 21539, + "src": "368:36:83", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "368:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 21483, + "nodeType": "Block", + "src": "524:125:83", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 21468, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "541:18:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 21469, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "561:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "561:10:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21467, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "530:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "530:42:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21472, + "nodeType": "ExpressionStatement", + "src": "530:42:83" + }, + { + "expression": { + "arguments": [ + { + "id": 21474, + "name": "MINTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21452, + "src": "589:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 21475, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "602:3:83", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "602:10:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21473, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 377, + "src": "578:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "578:35:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21478, + "nodeType": "ExpressionStatement", + "src": "578:35:83" + }, + { + "expression": { + "id": 21481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 21479, + "name": "supplyLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21454, + "src": "619:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 21480, + "name": "_supplyLimt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "633:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "619:25:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21482, + "nodeType": "ExpressionStatement", + "src": "619:25:83" + } + ] + }, + "id": 21484, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 21463, + "name": "name_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21456, + "src": "508:5:83", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 21464, + "name": "symbol_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21458, + "src": "515:7:83", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "id": 21465, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 21462, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4392, + "src": "502:5:83" + }, + "nodeType": "ModifierInvocation", + "src": "502:21:83" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 21461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21456, + "mutability": "mutable", + "name": "name_", + "nameLocation": "440:5:83", + "nodeType": "VariableDeclaration", + "scope": 21484, + "src": "426:19:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21455, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "426:6:83", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 21458, + "mutability": "mutable", + "name": "symbol_", + "nameLocation": "465:7:83", + "nodeType": "VariableDeclaration", + "scope": 21484, + "src": "451:21:83", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21457, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "451:6:83", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 21460, + "mutability": "mutable", + "name": "_supplyLimt", + "nameLocation": "486:11:83", + "nodeType": "VariableDeclaration", + "scope": 21484, + "src": "478:19:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "478:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "420:81:83" + }, + "returnParameters": { + "id": 21466, + "nodeType": "ParameterList", + "parameters": [], + "src": "524:0:83" + }, + "scope": 21539, + "src": "409:240:83", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21515, + "nodeType": "Block", + "src": "726:168:83", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 21494, + "name": "supplyLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21454, + "src": "736:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 21495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "750:1:83", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "736:15:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21509, + "nodeType": "IfStatement", + "src": "732:135:83", + "trueBody": { + "id": 21508, + "nodeType": "Block", + "src": "753:114:83", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21498, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "779:11:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 21499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:13:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 21500, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21488, + "src": "795:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "779:22:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 21502, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "778:24:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 21503, + "name": "supplyLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21454, + "src": "806:11:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "778:39:83", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4578636565642074686520746f74616c20737570706c79", + "id": 21505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "827:25:83", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1", + "typeString": "literal_string \"Exceed the total supply\"" + }, + "value": "Exceed the total supply" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12d840de55800a407036c108072a110b489a6fba65d56a3541eab87f0f0af5d1", + "typeString": "literal_string \"Exceed the total supply\"" + } + ], + "id": 21497, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "761:7:83", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "761:99:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21507, + "nodeType": "ExpressionStatement", + "src": "761:99:83" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 21511, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21486, + "src": "878:2:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 21512, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21488, + "src": "882:6:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21510, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4209, + "src": "872:5:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 21513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "872:17:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21514, + "nodeType": "ExpressionStatement", + "src": "872:17:83" + } + ] + }, + "functionSelector": "40c10f19", + "id": 21516, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "id": 21491, + "name": "MINTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21452, + "src": "713:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 21492, + "kind": "modifierInvocation", + "modifierName": { + "id": 21490, + "name": "onlyRole", + "nodeType": "IdentifierPath", + "referencedDeclaration": 192, + "src": "704:8:83" + }, + "nodeType": "ModifierInvocation", + "src": "704:21:83" + } + ], + "name": "mint", + "nameLocation": "662:4:83", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 21489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21486, + "mutability": "mutable", + "name": "to", + "nameLocation": "675:2:83", + "nodeType": "VariableDeclaration", + "scope": 21516, + "src": "667:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21485, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "667:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 21488, + "mutability": "mutable", + "name": "amount", + "nameLocation": "687:6:83", + "nodeType": "VariableDeclaration", + "scope": 21516, + "src": "679:14:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21487, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "679:7:83", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "666:28:83" + }, + "returnParameters": { + "id": 21493, + "nodeType": "ParameterList", + "parameters": [], + "src": "726:0:83" + }, + "scope": 21539, + "src": "653:241:83", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 21526, + "nodeType": "Block", + "src": "940:37:83", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 21522, + "name": "MINTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21452, + "src": "956:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 21523, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21518, + "src": "969:2:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21521, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "946:9:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "946:26:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21525, + "nodeType": "ExpressionStatement", + "src": "946:26:83" + } + ] + }, + "functionSelector": "530dd079", + "id": 21527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setMintRole", + "nameLocation": "907:11:83", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 21519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21518, + "mutability": "mutable", + "name": "to", + "nameLocation": "927:2:83", + "nodeType": "VariableDeclaration", + "scope": 21527, + "src": "919:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21517, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "919:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "918:12:83" + }, + "returnParameters": { + "id": 21520, + "nodeType": "ParameterList", + "parameters": [], + "src": "940:0:83" + }, + "scope": 21539, + "src": "898:79:83", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 21537, + "nodeType": "Block", + "src": "1026:38:83", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 21533, + "name": "MINTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21452, + "src": "1043:11:83", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 21534, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21529, + "src": "1056:2:83", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21532, + "name": "revokeRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "1032:10:83", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1032:27:83", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21536, + "nodeType": "ExpressionStatement", + "src": "1032:27:83" + } + ] + }, + "functionSelector": "1cf4e3ee", + "id": 21538, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeMintRole", + "nameLocation": "990:14:83", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 21530, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21529, + "mutability": "mutable", + "name": "to", + "nameLocation": "1013:2:83", + "nodeType": "VariableDeclaration", + "scope": 21538, + "src": "1005:10:83", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21528, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1005:7:83", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1004:12:83" + }, + "returnParameters": { + "id": 21531, + "nodeType": "ParameterList", + "parameters": [], + "src": "1026:0:83" + }, + "scope": 21539, + "src": "981:83:83", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21540, + "src": "247:819:83", + "usedErrors": [] + } + ], + "src": "32:1035:83" + }, + "compiler": { + "name": "solc", + "version": "0.8.10+commit.fc410830.Emscripten.clang" + }, + "networks": { + "195": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + }, + "links": {}, + "address": "0x0Fd13D2CD0B6c679B6f92590E0b91C18DDe7BD3A", + "transactionHash": "0x9bc039bed5ad69015f639e83544d09e01e89d2bd43a1d468986f837ac991bb21" + }, + "1337": { + "events": {}, + "links": {}, + "address": "0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec", + "transactionHash": "0xd2072f3bc06d93b1891e1683d873ae6b68274d9703bca43f039dbc338090f3ae" + }, + "5777": { + "events": {}, + "links": {}, + "address": "0xc97A85581b2a5Af7c69838B783311332F522a451", + "transactionHash": "0x885393685ad74a1c7c86b71221724a30f8e95a75fd05f38294ef758f80e7ebfb" + }, + "91715": { + "events": {}, + "links": {}, + "address": "0x049b5Fe2Fa0229EcA6b5c8b41Ba8cA0bb4f57E45", + "transactionHash": "0x7d6541e8adcc6366586530e2bb029275ad9934ed703d83caea939aeb57e79877" + }, + "421613": { + "events": {}, + "links": {}, + "address": "0x2C7221588D4FBac2585D71618CD540e74c7413B8", + "transactionHash": "0x4e94ba799f76ccf550df8f9eb25c1748766875f8be2b5324defb9178682dd492" + }, + "421614": { + "events": {}, + "links": {}, + "address": "0x1304E6AA241eE3C9ea44Db9e593e85Ae76eC41F1", + "transactionHash": "0xc1b31b88ed982bf476d63bb2a850895ecd89a87399ea7bd2175733a29fc641a1" + } + }, + "schemaVersion": "3.4.16", + "updatedAt": "2024-04-14T06:02:54.067Z", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/config/config_arb_sepolia.js b/config/config_arb_sepolia.js new file mode 100644 index 0000000..acf8b5e --- /dev/null +++ b/config/config_arb_sepolia.js @@ -0,0 +1,59 @@ +const market = { + feeToAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + mallFeeAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + paymentTokens: [ + "0x55bef0fc1423421c3ce1e070d9671e4b417db57c", // USDT + ], + verifier: "0x50A8e60041A206AcaA5F844a1104896224be6F39" +}; + +const admins = { + admin: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + proposers: [ + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", + ], + confirmers: ["0x50A8e60041A206AcaA5F844a1104896224be6F39"], + executors: [ + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", + "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b", + ], +}; + +const token = { + baseTokenURIHero: "https://nft-test.kingsome.cn/hero/meta/13473/", + contractURIHero: 'https://nft-test.kingsome.cn/hero/home_meta/13473', + royaltyReceiver: '0x5Ab03Aa79Ab91B7420b5CFF134a4188388888888', + baseTokenURIGold: "https://nft-test.kingsome.cn/gold_bullion/meta/13473/", + contractURIGold: 'https://nft-test.kingsome.cn/gold_bullion/home_meta/13473', + royaltyFee: 5, +}; + +const imtbl = { + operatorAllowlist: '0x6b969FD89dE634d8DE3271EbE97734FEFfcd58eE', +} +const mint = { + // 2ๆœŸmintๆ”ฏไป˜็š„ไปฃๅธ + mintCurrency: '0xFd42bfb03212dA7e1A4608a44d7658641D99CF34', + // 2ๆœŸmint, ๅ•ไธชnftไปทๆ ผ + mintPrice: '75000000000000000', + // 2ๆœŸmintๆŽฅๆ”ถไปฃๅธ็š„้’ฑๅŒ…ๅœฐๅ€ + mintFeeAddress: '0x50A8e60041A206AcaA5F844a1104896224be6F39', + // 2ๆœŸmint nftid ๅผ€ๅง‹ + mintStartNftId: '6240603010010301', + // 2ๆœŸmint ๆœ€ๅคงๅฏmintๆ•ฐ้‡ + maxSupply: 2000, + // 2ๆœŸmint airdropๆ•ฐ้‡ + airdropCount: 500, +} + +var config = { + market, + admins, + token, + imtbl, + mint +}; + +module.exports = config; diff --git a/config/config_bsc_test.js b/config/config_bsc_test.js new file mode 100644 index 0000000..fc89049 --- /dev/null +++ b/config/config_bsc_test.js @@ -0,0 +1,59 @@ +const market = { + feeToAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + mallFeeAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + paymentTokens: [ + "0x8f34a7b59841bc87f7d80f9858490cc1412d50fb", // USDT + ], + verifier: "0x50A8e60041A206AcaA5F844a1104896224be6F39" +}; + +const admins = { + admin: "0x50A8e60041A206AcaA5F844a1104896224be6F39", + proposers: [ + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", + ], + confirmers: ["0x50A8e60041A206AcaA5F844a1104896224be6F39"], + executors: [ + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", + "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b", + ], +}; + +const token = { + baseTokenURIHero: "https://nft-test.kingsome.cn/hero/meta/13473/", + contractURIHero: 'https://nft-test.kingsome.cn/hero/home_meta/13473', + royaltyReceiver: '0x5Ab03Aa79Ab91B7420b5CFF134a4188388888888', + baseTokenURIGold: "https://nft-test.kingsome.cn/gold_bullion/meta/13473/", + contractURIGold: 'https://nft-test.kingsome.cn/gold_bullion/home_meta/13473', + royaltyFee: 5, +}; + +const imtbl = { + operatorAllowlist: '0x6b969FD89dE634d8DE3271EbE97734FEFfcd58eE', +} +const mint = { + // 2ๆœŸmintๆ”ฏไป˜็š„ไปฃๅธ + mintCurrency: '0xFd42bfb03212dA7e1A4608a44d7658641D99CF34', + // 2ๆœŸmint, ๅ•ไธชnftไปทๆ ผ + mintPrice: '75000000000000000', + // 2ๆœŸmintๆŽฅๆ”ถไปฃๅธ็š„้’ฑๅŒ…ๅœฐๅ€ + mintFeeAddress: '0x50A8e60041A206AcaA5F844a1104896224be6F39', + // 2ๆœŸmint nftid ๅผ€ๅง‹ + mintStartNftId: '6240603010010301', + // 2ๆœŸmint ๆœ€ๅคงๅฏmintๆ•ฐ้‡ + maxSupply: 2000, + // 2ๆœŸmint airdropๆ•ฐ้‡ + airdropCount: 500, +} + +var config = { + market, + admins, + token, + imtbl, + mint +}; + +module.exports = config; diff --git a/config/config_sepolia_test.js b/config/config_sepolia_test.js index adc8514..68c4f5a 100644 --- a/config/config_sepolia_test.js +++ b/config/config_sepolia_test.js @@ -2,8 +2,9 @@ const market = { feeToAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", mallFeeAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39", paymentTokens: [ - "0x514609B71340E149Cb81A80A953D07A7Fe41bd4F", // USDT + "0xedd5e19f46b3f8fe5ed16808f885565e2980cee0", // USDT ], + verifier: "0x50A8e60041A206AcaA5F844a1104896224be6F39" }; const admins = { diff --git a/deployments/arb_sepolia/.chainId b/deployments/arb_sepolia/.chainId new file mode 100644 index 0000000..71ba4d6 --- /dev/null +++ b/deployments/arb_sepolia/.chainId @@ -0,0 +1 @@ +421614 \ No newline at end of file diff --git a/deployments/arb_sepolia/GameItemMall.json b/deployments/arb_sepolia/GameItemMall.json new file mode 100644 index 0000000..086e404 --- /dev/null +++ b/deployments/arb_sepolia/GameItemMall.json @@ -0,0 +1,680 @@ +{ + "address": "0xB3f4087F2dB4778E97CCB9D9F326e146B4561Eb7", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_duration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "AddERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "DurationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "feeToAddress", + "type": "address" + } + ], + "name": "FeeToAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ItemSoldOut", + "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": "erc20", + "type": "address" + } + ], + "name": "RemoveERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "VerifierUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "_CACHED_CHAIN_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_CACHED_THIS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "addERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "buy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "checkSigner", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "erc20Supported", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "internalType": "address", + "name": "_passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_chainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "getMessageHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "minDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + } + ], + "name": "orderIdUsed", + "outputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "removeERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + } + ], + "name": "setFeeToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "valNew", + "type": "uint256" + } + ], + "name": "updateDuation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_verifier", + "type": "address" + } + ], + "name": "updateVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xa5531c73cea1de5caf1d5c4d5d8903b2f4b532bf7200170d7f0f1d690a1fb9ce", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0xB3f4087F2dB4778E97CCB9D9F326e146B4561Eb7", + "transactionIndex": 1, + "gasUsed": "1701062", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800800000000000000000000000000000000000000200000000000000000000000000001000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000020000000000000000000000000000000000000020000000000000000000000000000", + "blockHash": "0x9785a300d7a45dcf11b49e3fb8bf5e48d841877efe4449ee04f750544733c55f", + "transactionHash": "0xa5531c73cea1de5caf1d5c4d5d8903b2f4b532bf7200170d7f0f1d690a1fb9ce", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 71192979, + "transactionHash": "0xa5531c73cea1de5caf1d5c4d5d8903b2f4b532bf7200170d7f0f1d690a1fb9ce", + "address": "0xB3f4087F2dB4778E97CCB9D9F326e146B4561Eb7", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x9785a300d7a45dcf11b49e3fb8bf5e48d841877efe4449ee04f750544733c55f" + } + ], + "blockNumber": 71192979, + "cumulativeGasUsed": "1701062", + "status": 1, + "byzantium": true + }, + "args": [ + "0x55bef0fc1423421c3ce1e070d9671e4b417db57c", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + 3600 + ], + "numDeployments": 1, + "solcInputHash": "1c04b3fecb15d8649fd77113581951ef", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"AddERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToAddress\",\"type\":\"address\"}],\"name\":\"FeeToAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ItemSoldOut\",\"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\":\"erc20\",\"type\":\"address\"}],\"name\":\"RemoveERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"addERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"buy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"erc20Supported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"itemId\",\"type\":\"uint256\"}],\"name\":\"orderIdUsed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"removeERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"}],\"name\":\"setFeeToAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.\",\"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. 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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"title\":\"GameItemMall\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mall/GameItemMall.sol\":\"GameItemMall\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"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/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"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.4) (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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\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\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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 (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/mall/GameItemMall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\nimport {MallBase} from \\\"./MallBase.sol\\\";\\n\\n/**\\n * @title GameItemMall\\n * @dev GameItemMall is a contract for managing centralized game items sale,\\n * allowing users to buy item in game.\\n */\\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\\n using SafeERC20 for IERC20;\\n\\n mapping(uint256 itemId => address user) public orderIdUsed;\\n\\n event ItemSoldOut(\\n address indexed buyer,\\n address indexed passport,\\n uint256 indexed orderId,\\n address currency,\\n uint256 amount\\n );\\n\\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \\n TimeChecker(_duration)\\n MallBase(_currency, _feeToAddress, _verifier){\\n }\\n\\n function buy(\\n address passport,\\n uint256 orderId,\\n address currency,\\n uint256 amount,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\\n require(passport != address(0), \\\"passport address can not be zero\\\");\\n // check if orderId is used\\n require(orderIdUsed[orderId] == address(0), \\\"orderId is used\\\");\\n // check if currency is supported\\n require(erc20Supported[currency], \\\"currency is not supported\\\");\\n // check if amount is valid\\n require(amount > 0, \\\"amount is zero\\\");\\n address buyer = _msgSender();\\n bytes32 criteriaMessageHash = getMessageHash(\\n buyer,\\n passport,\\n orderId,\\n currency,\\n amount,\\n _CACHED_THIS,\\n _CACHED_CHAIN_ID,\\n signTime,\\n saltNonce\\n );\\n checkSigner(verifier, criteriaMessageHash, signature);\\n IERC20 paymentContract = IERC20(currency);\\n _useSignature(signature);\\n orderIdUsed[orderId] = buyer;\\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\\n }\\n\\n function getMessageHash(\\n address _buyer,\\n address _passport,\\n uint256 _orderId,\\n address _currency,\\n uint256 _amount,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(\\n _buyer,\\n _passport,\\n _orderId,\\n _currency,\\n _amount,\\n _contract,\\n _chainId,\\n _signTime,\\n _saltNonce\\n );\\n return keccak256(encoded);\\n }\\n}\",\"keccak256\":\"0x271035942f09e60d6b6f838c25260d0093603eb860c63baa6eeb9cddd1c06309\",\"license\":\"MIT\"},\"contracts/mall/MallBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nabstract contract MallBase is Ownable {\\n address public verifier;\\n // Address to receive transaction fee\\n address public feeToAddress;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n\\n mapping(address token => bool status) public erc20Supported;\\n event AddERC20Suppout(address erc20);\\n event RemoveERC20Suppout(address erc20);\\n event VerifierUpdated(address indexed verifier);\\n event FeeToAddressUpdated(address indexed feeToAddress);\\n\\n constructor(address _currency, address _feeToAddress, address _verifier) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n verifier = _verifier;\\n erc20Supported[_currency] = true;\\n feeToAddress = _feeToAddress;\\n }\\n\\n function addERC20Support(address erc20) external onlyOwner {\\n require(erc20 != address(0), \\\"ERC20 address can not be zero\\\");\\n erc20Supported[erc20] = true;\\n emit AddERC20Suppout(erc20);\\n }\\n\\n function removeERC20Support(address erc20) external onlyOwner {\\n erc20Supported[erc20] = false;\\n emit RemoveERC20Suppout(erc20);\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n\\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\\n require(\\n _feeToAddress != address(0),\\n \\\"fee received address can not be zero\\\"\\n );\\n feeToAddress = _feeToAddress;\\n emit FeeToAddressUpdated(_feeToAddress);\\n }\\n}\\n\",\"keccak256\":\"0x2b8fba2f1a8a04ed4d928f6e841cfb86184d180a5f686544ce7cb70bee230e7d\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c03461011e57601f61138d38819003918201601f19168301916001600160401b038311848410176101235780849260809460405283398101031261011e5761004781610139565b9061005460208201610139565b606061006260408401610139565b92015191600091604083549360018060a01b0319943386821617825582519760018060a01b0380968193823391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08780a3466080523060a05216876001541617600155168152600360205220600160ff1982541617905516906002541617600255600160045560065561070860075561123f908161014e82396080518181816106810152610cdc015260a0518181816102b801526106a30152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361011e5756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "devdoc": { + "details": "GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.", + "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. 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." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateDuation(uint256)": { + "details": "Change duration value" + }, + "updateVerifier(address)": { + "details": "update verifier address" + } + }, + "title": "GameItemMall", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2905, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "verifier", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2907, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "feeToAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 2915, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "erc20Supported", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 123, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_status", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 2605, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_usedSignatures", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes_memory_ptr,t_bool)" + }, + { + "astId": 3075, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "duration", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 3077, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "minDuration", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 2701, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "orderIdUsed", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes_memory_ptr,t_bool)": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia_test/solcInputs/8a2f4516b8e4e7985ccc7dc9c84d3cd1.json b/deployments/arb_sepolia/solcInputs/1c04b3fecb15d8649fd77113581951ef.json similarity index 51% rename from deployments/sepolia_test/solcInputs/8a2f4516b8e4e7985ccc7dc9c84d3cd1.json rename to deployments/arb_sepolia/solcInputs/1c04b3fecb15d8649fd77113581951ef.json index da0f532..92d3168 100644 --- a/deployments/sepolia_test/solcInputs/8a2f4516b8e4e7985ccc7dc9c84d3cd1.json +++ b/deployments/arb_sepolia/solcInputs/1c04b3fecb15d8649fd77113581951ef.json @@ -4,14 +4,20 @@ "@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" }, - "@openzeppelin/contracts/security/Pausable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n}\n" }, - "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\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 * CAUTION: See Security Considerations above.\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" }, - "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Receiver.sol\";\n\n/**\n * @dev Implementation of the {IERC721Receiver} interface.\n *\n * Accepts all token transfers.\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\n */\ncontract ERC721Holder is IERC721Receiver {\n /**\n * @dev See {IERC721Receiver-onERC721Received}.\n *\n * Always returns `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {\n return this.onERC721Received.selector;\n }\n}\n" + "@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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\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" + }, + "@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" }, "@openzeppelin/contracts/utils/Context.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" @@ -28,14 +34,14 @@ "@openzeppelin/contracts/utils/Strings.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" }, - "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" - }, "contracts/core/HasSignature.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract HasSignature is Ownable {\n mapping(bytes signature => bool status) private _usedSignatures;\n\n function checkSigner(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) public pure {\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\n\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\n require(recovered == signer, \"invalid signature\");\n }\n\n modifier signatureValid(bytes calldata signature) {\n require(\n !_usedSignatures[signature],\n \"signature used. please send another transaction with new signature\"\n );\n _;\n }\n\n function _useSignature(bytes calldata signature) internal {\n if (!_usedSignatures[signature]) {\n _usedSignatures[signature] = true;\n }\n }\n}\n" }, - "contracts/game/NFTLockMain.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {ERC721Holder} from \"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\";\nimport {EnumerableSet} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport {HasSignature} from \"../core/HasSignature.sol\";\nimport {TimeChecker} from \"../utils/TimeChecker.sol\";\n\ninterface INFT {\n function mint(address to, uint256 tokenID) external;\n function transferFrom(address from, address to, uint256 tokenId) external;\n}\n\ncontract NFTLockMain is ERC721Holder, HasSignature, TimeChecker, Pausable {\n using EnumerableSet for EnumerableSet.UintSet;\n\n uint256 public immutable _CACHED_CHAIN_ID;\n address public immutable _CACHED_THIS;\n address public verifier;\n uint256 public maxBatch = 100;\n\n struct NFTInfo {\n uint256 tokenId;\n address to;\n bool isMint;\n }\n mapping(address nft => mapping(uint256 tokenId => address user)) public addressOriginal;\n mapping(address nft => mapping(address user => EnumerableSet.UintSet tokenIdSet)) private lockedRecords;\n mapping(address nft => bool status) public supportNftList;\n\n event UnLock(address indexed nft, address indexed user, uint256 nonce, NFTInfo[] nftList);\n event Lock(address indexed nft, address indexed sender, address indexed to, uint256[] tokenIds);\n event VerifierUpdated(address indexed verifier);\n\n constructor(uint256 _duration, address _verifier) TimeChecker(_duration) {\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_THIS = address(this);\n verifier = _verifier;\n }\n /**\n * lock NFT\n * from eoa only\n * @param nft nft address\n * @param to passport address for game\n * @param tokenIds nft token id list\n */\n function lock(address nft, address to, uint256[] calldata tokenIds) external whenNotPaused{\n require(tokenIds.length <= maxBatch, \"tokenIds too many\");\n require(to != address(0), \"passport can't be zero\");\n require(supportNftList[nft], \"not support nft\");\n address _sender = _msgSender();\n for (uint256 i = 0; i < tokenIds.length; i++) {\n addressOriginal[nft][tokenIds[i]] = _sender;\n lockedRecords[nft][_sender].add(tokenIds[i]);\n INFT(nft).transferFrom(_sender, address(this), tokenIds[i]);\n }\n emit Lock(nft, _sender, to, tokenIds);\n }\n /**\n * @dev unlock or mint nft\n * from passport only\n * if tokenId not exists, mint it\n * if exists and user is owner, unlock it\n */\n function unlockOrMint(\n address nft,\n NFTInfo[] calldata nftList,\n uint256 signTime,\n uint256 saltNonce,\n bytes calldata signature\n ) external signatureValid(signature) timeValid(signTime) {\n require(nftList.length <= maxBatch, \"tokenIds too many\");\n address _sender = _msgSender();\n bytes32 messageHash = getMessageHash(_sender, nft, nftList, _CACHED_THIS, _CACHED_CHAIN_ID, signTime, saltNonce);\n checkSigner(verifier, messageHash, signature);\n _useSignature(signature);\n for (uint256 i = 0; i < nftList.length; i++) {\n if (nftList[i].isMint) {\n INFT(nft).mint(nftList[i].to, nftList[i].tokenId);\n } else {\n require(addressOriginal[nft][nftList[i].tokenId] == _sender, \"not owner\");\n delete addressOriginal[nft][nftList[i].tokenId];\n lockedRecords[nft][_sender].remove(nftList[i].tokenId);\n INFT(nft).transferFrom(address(this), nftList[i].to, nftList[i].tokenId);\n }\n }\n emit UnLock(nft, _sender, saltNonce, nftList);\n }\n\n /**\n * @dev unlock nft\n * from game svr only\n */\n function unlockWithSvr(address nft, uint256[] calldata tokenIds) external onlyOwner{\n require(tokenIds.length <= maxBatch, \"tokenIds too many\");\n for (uint256 i = 0; i < tokenIds.length; i++) {\n address _sender = addressOriginal[nft][tokenIds[i]];\n delete addressOriginal[nft][tokenIds[i]];\n lockedRecords[nft][_sender].remove(tokenIds[i]);\n INFT(nft).transferFrom(address(this), _sender, tokenIds[i]);\n }\n }\n\n /** ------get------- **/\n function lockedNum(address token, address user) public view returns (uint256) {\n return lockedRecords[token][user].length();\n }\n\n function lockedNft(address token, address user) public view returns (uint256[] memory) {\n return lockedRecords[token][user].values();\n }\n\n function updateBatch(uint256 _maxBatch) external onlyOwner {\n maxBatch = _maxBatch;\n }\n\n function addSupportNftList(address[] calldata nftList) external onlyOwner {\n for (uint256 i = 0; i < nftList.length; i++) {\n supportNftList[nftList[i]] = true;\n }\n }\n function removeSupportNft(address nftAddress) external onlyOwner {\n require(supportNftList[nftAddress], \"can't remove\");\n delete supportNftList[nftAddress];\n }\n\n /**\n * @dev update verifier address\n */\n function updateVerifier(address _verifier) external onlyOwner {\n require(_verifier != address(0), \"NFTClaimer: address can not be zero\");\n verifier = _verifier;\n emit VerifierUpdated(_verifier);\n }\n\n function getMessageHash(\n address _to,\n address _nft,\n NFTInfo[] memory _ids,\n address _contract,\n uint256 _chainId,\n uint256 _signTime,\n uint256 _saltNonce\n ) public pure returns (bytes32) {\n bytes memory encoded = abi.encodePacked(_to, _nft, _contract, _chainId, _signTime, _saltNonce);\n for (uint256 i = 0; i < _ids.length; ++i) {\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].tokenId));\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].to));\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].isMint));\n }\n return keccak256(encoded);\n }\n}\n" + "contracts/mall/GameItemMall.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {HasSignature} from \"../core/HasSignature.sol\";\nimport {TimeChecker} from \"../utils/TimeChecker.sol\";\nimport {MallBase} from \"./MallBase.sol\";\n\n/**\n * @title GameItemMall\n * @dev GameItemMall is a contract for managing centralized game items sale,\n * allowing users to buy item in game.\n */\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\n using SafeERC20 for IERC20;\n\n mapping(uint256 itemId => address user) public orderIdUsed;\n\n event ItemSoldOut(\n address indexed buyer,\n address indexed passport,\n uint256 indexed orderId,\n address currency,\n uint256 amount\n );\n\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \n TimeChecker(_duration)\n MallBase(_currency, _feeToAddress, _verifier){\n }\n\n function buy(\n address passport,\n uint256 orderId,\n address currency,\n uint256 amount,\n uint256 signTime,\n uint256 saltNonce,\n bytes calldata signature\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\n require(passport != address(0), \"passport address can not be zero\");\n // check if orderId is used\n require(orderIdUsed[orderId] == address(0), \"orderId is used\");\n // check if currency is supported\n require(erc20Supported[currency], \"currency is not supported\");\n // check if amount is valid\n require(amount > 0, \"amount is zero\");\n address buyer = _msgSender();\n bytes32 criteriaMessageHash = getMessageHash(\n buyer,\n passport,\n orderId,\n currency,\n amount,\n _CACHED_THIS,\n _CACHED_CHAIN_ID,\n signTime,\n saltNonce\n );\n checkSigner(verifier, criteriaMessageHash, signature);\n IERC20 paymentContract = IERC20(currency);\n _useSignature(signature);\n orderIdUsed[orderId] = buyer;\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\n }\n\n function getMessageHash(\n address _buyer,\n address _passport,\n uint256 _orderId,\n address _currency,\n uint256 _amount,\n address _contract,\n uint256 _chainId,\n uint256 _signTime,\n uint256 _saltNonce\n ) public pure returns (bytes32) {\n bytes memory encoded = abi.encodePacked(\n _buyer,\n _passport,\n _orderId,\n _currency,\n _amount,\n _contract,\n _chainId,\n _signTime,\n _saltNonce\n );\n return keccak256(encoded);\n }\n}" + }, + "contracts/mall/MallBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\nabstract contract MallBase is Ownable {\n address public verifier;\n // Address to receive transaction fee\n address public feeToAddress;\n\n uint256 public immutable _CACHED_CHAIN_ID;\n address public immutable _CACHED_THIS;\n\n mapping(address token => bool status) public erc20Supported;\n event AddERC20Suppout(address erc20);\n event RemoveERC20Suppout(address erc20);\n event VerifierUpdated(address indexed verifier);\n event FeeToAddressUpdated(address indexed feeToAddress);\n\n constructor(address _currency, address _feeToAddress, address _verifier) {\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_THIS = address(this);\n verifier = _verifier;\n erc20Supported[_currency] = true;\n feeToAddress = _feeToAddress;\n }\n\n function addERC20Support(address erc20) external onlyOwner {\n require(erc20 != address(0), \"ERC20 address can not be zero\");\n erc20Supported[erc20] = true;\n emit AddERC20Suppout(erc20);\n }\n\n function removeERC20Support(address erc20) external onlyOwner {\n erc20Supported[erc20] = false;\n emit RemoveERC20Suppout(erc20);\n }\n\n /**\n * @dev update verifier address\n */\n function updateVerifier(address _verifier) external onlyOwner {\n require(_verifier != address(0), \"address can not be zero\");\n verifier = _verifier;\n emit VerifierUpdated(_verifier);\n }\n\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\n require(\n _feeToAddress != address(0),\n \"fee received address can not be zero\"\n );\n feeToAddress = _feeToAddress;\n emit FeeToAddressUpdated(_feeToAddress);\n }\n}\n" }, "contracts/utils/TimeChecker.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract TimeChecker is Ownable {\n uint256 public duration;\n uint256 public minDuration;\n\n event DurationUpdated(uint256 indexed duration);\n\n constructor(uint256 _duration) {\n duration = _duration;\n minDuration = 30 minutes;\n }\n\n /**\n * @dev Check if the time is valid\n */\n modifier timeValid(uint256 time) {\n require(\n time + duration >= block.timestamp,\n \"expired, please send another transaction with new signature\"\n );\n _;\n }\n\n\n /**\n * @dev Change duration value\n */\n function updateDuation(uint256 valNew) external onlyOwner {\n require(valNew > minDuration, \"duration too short\");\n duration = valNew;\n emit DurationUpdated(valNew);\n }\n}\n" diff --git a/deployments/bsc_test/.chainId b/deployments/bsc_test/.chainId new file mode 100644 index 0000000..c4fbb1c --- /dev/null +++ b/deployments/bsc_test/.chainId @@ -0,0 +1 @@ +97 \ No newline at end of file diff --git a/deployments/bsc_test/GameItemMall.json b/deployments/bsc_test/GameItemMall.json new file mode 100644 index 0000000..847bc31 --- /dev/null +++ b/deployments/bsc_test/GameItemMall.json @@ -0,0 +1,680 @@ +{ + "address": "0xaE08adb5278B107D2501e7c61907e41FEf3887D7", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_duration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "AddERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "DurationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "feeToAddress", + "type": "address" + } + ], + "name": "FeeToAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ItemSoldOut", + "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": "erc20", + "type": "address" + } + ], + "name": "RemoveERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "VerifierUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "_CACHED_CHAIN_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_CACHED_THIS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "addERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "buy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "checkSigner", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "erc20Supported", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "internalType": "address", + "name": "_passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_chainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "getMessageHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "minDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + } + ], + "name": "orderIdUsed", + "outputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "removeERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + } + ], + "name": "setFeeToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "valNew", + "type": "uint256" + } + ], + "name": "updateDuation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_verifier", + "type": "address" + } + ], + "name": "updateVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xf97bac73a47d067d297d1b512c6ec189034b98558ec1d7a67834a5df4e894ef6", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0xaE08adb5278B107D2501e7c61907e41FEf3887D7", + "transactionIndex": 9, + "gasUsed": "1224337", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000020000000000000000010000000000000000000020000000000000000000000000000", + "blockHash": "0x3e39827715edf023468af7d53c887209df53fb99556424e94cba59ee8b55ac65", + "transactionHash": "0xf97bac73a47d067d297d1b512c6ec189034b98558ec1d7a67834a5df4e894ef6", + "logs": [ + { + "transactionIndex": 9, + "blockNumber": 42997823, + "transactionHash": "0xf97bac73a47d067d297d1b512c6ec189034b98558ec1d7a67834a5df4e894ef6", + "address": "0xaE08adb5278B107D2501e7c61907e41FEf3887D7", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x3e39827715edf023468af7d53c887209df53fb99556424e94cba59ee8b55ac65" + } + ], + "blockNumber": 42997823, + "cumulativeGasUsed": "1608411", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8f34a7b59841bc87f7d80f9858490cc1412d50fb", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + 3600 + ], + "numDeployments": 1, + "solcInputHash": "1c04b3fecb15d8649fd77113581951ef", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"AddERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToAddress\",\"type\":\"address\"}],\"name\":\"FeeToAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ItemSoldOut\",\"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\":\"erc20\",\"type\":\"address\"}],\"name\":\"RemoveERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"addERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"buy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"erc20Supported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"itemId\",\"type\":\"uint256\"}],\"name\":\"orderIdUsed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"removeERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"}],\"name\":\"setFeeToAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.\",\"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. 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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"title\":\"GameItemMall\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mall/GameItemMall.sol\":\"GameItemMall\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"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/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"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.4) (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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\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\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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 (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/mall/GameItemMall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\nimport {MallBase} from \\\"./MallBase.sol\\\";\\n\\n/**\\n * @title GameItemMall\\n * @dev GameItemMall is a contract for managing centralized game items sale,\\n * allowing users to buy item in game.\\n */\\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\\n using SafeERC20 for IERC20;\\n\\n mapping(uint256 itemId => address user) public orderIdUsed;\\n\\n event ItemSoldOut(\\n address indexed buyer,\\n address indexed passport,\\n uint256 indexed orderId,\\n address currency,\\n uint256 amount\\n );\\n\\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \\n TimeChecker(_duration)\\n MallBase(_currency, _feeToAddress, _verifier){\\n }\\n\\n function buy(\\n address passport,\\n uint256 orderId,\\n address currency,\\n uint256 amount,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\\n require(passport != address(0), \\\"passport address can not be zero\\\");\\n // check if orderId is used\\n require(orderIdUsed[orderId] == address(0), \\\"orderId is used\\\");\\n // check if currency is supported\\n require(erc20Supported[currency], \\\"currency is not supported\\\");\\n // check if amount is valid\\n require(amount > 0, \\\"amount is zero\\\");\\n address buyer = _msgSender();\\n bytes32 criteriaMessageHash = getMessageHash(\\n buyer,\\n passport,\\n orderId,\\n currency,\\n amount,\\n _CACHED_THIS,\\n _CACHED_CHAIN_ID,\\n signTime,\\n saltNonce\\n );\\n checkSigner(verifier, criteriaMessageHash, signature);\\n IERC20 paymentContract = IERC20(currency);\\n _useSignature(signature);\\n orderIdUsed[orderId] = buyer;\\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\\n }\\n\\n function getMessageHash(\\n address _buyer,\\n address _passport,\\n uint256 _orderId,\\n address _currency,\\n uint256 _amount,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(\\n _buyer,\\n _passport,\\n _orderId,\\n _currency,\\n _amount,\\n _contract,\\n _chainId,\\n _signTime,\\n _saltNonce\\n );\\n return keccak256(encoded);\\n }\\n}\",\"keccak256\":\"0x271035942f09e60d6b6f838c25260d0093603eb860c63baa6eeb9cddd1c06309\",\"license\":\"MIT\"},\"contracts/mall/MallBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nabstract contract MallBase is Ownable {\\n address public verifier;\\n // Address to receive transaction fee\\n address public feeToAddress;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n\\n mapping(address token => bool status) public erc20Supported;\\n event AddERC20Suppout(address erc20);\\n event RemoveERC20Suppout(address erc20);\\n event VerifierUpdated(address indexed verifier);\\n event FeeToAddressUpdated(address indexed feeToAddress);\\n\\n constructor(address _currency, address _feeToAddress, address _verifier) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n verifier = _verifier;\\n erc20Supported[_currency] = true;\\n feeToAddress = _feeToAddress;\\n }\\n\\n function addERC20Support(address erc20) external onlyOwner {\\n require(erc20 != address(0), \\\"ERC20 address can not be zero\\\");\\n erc20Supported[erc20] = true;\\n emit AddERC20Suppout(erc20);\\n }\\n\\n function removeERC20Support(address erc20) external onlyOwner {\\n erc20Supported[erc20] = false;\\n emit RemoveERC20Suppout(erc20);\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n\\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\\n require(\\n _feeToAddress != address(0),\\n \\\"fee received address can not be zero\\\"\\n );\\n feeToAddress = _feeToAddress;\\n emit FeeToAddressUpdated(_feeToAddress);\\n }\\n}\\n\",\"keccak256\":\"0x2b8fba2f1a8a04ed4d928f6e841cfb86184d180a5f686544ce7cb70bee230e7d\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c03461011e57601f61138d38819003918201601f19168301916001600160401b038311848410176101235780849260809460405283398101031261011e5761004781610139565b9061005460208201610139565b606061006260408401610139565b92015191600091604083549360018060a01b0319943386821617825582519760018060a01b0380968193823391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08780a3466080523060a05216876001541617600155168152600360205220600160ff1982541617905516906002541617600255600160045560065561070860075561123f908161014e82396080518181816106810152610cdc015260a0518181816102b801526106a30152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361011e5756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "devdoc": { + "details": "GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.", + "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. 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." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateDuation(uint256)": { + "details": "Change duration value" + }, + "updateVerifier(address)": { + "details": "update verifier address" + } + }, + "title": "GameItemMall", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2905, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "verifier", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2907, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "feeToAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 2915, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "erc20Supported", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 123, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_status", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 2605, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_usedSignatures", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes_memory_ptr,t_bool)" + }, + { + "astId": 3075, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "duration", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 3077, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "minDuration", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 2701, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "orderIdUsed", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes_memory_ptr,t_bool)": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/bsc_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json b/deployments/bsc_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json new file mode 100644 index 0000000..92d3168 --- /dev/null +++ b/deployments/bsc_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json @@ -0,0 +1,78 @@ +{ + "language": "Solidity", + "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" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\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 * CAUTION: See Security Considerations above.\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" + }, + "@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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\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" + }, + "@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" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n รท 2 + 1, and for v in (302): v โˆˆ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // โ†’ `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // โ†’ `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/core/HasSignature.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract HasSignature is Ownable {\n mapping(bytes signature => bool status) private _usedSignatures;\n\n function checkSigner(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) public pure {\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\n\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\n require(recovered == signer, \"invalid signature\");\n }\n\n modifier signatureValid(bytes calldata signature) {\n require(\n !_usedSignatures[signature],\n \"signature used. please send another transaction with new signature\"\n );\n _;\n }\n\n function _useSignature(bytes calldata signature) internal {\n if (!_usedSignatures[signature]) {\n _usedSignatures[signature] = true;\n }\n }\n}\n" + }, + "contracts/mall/GameItemMall.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {HasSignature} from \"../core/HasSignature.sol\";\nimport {TimeChecker} from \"../utils/TimeChecker.sol\";\nimport {MallBase} from \"./MallBase.sol\";\n\n/**\n * @title GameItemMall\n * @dev GameItemMall is a contract for managing centralized game items sale,\n * allowing users to buy item in game.\n */\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\n using SafeERC20 for IERC20;\n\n mapping(uint256 itemId => address user) public orderIdUsed;\n\n event ItemSoldOut(\n address indexed buyer,\n address indexed passport,\n uint256 indexed orderId,\n address currency,\n uint256 amount\n );\n\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \n TimeChecker(_duration)\n MallBase(_currency, _feeToAddress, _verifier){\n }\n\n function buy(\n address passport,\n uint256 orderId,\n address currency,\n uint256 amount,\n uint256 signTime,\n uint256 saltNonce,\n bytes calldata signature\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\n require(passport != address(0), \"passport address can not be zero\");\n // check if orderId is used\n require(orderIdUsed[orderId] == address(0), \"orderId is used\");\n // check if currency is supported\n require(erc20Supported[currency], \"currency is not supported\");\n // check if amount is valid\n require(amount > 0, \"amount is zero\");\n address buyer = _msgSender();\n bytes32 criteriaMessageHash = getMessageHash(\n buyer,\n passport,\n orderId,\n currency,\n amount,\n _CACHED_THIS,\n _CACHED_CHAIN_ID,\n signTime,\n saltNonce\n );\n checkSigner(verifier, criteriaMessageHash, signature);\n IERC20 paymentContract = IERC20(currency);\n _useSignature(signature);\n orderIdUsed[orderId] = buyer;\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\n }\n\n function getMessageHash(\n address _buyer,\n address _passport,\n uint256 _orderId,\n address _currency,\n uint256 _amount,\n address _contract,\n uint256 _chainId,\n uint256 _signTime,\n uint256 _saltNonce\n ) public pure returns (bytes32) {\n bytes memory encoded = abi.encodePacked(\n _buyer,\n _passport,\n _orderId,\n _currency,\n _amount,\n _contract,\n _chainId,\n _signTime,\n _saltNonce\n );\n return keccak256(encoded);\n }\n}" + }, + "contracts/mall/MallBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\nabstract contract MallBase is Ownable {\n address public verifier;\n // Address to receive transaction fee\n address public feeToAddress;\n\n uint256 public immutable _CACHED_CHAIN_ID;\n address public immutable _CACHED_THIS;\n\n mapping(address token => bool status) public erc20Supported;\n event AddERC20Suppout(address erc20);\n event RemoveERC20Suppout(address erc20);\n event VerifierUpdated(address indexed verifier);\n event FeeToAddressUpdated(address indexed feeToAddress);\n\n constructor(address _currency, address _feeToAddress, address _verifier) {\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_THIS = address(this);\n verifier = _verifier;\n erc20Supported[_currency] = true;\n feeToAddress = _feeToAddress;\n }\n\n function addERC20Support(address erc20) external onlyOwner {\n require(erc20 != address(0), \"ERC20 address can not be zero\");\n erc20Supported[erc20] = true;\n emit AddERC20Suppout(erc20);\n }\n\n function removeERC20Support(address erc20) external onlyOwner {\n erc20Supported[erc20] = false;\n emit RemoveERC20Suppout(erc20);\n }\n\n /**\n * @dev update verifier address\n */\n function updateVerifier(address _verifier) external onlyOwner {\n require(_verifier != address(0), \"address can not be zero\");\n verifier = _verifier;\n emit VerifierUpdated(_verifier);\n }\n\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\n require(\n _feeToAddress != address(0),\n \"fee received address can not be zero\"\n );\n feeToAddress = _feeToAddress;\n emit FeeToAddressUpdated(_feeToAddress);\n }\n}\n" + }, + "contracts/utils/TimeChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract TimeChecker is Ownable {\n uint256 public duration;\n uint256 public minDuration;\n\n event DurationUpdated(uint256 indexed duration);\n\n constructor(uint256 _duration) {\n duration = _duration;\n minDuration = 30 minutes;\n }\n\n /**\n * @dev Check if the time is valid\n */\n modifier timeValid(uint256 time) {\n require(\n time + duration >= block.timestamp,\n \"expired, please send another transaction with new signature\"\n );\n _;\n }\n\n\n /**\n * @dev Change duration value\n */\n function updateDuation(uint256 valNew) external onlyOwner {\n require(valNew > minDuration, \"duration too short\");\n duration = valNew;\n emit DurationUpdated(valNew);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia_test/GameItemMall.json b/deployments/sepolia_test/GameItemMall.json new file mode 100644 index 0000000..3c560b4 --- /dev/null +++ b/deployments/sepolia_test/GameItemMall.json @@ -0,0 +1,680 @@ +{ + "address": "0x45E2Eae3634a69Fb9242397A75dd5751aEa8041e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_duration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "AddERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "DurationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "feeToAddress", + "type": "address" + } + ], + "name": "FeeToAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ItemSoldOut", + "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": "erc20", + "type": "address" + } + ], + "name": "RemoveERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "VerifierUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "_CACHED_CHAIN_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_CACHED_THIS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "addERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "buy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "checkSigner", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "erc20Supported", + "outputs": [ + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "internalType": "address", + "name": "_passport", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_orderId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_chainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_signTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "getMessageHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "minDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + } + ], + "name": "orderIdUsed", + "outputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "removeERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + } + ], + "name": "setFeeToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "valNew", + "type": "uint256" + } + ], + "name": "updateDuation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_verifier", + "type": "address" + } + ], + "name": "updateVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7d637bf5f00fc6e7b1743e24811d8c40793de7238d3a0c771f75532c1d72a486", + "receipt": { + "to": null, + "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "contractAddress": "0x45E2Eae3634a69Fb9242397A75dd5751aEa8041e", + "transactionIndex": 85, + "gasUsed": "1224337", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000080000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000020000000000000000000000000000000000000020000000000002000000000000000", + "blockHash": "0x89d3b305e6524d0bc36cb37061ba97c4777774064c8112ed06456ece54452b3f", + "transactionHash": "0x7d637bf5f00fc6e7b1743e24811d8c40793de7238d3a0c771f75532c1d72a486", + "logs": [ + { + "transactionIndex": 85, + "blockNumber": 6504090, + "transactionHash": "0x7d637bf5f00fc6e7b1743e24811d8c40793de7238d3a0c771f75532c1d72a486", + "address": "0x45E2Eae3634a69Fb9242397A75dd5751aEa8041e", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39" + ], + "data": "0x", + "logIndex": 241, + "blockHash": "0x89d3b305e6524d0bc36cb37061ba97c4777774064c8112ed06456ece54452b3f" + } + ], + "blockNumber": 6504090, + "cumulativeGasUsed": "16981153", + "status": 1, + "byzantium": true + }, + "args": [ + "0xedd5e19f46b3f8fe5ed16808f885565e2980cee0", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + "0x50A8e60041A206AcaA5F844a1104896224be6F39", + 3600 + ], + "numDeployments": 1, + "solcInputHash": "1c04b3fecb15d8649fd77113581951ef", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"AddERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToAddress\",\"type\":\"address\"}],\"name\":\"FeeToAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ItemSoldOut\",\"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\":\"erc20\",\"type\":\"address\"}],\"name\":\"RemoveERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"addERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"buy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"erc20Supported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_passport\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_orderId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"itemId\",\"type\":\"uint256\"}],\"name\":\"orderIdUsed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"removeERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"}],\"name\":\"setFeeToAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.\",\"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. 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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"title\":\"GameItemMall\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mall/GameItemMall.sol\":\"GameItemMall\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"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/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"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.4) (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 *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\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 * CAUTION: See Security Considerations above.\\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\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\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\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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 (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/mall/GameItemMall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\nimport {MallBase} from \\\"./MallBase.sol\\\";\\n\\n/**\\n * @title GameItemMall\\n * @dev GameItemMall is a contract for managing centralized game items sale,\\n * allowing users to buy item in game.\\n */\\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\\n using SafeERC20 for IERC20;\\n\\n mapping(uint256 itemId => address user) public orderIdUsed;\\n\\n event ItemSoldOut(\\n address indexed buyer,\\n address indexed passport,\\n uint256 indexed orderId,\\n address currency,\\n uint256 amount\\n );\\n\\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \\n TimeChecker(_duration)\\n MallBase(_currency, _feeToAddress, _verifier){\\n }\\n\\n function buy(\\n address passport,\\n uint256 orderId,\\n address currency,\\n uint256 amount,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\\n require(passport != address(0), \\\"passport address can not be zero\\\");\\n // check if orderId is used\\n require(orderIdUsed[orderId] == address(0), \\\"orderId is used\\\");\\n // check if currency is supported\\n require(erc20Supported[currency], \\\"currency is not supported\\\");\\n // check if amount is valid\\n require(amount > 0, \\\"amount is zero\\\");\\n address buyer = _msgSender();\\n bytes32 criteriaMessageHash = getMessageHash(\\n buyer,\\n passport,\\n orderId,\\n currency,\\n amount,\\n _CACHED_THIS,\\n _CACHED_CHAIN_ID,\\n signTime,\\n saltNonce\\n );\\n checkSigner(verifier, criteriaMessageHash, signature);\\n IERC20 paymentContract = IERC20(currency);\\n _useSignature(signature);\\n orderIdUsed[orderId] = buyer;\\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\\n }\\n\\n function getMessageHash(\\n address _buyer,\\n address _passport,\\n uint256 _orderId,\\n address _currency,\\n uint256 _amount,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(\\n _buyer,\\n _passport,\\n _orderId,\\n _currency,\\n _amount,\\n _contract,\\n _chainId,\\n _signTime,\\n _saltNonce\\n );\\n return keccak256(encoded);\\n }\\n}\",\"keccak256\":\"0x271035942f09e60d6b6f838c25260d0093603eb860c63baa6eeb9cddd1c06309\",\"license\":\"MIT\"},\"contracts/mall/MallBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nabstract contract MallBase is Ownable {\\n address public verifier;\\n // Address to receive transaction fee\\n address public feeToAddress;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n\\n mapping(address token => bool status) public erc20Supported;\\n event AddERC20Suppout(address erc20);\\n event RemoveERC20Suppout(address erc20);\\n event VerifierUpdated(address indexed verifier);\\n event FeeToAddressUpdated(address indexed feeToAddress);\\n\\n constructor(address _currency, address _feeToAddress, address _verifier) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n verifier = _verifier;\\n erc20Supported[_currency] = true;\\n feeToAddress = _feeToAddress;\\n }\\n\\n function addERC20Support(address erc20) external onlyOwner {\\n require(erc20 != address(0), \\\"ERC20 address can not be zero\\\");\\n erc20Supported[erc20] = true;\\n emit AddERC20Suppout(erc20);\\n }\\n\\n function removeERC20Support(address erc20) external onlyOwner {\\n erc20Supported[erc20] = false;\\n emit RemoveERC20Suppout(erc20);\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n\\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\\n require(\\n _feeToAddress != address(0),\\n \\\"fee received address can not be zero\\\"\\n );\\n feeToAddress = _feeToAddress;\\n emit FeeToAddressUpdated(_feeToAddress);\\n }\\n}\\n\",\"keccak256\":\"0x2b8fba2f1a8a04ed4d928f6e841cfb86184d180a5f686544ce7cb70bee230e7d\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c03461011e57601f61138d38819003918201601f19168301916001600160401b038311848410176101235780849260809460405283398101031261011e5761004781610139565b9061005460208201610139565b606061006260408401610139565b92015191600091604083549360018060a01b0319943386821617825582519760018060a01b0380968193823391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08780a3466080523060a05216876001541617600155168152600360205220600160ff1982541617905516906002541617600255600160045560065561070860075561123f908161014e82396080518181816106810152610cdc015260a0518181816102b801526106a30152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361011e5756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c918263083d80f914610d1e575081630fb5a6b414610cff5781632b437d4814610cc45781632b7ac3f314610c9b5781635671576114610c7c578163580bb9a514610bbf5781636d04319414610b60578163715018a614610b065781637999577a146105775781637f9d3096146104ea5781638da5cb5b146104c25781639017f79e1461048457816392cda7911461045157816397fc007c146103a0578163b9d2df61146102e7578163da28b527146102a3578163ed9f50671461022a578163f2fde38b14610163575063fdf397ee146100f657600080fd5b3461015f57602036600319011261015f5760207f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a91610133610d43565b61013b610de9565b6001600160a01b031680855260038352818520805460ff191690559051908152a180f35b5080fd5b9050346102265760203660031901126102265761017e610d43565b90610187610de9565b6001600160a01b039182169283156101d457505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461015f5761012036600319011261015f57610246610d43565b60243592906001600160a01b038085168503610226576064359281841684036102a05760a43591821682036102a05750916020949161029993610104359360e4359360c435936084359260443591611185565b9051908152f35b80fd5b50503461015f578160031936011261015f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9190503461022657602036600319011261022657610303610d43565b61030b610de9565b6001600160a01b031691821561035e5750816020917f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9793855260038352808520600160ff1982541617905551908152a180f35b6020606492519162461bcd60e51b8352820152601d60248201527f455243323020616464726573732063616e206e6f74206265207a65726f0000006044820152fd5b905034610226576020366003190112610226576103bb610d43565b6103c3610de9565b6001600160a01b031691821561040e575050600180546001600160a01b031916821790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b906020606492519162461bcd60e51b8352820152601760248201527f616464726573732063616e206e6f74206265207a65726f0000000000000000006044820152fd5b9050346102265760203660031901126102265735825260086020908152918190205490516001600160a01b039091168152f35b50503461015f57602036600319011261015f5760209160ff9082906001600160a01b036104af610d43565b1681526003855220541690519015158152f35b50503461015f578160031936011261015f57905490516001600160a01b039091168152602090f35b90503461022657602036600319011261022657803591610508610de9565b60075483111561053f575050806006557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b8284346102a05760e03660031901126102a057610592610d43565b6044803594909390916001600160a01b0380871691828803610b025760c4359667ffffffffffffffff90818911610afe573660238a011215610afe578887013591808311610afa576024903682858d010111610af6576002895414610ab557600289558188519b019380858d3760ff8c8281016005815260209e8f91030190205416610a435760065494608435958601808711610a315742116109c95787871615610989578c9d888b8e9f9d9e87359e8f82526008905220541661095457898e5260038f528a8e205460ff1615610911576064359687156108de578f92916106c9906106e0928f8c8c60a435947f0000000000000000000000000000000000000000000000000000000000000000937f00000000000000000000000000000000000000000000000000000000000000009333611185565b8a60015416906106da368786610db2565b91610e41565b60ff8b5184838237838186810160058152030190205416156108b9575b505050888b5260088c52878b20336bffffffffffffffffffffffff60a01b825416179055856002541688518d8101916323b872dd60e01b83523385830152858201528560648201526064815260a0810192818410818511176108a75760e08201908111848210176108a7578a8f928f8c6107d397968280969481958752888a527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c082015251925af1913d1561089b573d6107c46107bb82610d96565b93519384610d5e565b825281933d92013e5b896110b1565b80518c8115918215610877575b5050905015610824575050907fd38da03f101822cfefe43d9029fac0a1d3512e2fc9d1fed9e75e9773b1f68225929160019899865195865285015216923392a45580f35b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e608492602a8b938e8b519562461bcd60e51b8752860152840152820152691bdd081cdd58d8d9595960b21b6064820152fd5b8380929350010312610897578b0151801515810361089757808c8e6107e0565b8a80fd5b505090506060906107cd565b634e487b7160e01b8e5260418d52848efd5b828b51938492833781016005815203019020600160ff198254161790558c8c816106fd565b8f8e6d616d6f756e74206973207a65726f60901b898f8a606495600e92519562461bcd60e51b8752860152840152820152fd5b5050885162461bcd60e51b8152808c018e90526019818501527f63757272656e6379206973206e6f7420737570706f727465640000000000000081860152606490fd5b5050885162461bcd60e51b8152808c018e9052600f818501526e1bdc99195c9259081a5cc81d5cd959608a1b81860152606490fd5b5060648a7f70617373706f727420616464726573732063616e206e6f74206265207a65726f868f87818f519562461bcd60e51b8752860152840152820152fd5b50885162461bcd60e51b8152808b018d9052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e617475726500000000006064820152608490fd5b634e487b7160e01b8d5260118c52848dfd5b885162461bcd60e51b8152808b018d90526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e617475606482015261726560f01b608482015260a490fd5b875162461bcd60e51b81526020818b0152601f818401527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081850152606490fd5b8980fd5b8880fd5b8780fd5b8580fd5b83346102a057806003193601126102a057610b1f610de9565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83903461015f57606036600319011261015f57610b7b610d43565b60443567ffffffffffffffff8111610bbb5736602382011215610bbb57610bb892816024610bae93369301359101610db2565b9060243590610e41565b80f35b8380fd5b90503461022657602036600319011261022657610bda610d43565b610be2610de9565b6001600160a01b0316918215610c2d575050600280546001600160a01b031916821790557f596429105459b786e574d1ba9affd6dd30de03c9a039edaf054d830f315c72838280a280f35b906020608492519162461bcd60e51b83528201526024808201527f66656520726563656976656420616464726573732063616e206e6f74206265206044820152637a65726f60e01b6064820152fd5b50503461015f578160031936011261015f576020906007549051908152f35b50503461015f578160031936011261015f5760015490516001600160a01b039091168152602090f35b50503461015f578160031936011261015f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461015f578160031936011261015f576020906006549051908152f35b84903461015f578160031936011261015f576002546001600160a01b03168152602090f35b600435906001600160a01b0382168203610d5957565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610d8057604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111610d8057601f01601f191660200190565b929192610dbe82610d96565b91610dcc6040519384610d5e565b829481845281830111610d59578281602093846000960137010152565b6000546001600160a01b03163303610dfd57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90610e8392610e7b917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c600020610fea565b929092610ed0565b6001600160a01b03908116911603610e9757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b6005811015610fd45780610ee15750565b60018103610f2e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b60028103610f7b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b600314610f8457565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b90604181511460001461101857611014916020820151906060604084015193015160001a90611022565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116110a55791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156110985781516001600160a01b03811615611092579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b9192901561111357508151156110c5575090565b3b156110ce5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156111265750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061116c575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611149565b9795939092969491976040519760208901996bffffffffffffffffffffffff19809681809560601b168d5260601b1660348b015260488a015260601b166068880152607c87015260601b16609c85015260b084015260d083015260f082015260f08152610120810181811067ffffffffffffffff821117610d80576040525190209056fea26469706673582212200c40fe2e0b1891e620d0015c747efee8ad23fe7b2e096dc4fefd3f6c4ea91fd364736f6c63430008130033", + "devdoc": { + "details": "GameItemMall is a contract for managing centralized game items sale, allowing users to buy item in game.", + "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. 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." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateDuation(uint256)": { + "details": "Change duration value" + }, + "updateVerifier(address)": { + "details": "update verifier address" + } + }, + "title": "GameItemMall", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2905, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "verifier", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2907, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "feeToAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 2915, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "erc20Supported", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 123, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_status", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 2605, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "_usedSignatures", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes_memory_ptr,t_bool)" + }, + { + "astId": 3075, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "duration", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 3077, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "minDuration", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 2701, + "contract": "contracts/mall/GameItemMall.sol:GameItemMall", + "label": "orderIdUsed", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes_memory_ptr,t_bool)": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia_test/NFTLockMain.json b/deployments/sepolia_test/NFTLockMain.json deleted file mode 100644 index 1647c94..0000000 --- a/deployments/sepolia_test/NFTLockMain.json +++ /dev/null @@ -1,969 +0,0 @@ -{ - "address": "0x7F2b4DB626d878778e178B4F0C7bA3a2870C6dd0", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_verifier", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "DurationUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "tokenIds", - "type": "uint256[]" - } - ], - "name": "Lock", - "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": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "isMint", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct NFTLockMain.NFTInfo[]", - "name": "nftList", - "type": "tuple[]" - } - ], - "name": "UnLock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "VerifierUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "_CACHED_CHAIN_ID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_CACHED_THIS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "nftList", - "type": "address[]" - } - ], - "name": "addSupportNftList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "addressOriginal", - "outputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "checkSigner", - "outputs": [], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "address", - "name": "_nft", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "isMint", - "type": "bool" - } - ], - "internalType": "struct NFTLockMain.NFTInfo[]", - "name": "_ids", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_signTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_saltNonce", - "type": "uint256" - } - ], - "name": "getMessageHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "tokenIds", - "type": "uint256[]" - } - ], - "name": "lock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "lockedNft", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "lockedNum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxBatch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minDuration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nftAddress", - "type": "address" - } - ], - "name": "removeSupportNft", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nft", - "type": "address" - } - ], - "name": "supportNftList", - "outputs": [ - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bool", - "name": "isMint", - "type": "bool" - } - ], - "internalType": "struct NFTLockMain.NFTInfo[]", - "name": "nftList", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "signTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "unlockOrMint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nft", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "tokenIds", - "type": "uint256[]" - } - ], - "name": "unlockWithSvr", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxBatch", - "type": "uint256" - } - ], - "name": "updateBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "valNew", - "type": "uint256" - } - ], - "name": "updateDuation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_verifier", - "type": "address" - } - ], - "name": "updateVerifier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "verifier", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xd6a7ff17e466c791f91ebdc90aac6c80117efba43f8c8ff6a50f8bd15b6f9eb4", - "receipt": { - "to": null, - "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0x7F2b4DB626d878778e178B4F0C7bA3a2870C6dd0", - "transactionIndex": 32, - "gasUsed": "1631036", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000080000000000020000000000000000000000000000000000000020000000000000000001000000000", - "blockHash": "0x35f8bb5fbcd66da4f281c348f2a6bd71eb216a332b7f25b22df0465f60df5f49", - "transactionHash": "0xd6a7ff17e466c791f91ebdc90aac6c80117efba43f8c8ff6a50f8bd15b6f9eb4", - "logs": [ - { - "transactionIndex": 32, - "blockNumber": 6326016, - "transactionHash": "0xd6a7ff17e466c791f91ebdc90aac6c80117efba43f8c8ff6a50f8bd15b6f9eb4", - "address": "0x7F2b4DB626d878778e178B4F0C7bA3a2870C6dd0", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39" - ], - "data": "0x", - "logIndex": 38, - "blockHash": "0x35f8bb5fbcd66da4f281c348f2a6bd71eb216a332b7f25b22df0465f60df5f49" - } - ], - "blockNumber": 6326016, - "cumulativeGasUsed": "5353848", - "status": 1, - "byzantium": true - }, - "args": [ - 3600, - "0x50A8e60041A206AcaA5F844a1104896224be6F39" - ], - "numDeployments": 1, - "solcInputHash": "8a2f4516b8e4e7985ccc7dc9c84d3cd1", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"Lock\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct NFTLockMain.NFTInfo[]\",\"name\":\"nftList\",\"type\":\"tuple[]\"}],\"name\":\"UnLock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_CACHED_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_CACHED_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"nftList\",\"type\":\"address[]\"}],\"name\":\"addSupportNftList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"addressOriginal\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"checkSigner\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nft\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"internalType\":\"struct NFTLockMain.NFTInfo[]\",\"name\":\"_ids\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"getMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"lockedNft\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"lockedNum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nftAddress\",\"type\":\"address\"}],\"name\":\"removeSupportNft\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"}],\"name\":\"supportNftList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMint\",\"type\":\"bool\"}],\"internalType\":\"struct NFTLockMain.NFTInfo[]\",\"name\":\"nftList\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"signTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"unlockOrMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nft\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"unlockWithSvr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxBatch\",\"type\":\"uint256\"}],\"name\":\"updateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valNew\",\"type\":\"uint256\"}],\"name\":\"updateDuation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"lock(address,address,uint256[])\":{\"params\":{\"nft\":\"nft address\",\"to\":\"passport address for game\",\"tokenIds\":\"nft token id list\"}},\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlockOrMint(address,(uint256,address,bool)[],uint256,uint256,bytes)\":{\"details\":\"unlock or mint nft from passport only if tokenId not exists, mint it if exists and user is owner, unlock it\"},\"unlockWithSvr(address,uint256[])\":{\"details\":\"unlock nft from game svr only\"},\"updateDuation(uint256)\":{\"details\":\"Change duration value\"},\"updateVerifier(address)\":{\"details\":\"update verifier address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"lock(address,address,uint256[])\":{\"notice\":\"lock NFT from eoa only\"},\"lockedNum(address,address)\":{\"notice\":\"------get------- *\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/game/NFTLockMain.sol\":\"NFTLockMain\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"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/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Receiver.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC721Receiver} interface.\\n *\\n * Accepts all token transfers.\\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\\n */\\ncontract ERC721Holder is IERC721Receiver {\\n /**\\n * @dev See {IERC721Receiver-onERC721Received}.\\n *\\n * Always returns `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {\\n return this.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0x67ef46fef257faae47adb630aad49694dda0334e5f7a7c5fb386243b974886b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/core/HasSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ECDSA} from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract HasSignature is Ownable {\\n mapping(bytes signature => bool status) private _usedSignatures;\\n\\n function checkSigner(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) public pure {\\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\\n\\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\\n require(recovered == signer, \\\"invalid signature\\\");\\n }\\n\\n modifier signatureValid(bytes calldata signature) {\\n require(\\n !_usedSignatures[signature],\\n \\\"signature used. please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n function _useSignature(bytes calldata signature) internal {\\n if (!_usedSignatures[signature]) {\\n _usedSignatures[signature] = true;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1999478f082b3dac416b579ea9385736e3015aa27ac7173c67555e21426ede51\",\"license\":\"MIT\"},\"contracts/game/NFTLockMain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {ERC721Holder} from \\\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\\\";\\nimport {EnumerableSet} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Pausable} from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport {HasSignature} from \\\"../core/HasSignature.sol\\\";\\nimport {TimeChecker} from \\\"../utils/TimeChecker.sol\\\";\\n\\ninterface INFT {\\n function mint(address to, uint256 tokenID) external;\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n}\\n\\ncontract NFTLockMain is ERC721Holder, HasSignature, TimeChecker, Pausable {\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n uint256 public immutable _CACHED_CHAIN_ID;\\n address public immutable _CACHED_THIS;\\n address public verifier;\\n uint256 public maxBatch = 100;\\n\\n struct NFTInfo {\\n uint256 tokenId;\\n address to;\\n bool isMint;\\n }\\n mapping(address nft => mapping(uint256 tokenId => address user)) public addressOriginal;\\n mapping(address nft => mapping(address user => EnumerableSet.UintSet tokenIdSet)) private lockedRecords;\\n mapping(address nft => bool status) public supportNftList;\\n\\n event UnLock(address indexed nft, address indexed user, uint256 nonce, NFTInfo[] nftList);\\n event Lock(address indexed nft, address indexed sender, address indexed to, uint256[] tokenIds);\\n event VerifierUpdated(address indexed verifier);\\n\\n constructor(uint256 _duration, address _verifier) TimeChecker(_duration) {\\n _CACHED_CHAIN_ID = block.chainid;\\n _CACHED_THIS = address(this);\\n verifier = _verifier;\\n }\\n /**\\n * lock NFT\\n * from eoa only\\n * @param nft nft address\\n * @param to passport address for game\\n * @param tokenIds nft token id list\\n */\\n function lock(address nft, address to, uint256[] calldata tokenIds) external whenNotPaused{\\n require(tokenIds.length <= maxBatch, \\\"tokenIds too many\\\");\\n require(to != address(0), \\\"passport can't be zero\\\");\\n require(supportNftList[nft], \\\"not support nft\\\");\\n address _sender = _msgSender();\\n for (uint256 i = 0; i < tokenIds.length; i++) {\\n addressOriginal[nft][tokenIds[i]] = _sender;\\n lockedRecords[nft][_sender].add(tokenIds[i]);\\n INFT(nft).transferFrom(_sender, address(this), tokenIds[i]);\\n }\\n emit Lock(nft, _sender, to, tokenIds);\\n }\\n /**\\n * @dev unlock or mint nft\\n * from passport only\\n * if tokenId not exists, mint it\\n * if exists and user is owner, unlock it\\n */\\n function unlockOrMint(\\n address nft,\\n NFTInfo[] calldata nftList,\\n uint256 signTime,\\n uint256 saltNonce,\\n bytes calldata signature\\n ) external signatureValid(signature) timeValid(signTime) {\\n require(nftList.length <= maxBatch, \\\"tokenIds too many\\\");\\n address _sender = _msgSender();\\n bytes32 messageHash = getMessageHash(_sender, nft, nftList, _CACHED_THIS, _CACHED_CHAIN_ID, signTime, saltNonce);\\n checkSigner(verifier, messageHash, signature);\\n _useSignature(signature);\\n for (uint256 i = 0; i < nftList.length; i++) {\\n if (nftList[i].isMint) {\\n INFT(nft).mint(nftList[i].to, nftList[i].tokenId);\\n } else {\\n require(addressOriginal[nft][nftList[i].tokenId] == _sender, \\\"not owner\\\");\\n delete addressOriginal[nft][nftList[i].tokenId];\\n lockedRecords[nft][_sender].remove(nftList[i].tokenId);\\n INFT(nft).transferFrom(address(this), nftList[i].to, nftList[i].tokenId);\\n }\\n }\\n emit UnLock(nft, _sender, saltNonce, nftList);\\n }\\n\\n /**\\n * @dev unlock nft\\n * from game svr only\\n */\\n function unlockWithSvr(address nft, uint256[] calldata tokenIds) external onlyOwner{\\n require(tokenIds.length <= maxBatch, \\\"tokenIds too many\\\");\\n for (uint256 i = 0; i < tokenIds.length; i++) {\\n address _sender = addressOriginal[nft][tokenIds[i]];\\n delete addressOriginal[nft][tokenIds[i]];\\n lockedRecords[nft][_sender].remove(tokenIds[i]);\\n INFT(nft).transferFrom(address(this), _sender, tokenIds[i]);\\n }\\n }\\n\\n /** ------get------- **/\\n function lockedNum(address token, address user) public view returns (uint256) {\\n return lockedRecords[token][user].length();\\n }\\n\\n function lockedNft(address token, address user) public view returns (uint256[] memory) {\\n return lockedRecords[token][user].values();\\n }\\n\\n function updateBatch(uint256 _maxBatch) external onlyOwner {\\n maxBatch = _maxBatch;\\n }\\n\\n function addSupportNftList(address[] calldata nftList) external onlyOwner {\\n for (uint256 i = 0; i < nftList.length; i++) {\\n supportNftList[nftList[i]] = true;\\n }\\n }\\n function removeSupportNft(address nftAddress) external onlyOwner {\\n require(supportNftList[nftAddress], \\\"can't remove\\\");\\n delete supportNftList[nftAddress];\\n }\\n\\n /**\\n * @dev update verifier address\\n */\\n function updateVerifier(address _verifier) external onlyOwner {\\n require(_verifier != address(0), \\\"NFTClaimer: address can not be zero\\\");\\n verifier = _verifier;\\n emit VerifierUpdated(_verifier);\\n }\\n\\n function getMessageHash(\\n address _to,\\n address _nft,\\n NFTInfo[] memory _ids,\\n address _contract,\\n uint256 _chainId,\\n uint256 _signTime,\\n uint256 _saltNonce\\n ) public pure returns (bytes32) {\\n bytes memory encoded = abi.encodePacked(_to, _nft, _contract, _chainId, _signTime, _saltNonce);\\n for (uint256 i = 0; i < _ids.length; ++i) {\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].tokenId));\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].to));\\n encoded = bytes.concat(encoded, abi.encodePacked(_ids[i].isMint));\\n }\\n return keccak256(encoded);\\n }\\n}\\n\",\"keccak256\":\"0xa3cb8a663d7557444f5f5ea9de6c8b6994ebb421903a0c77ea55dc4118835568\",\"license\":\"MIT\"},\"contracts/utils/TimeChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract TimeChecker is Ownable {\\n uint256 public duration;\\n uint256 public minDuration;\\n\\n event DurationUpdated(uint256 indexed duration);\\n\\n constructor(uint256 _duration) {\\n duration = _duration;\\n minDuration = 30 minutes;\\n }\\n\\n /**\\n * @dev Check if the time is valid\\n */\\n modifier timeValid(uint256 time) {\\n require(\\n time + duration >= block.timestamp,\\n \\\"expired, please send another transaction with new signature\\\"\\n );\\n _;\\n }\\n\\n\\n /**\\n * @dev Change duration value\\n */\\n function updateDuation(uint256 valNew) external onlyOwner {\\n require(valNew > minDuration, \\\"duration too short\\\");\\n duration = valNew;\\n emit DurationUpdated(valNew);\\n }\\n}\\n\",\"keccak256\":\"0xeb1278f24da69d97bd3d0da549e0673fdfa0b319bf4ba2ed6b24fefa870f3af9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c0346100fb57601f611b8438819003918201601f19168301916001600160401b038311848410176101005780849260409485528339810103126100fb5780516020909101516001600160a01b039182821682036100fb576000543360018060a01b0319821617600055604051933391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3600255610708600355600480546064600555466080523060a0526001600160a81b03191660089290921b610100600160a81b0316919091179055611a6d9081610117823960805181818161097f0152610f8d015260a05181818161021001526109a10152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604081815260048036101561001557600080fd5b600092833560e01c9081630fb5a6b414611190575080631275029214611152578063150b7a02146110fd578063230fb7fe14610fb05780632b437d4814610f755780632b7ac3f314610f4a57806338e2c2eb14610f285780635671576114610f095780635c975abb14610ee65780635fb110ca14610e5f57806367765b8714610e405780636d04319414610df3578063715018a614610d9957806376bd0cfd14610886578063799048fa146107fd5780637f9d3096146107715780638da5cb5b1461074957806397fc007c14610680578063a063472414610637578063bdfe78c9146105f3578063c419028f14610395578063ce3d1b2d14610308578063d13344c914610243578063da28b527146101fb5763f2fde38b1461013657600080fd5b346101f75760203660031901126101f75761014f6111ac565b906101586113ac565b6001600160a01b039182169283156101a557505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461023f578160031936011261023f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b8284346103055781600319360112610305579061025e6111ac565b916102676111c7565b6001600160a01b039384168252600760209081528383209190941682528352818120825181548082529183528483208186019392849190845b8181106102f157505050816102b6910382611235565b83519485948186019282875251809352850193925b8281106102da57505050500390f35b8351855286955093810193928101926001016102cb565b8254845292880192600192830192016102a0565b80fd5b50346101f75760e03660031901126101f7576103226111ac565b61032a6111c7565b91604435906001600160401b03821161039157366023830112156103915781602461035a933693013591016112f7565b93606435906001600160a01b03821682036103055750916020949161038a9360c4359360a4359360843593611926565b9051908152f35b8580fd5b50346101f75760603660031901126101f7576103af6111ac565b916103b86111c7565b916044356001600160401b038111610391576103d790369083016112ba565b91909360ff8254166105bd576103f1600554841115611674565b6001600160a01b039081169586156105815716928387526020916008835260ff82892054161561054e57875b84811061047a57505080518281529182018390526001600160fb1b038311610476577f356278d4d01db4ac9a53decc4eeeceecfb494d3bd0c463b305d33e65305e2bf29260051b8095828401378133958101030190a480f35b8680fd5b8589526006845282892061048f82878a6116d9565b358a528452828920336bffffffffffffffffffffffff60a01b82541617905585895260078452828920338a5284526104d5838a206104ce83888b6116d9565b3590611717565b506104e18186896116d9565b3589873b156103055784516323b872dd60e01b815233858201908152306020820152604081019390935291829081906060010381838b5af1801561054457906105309291610535575b506116b4565b61041d565b61053e906111f1565b3861052a565b84513d8c823e3d90fd5b82606492519162461bcd60e51b8352820152600f60248201526e1b9bdd081cdd5c1c1bdc9d081b999d608a1b6044820152fd5b845162461bcd60e51b8152602081850152601660248201527570617373706f72742063616e2774206265207a65726f60501b6044820152606490fd5b835162461bcd60e51b8152602081840152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b50503461023f578060031936011261023f576020916001600160a01b039082908261061c6111ac565b16815260068552818120602435825285522054169051908152f35b50503461023f578060031936011261023f57806020926106556111ac565b61065d6111c7565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b50346101f75760203660031901126101f75761069a6111ac565b6106a26113ac565b6001600160a01b0381169283156106fb57508154610100600160a81b03191660089190911b610100600160a81b03161790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b5162461bcd60e51b8152602081840152602360248201527f4e4654436c61696d65723a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b50503461023f578160031936011261023f57905490516001600160a01b039091168152602090f35b50346101f75760203660031901126101f75780359161078e6113ac565b6003548311156107c5575050806002557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b50346101f75760203660031901126101f7576108176111ac565b61081f6113ac565b6001600160a01b031680845260086020528284205490919060ff16156108545750825260086020528120805460ff1916905580f35b606490602084519162461bcd60e51b8352820152600c60248201526b63616e27742072656d6f766560a01b6044820152fd5b50346101f75760a03660031901126101f7576108a06111ac565b9160248035926001600160401b03938481116104765736602382011215610476578082013590858211610d955783810195606091853691848602010111610d915760449586359460649081359860843598858a11610d8d573660238b011215610d8d5789830135958611610d8d57808a019981873692010111610d8d57845195808b88378087019960ff8860019c8d815260209a8b91030190205416610d1c576002548101808211610d08574211610ca257908f9392918f8f8f90926109c79261097c8f958e96610975600554821115611674565b36916112f7565b907f0000000000000000000000000000000000000000000000000000000000000000917f00000000000000000000000000000000000000000000000000000000000000009133611926565b9c6109ec60018060a01b039e8f895460081c16906109e6368786611256565b91611404565b60ff8d838b5180928786833787820190815203019020541615610c7f575b505050829998979695995b8d898210610ab057505050505050508285519786890190895286838a01525281870197948a915b848310610a71578b33898d167f9a5ba7d70cc7e1cd613eb99e6ed8ea301d889773c9d4517218560eee5153803e8c8e038da380f35b90919293948480889b610a9b868b869c3584528d610a908983016111dd565b1688850152016112ea565b151581870152019a0196959493019190610a3c565b9a610ac1828b839a9b9c9d9e6117a1565b01358015158103610c7b578f8f91908e91600014610b505716610afa838d610af48d610aee8484896117a1565b016117b1565b946117a1565b3591813b1561047657858f918880948d5196879586946340c10f1960e01b8652168d850152898401525af18015610b465790610b3b929161053557506116b4565b999897969599610a15565b88513d87823e3d90fd5b959192939495169182825260068a52610b6d848d8b8520936117a1565b35825289528c88339220541603610c4f57908f9392918e81865260068a528b610b9a848b892092846117a1565b3587528a5288862080546001600160a01b031916905581865260078a528886203387528a52888620610bd890610bd1858f856117a1565b35906117c5565b50610bf3838d610bed8d610aee8484886117a1565b936117a1565b35823b156104765789516323b872dd60e01b815230818a019081526001600160a01b039093166020840152604083019190915291869183919082908490829060600103925af18015610b465790610b3b929161053557506116b4565b5050845162461bcd60e51b8152928301869052600990830152683737ba1037bbb732b960b91b90820152fd5b8480fd5b828951938492833781018d815203019020805460ff19168b179055388781610a0a565b865162461bcd60e51b8152808601899052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e6174757265000000000081880152608490fd5b5050634e487b7160e01b8f5250601183528dfd5b865162461bcd60e51b81528086018990526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e6174758188015261726560f01b608482015260a490fd5b8d80fd5b8880fd5b8780fd5b8334610305578060031936011261030557610db26113ac565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83823461023f57606036600319011261023f57610e0e6111ac565b6044356001600160401b038111610e3c57610e3992610e2f9136910161129c565b9060243590611404565b80f35b8380fd5b50503461023f578160031936011261023f576020906005549051908152f35b5090346101f75760209182600319360112610e3c578035906001600160401b038211610c7b57610e91913691016112ba565b9290610e9b6113ac565b845b848110610ea8578580f35b610ee1906001600160a01b03610ec7610ec28389876116d9565b6117b1565b16875260088452848720805460ff191660011790556116b4565b610e9d565b5091346103055780600319360112610305575060ff602092541690519015158152f35b50503461023f578160031936011261023f576020906003549051908152f35b83823461023f57602036600319011261023f57610f436113ac565b3560055580f35b50346101f757826003193601126101f75754905160089190911c6001600160a01b0316815260209150f35b50503461023f578160031936011261023f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346101f757816003193601126101f757610fc96111ac565b91836024356001600160401b03811161023f57610fe990369085016112ba565b610ff49591956113ac565b611002600554821115611674565b6001600160a01b0391821690835b81811061101b578480f35b8285526006602081815287872061103384868d6116d9565b358852815285888820541691858852815287872061105284868d6116d9565b358852815287872080546001600160a01b031916905584875260078152878720828852905286862061108990610bd184868d6116d9565b5061109582848b6116d9565b3590843b156104765787516323b872dd60e01b8152308a82019081526001600160a01b0390921660208301526040820192909252869082908190606001038183885af180156110f357906110ee929161053557506116b4565b611010565b87513d88823e3d90fd5b509134610305576080366003190112610305576111186111ac565b506111216111c7565b50606435906001600160401b03821161030557506020926111449136910161129c565b5051630a85bd0160e11b8152f35b50503461023f57602036600319011261023f5760209160ff9082906001600160a01b0361117d6111ac565b1681526008855220541690519015158152f35b84903461023f578160031936011261023f576020906002548152f35b600435906001600160a01b03821682036111c257565b600080fd5b602435906001600160a01b03821682036111c257565b35906001600160a01b03821682036111c257565b6001600160401b03811161120457604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761120457604052565b90601f801991011681019081106001600160401b0382111761120457604052565b9291926001600160401b038211611204576040519161127f601f8201601f191660200184611235565b8294818452818301116111c2578281602093846000960137010152565b9080601f830112156111c2578160206112b793359101611256565b90565b9181601f840112156111c2578235916001600160401b0383116111c2576020808501948460051b0101116111c257565b359081151582036111c257565b6001600160401b03939284831161120457604090815195602092611320848760051b0189611235565b8388878152019260608097028601958187116111c257935b868510611349575050505050505050565b87858303126111c257825190888201908282108683111761139757899288928652873581526113798389016111dd565b838201526113888689016112ea565b86820152815201940193611338565b60246000634e487b7160e01b81526041600452fd5b6000546001600160a01b031633036113c057565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b906114469261143e917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c6000206115ad565b929092611493565b6001600160a01b0390811691160361145a57565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b600581101561159757806114a45750565b600181036114f15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6002810361153e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461154757565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b9060418151146000146115db576115d7916020820151906060604084015193015160001a906115e5565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116116685791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561165b5781516001600160a01b03811615611655579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b1561167b57565b60405162461bcd60e51b8152602060048201526011602482015270746f6b656e49647320746f6f206d616e7960781b6044820152606490fd5b60001981146116c35760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156116e95760051b0190565b634e487b7160e01b600052603260045260246000fd5b80548210156116e95760005260206000200190600090565b9190600183016000908282528060205260408220541560001461179b57845494680100000000000000008610156117875783611777611760886001604098999a018555846116ff565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b91908110156116e9576060020190565b356001600160a01b03811681036111c25790565b906001820190600092818452826020526040842054908115156000146118ae576000199180830181811161189a5782549084820191821161188657808203611851575b5050508054801561183d5782019161182083836116ff565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b61187161186161176093866116ff565b90549060031b1c928392866116ff565b90558652846020526040862055388080611808565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b80518210156116e95760209160051b010190565b9081519160005b8381106118e1575050016000815290565b80602080928401015181850152016118d0565b61192490611916611910949360405195869360208501906118c9565b906118c9565b03601f198101845283611235565b565b939092919496956040978851926bffffffffffffffffffffffff198095816060988160209b8b1b168b890152891b166034870152871b166048850152605c840152607c830152609c820152609c815260c081018181106001600160401b038211176112045787526000905b8551821015611a2757611a1b6119f36119cc611a21936119b1868b6118b5565b5151908c51918a8301528982526119c78261121a565b6118f4565b876119d7868b6118b5565b51015190868c5192891b1689830152601482526119c78261121a565b896119fe858a6118b5565b5101511515908a519160f81b88830152600182526119c78261121a565b916116b4565b90611991565b959650505050905081519101209056fea2646970667358221220f898f247cb28c15c0bdc399c4cb841b44e53fb166f1118be8c97cef25317ad5164736f6c63430008130033", - "deployedBytecode": "0x6080604081815260048036101561001557600080fd5b600092833560e01c9081630fb5a6b414611190575080631275029214611152578063150b7a02146110fd578063230fb7fe14610fb05780632b437d4814610f755780632b7ac3f314610f4a57806338e2c2eb14610f285780635671576114610f095780635c975abb14610ee65780635fb110ca14610e5f57806367765b8714610e405780636d04319414610df3578063715018a614610d9957806376bd0cfd14610886578063799048fa146107fd5780637f9d3096146107715780638da5cb5b1461074957806397fc007c14610680578063a063472414610637578063bdfe78c9146105f3578063c419028f14610395578063ce3d1b2d14610308578063d13344c914610243578063da28b527146101fb5763f2fde38b1461013657600080fd5b346101f75760203660031901126101f75761014f6111ac565b906101586113ac565b6001600160a01b039182169283156101a557505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461023f578160031936011261023f57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b8284346103055781600319360112610305579061025e6111ac565b916102676111c7565b6001600160a01b039384168252600760209081528383209190941682528352818120825181548082529183528483208186019392849190845b8181106102f157505050816102b6910382611235565b83519485948186019282875251809352850193925b8281106102da57505050500390f35b8351855286955093810193928101926001016102cb565b8254845292880192600192830192016102a0565b80fd5b50346101f75760e03660031901126101f7576103226111ac565b61032a6111c7565b91604435906001600160401b03821161039157366023830112156103915781602461035a933693013591016112f7565b93606435906001600160a01b03821682036103055750916020949161038a9360c4359360a4359360843593611926565b9051908152f35b8580fd5b50346101f75760603660031901126101f7576103af6111ac565b916103b86111c7565b916044356001600160401b038111610391576103d790369083016112ba565b91909360ff8254166105bd576103f1600554841115611674565b6001600160a01b039081169586156105815716928387526020916008835260ff82892054161561054e57875b84811061047a57505080518281529182018390526001600160fb1b038311610476577f356278d4d01db4ac9a53decc4eeeceecfb494d3bd0c463b305d33e65305e2bf29260051b8095828401378133958101030190a480f35b8680fd5b8589526006845282892061048f82878a6116d9565b358a528452828920336bffffffffffffffffffffffff60a01b82541617905585895260078452828920338a5284526104d5838a206104ce83888b6116d9565b3590611717565b506104e18186896116d9565b3589873b156103055784516323b872dd60e01b815233858201908152306020820152604081019390935291829081906060010381838b5af1801561054457906105309291610535575b506116b4565b61041d565b61053e906111f1565b3861052a565b84513d8c823e3d90fd5b82606492519162461bcd60e51b8352820152600f60248201526e1b9bdd081cdd5c1c1bdc9d081b999d608a1b6044820152fd5b845162461bcd60e51b8152602081850152601660248201527570617373706f72742063616e2774206265207a65726f60501b6044820152606490fd5b835162461bcd60e51b8152602081840152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b50503461023f578060031936011261023f576020916001600160a01b039082908261061c6111ac565b16815260068552818120602435825285522054169051908152f35b50503461023f578060031936011261023f57806020926106556111ac565b61065d6111c7565b6001600160a01b0391821683526007865283832091168252845220549051908152f35b50346101f75760203660031901126101f75761069a6111ac565b6106a26113ac565b6001600160a01b0381169283156106fb57508154610100600160a81b03191660089190911b610100600160a81b03161790557fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee3278280a280f35b5162461bcd60e51b8152602081840152602360248201527f4e4654436c61696d65723a20616464726573732063616e206e6f74206265207a60448201526265726f60e81b6064820152608490fd5b50503461023f578160031936011261023f57905490516001600160a01b039091168152602090f35b50346101f75760203660031901126101f75780359161078e6113ac565b6003548311156107c5575050806002557f91abcc2d6823e3a3f11d31b208dd3065d2c6a791f1c7c9fe96a42ce12897eac58280a280f35b906020606492519162461bcd60e51b83528201526012602482015271191d5c985d1a5bdb881d1bdbc81cda1bdc9d60721b6044820152fd5b50346101f75760203660031901126101f7576108176111ac565b61081f6113ac565b6001600160a01b031680845260086020528284205490919060ff16156108545750825260086020528120805460ff1916905580f35b606490602084519162461bcd60e51b8352820152600c60248201526b63616e27742072656d6f766560a01b6044820152fd5b50346101f75760a03660031901126101f7576108a06111ac565b9160248035926001600160401b03938481116104765736602382011215610476578082013590858211610d955783810195606091853691848602010111610d915760449586359460649081359860843598858a11610d8d573660238b011215610d8d5789830135958611610d8d57808a019981873692010111610d8d57845195808b88378087019960ff8860019c8d815260209a8b91030190205416610d1c576002548101808211610d08574211610ca257908f9392918f8f8f90926109c79261097c8f958e96610975600554821115611674565b36916112f7565b907f0000000000000000000000000000000000000000000000000000000000000000917f00000000000000000000000000000000000000000000000000000000000000009133611926565b9c6109ec60018060a01b039e8f895460081c16906109e6368786611256565b91611404565b60ff8d838b5180928786833787820190815203019020541615610c7f575b505050829998979695995b8d898210610ab057505050505050508285519786890190895286838a01525281870197948a915b848310610a71578b33898d167f9a5ba7d70cc7e1cd613eb99e6ed8ea301d889773c9d4517218560eee5153803e8c8e038da380f35b90919293948480889b610a9b868b869c3584528d610a908983016111dd565b1688850152016112ea565b151581870152019a0196959493019190610a3c565b9a610ac1828b839a9b9c9d9e6117a1565b01358015158103610c7b578f8f91908e91600014610b505716610afa838d610af48d610aee8484896117a1565b016117b1565b946117a1565b3591813b1561047657858f918880948d5196879586946340c10f1960e01b8652168d850152898401525af18015610b465790610b3b929161053557506116b4565b999897969599610a15565b88513d87823e3d90fd5b959192939495169182825260068a52610b6d848d8b8520936117a1565b35825289528c88339220541603610c4f57908f9392918e81865260068a528b610b9a848b892092846117a1565b3587528a5288862080546001600160a01b031916905581865260078a528886203387528a52888620610bd890610bd1858f856117a1565b35906117c5565b50610bf3838d610bed8d610aee8484886117a1565b936117a1565b35823b156104765789516323b872dd60e01b815230818a019081526001600160a01b039093166020840152604083019190915291869183919082908490829060600103925af18015610b465790610b3b929161053557506116b4565b5050845162461bcd60e51b8152928301869052600990830152683737ba1037bbb732b960b91b90820152fd5b8480fd5b828951938492833781018d815203019020805460ff19168b179055388781610a0a565b865162461bcd60e51b8152808601899052603b818501527f657870697265642c20706c656173652073656e6420616e6f7468657220747261818601527f6e73616374696f6e2077697468206e6577207369676e6174757265000000000081880152608490fd5b5050634e487b7160e01b8f5250601183528dfd5b865162461bcd60e51b81528086018990526042818501527f7369676e617475726520757365642e20706c656173652073656e6420616e6f74818601527f686572207472616e73616374696f6e2077697468206e6577207369676e6174758188015261726560f01b608482015260a490fd5b8d80fd5b8880fd5b8780fd5b8334610305578060031936011261030557610db26113ac565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83823461023f57606036600319011261023f57610e0e6111ac565b6044356001600160401b038111610e3c57610e3992610e2f9136910161129c565b9060243590611404565b80f35b8380fd5b50503461023f578160031936011261023f576020906005549051908152f35b5090346101f75760209182600319360112610e3c578035906001600160401b038211610c7b57610e91913691016112ba565b9290610e9b6113ac565b845b848110610ea8578580f35b610ee1906001600160a01b03610ec7610ec28389876116d9565b6117b1565b16875260088452848720805460ff191660011790556116b4565b610e9d565b5091346103055780600319360112610305575060ff602092541690519015158152f35b50503461023f578160031936011261023f576020906003549051908152f35b83823461023f57602036600319011261023f57610f436113ac565b3560055580f35b50346101f757826003193601126101f75754905160089190911c6001600160a01b0316815260209150f35b50503461023f578160031936011261023f57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346101f757816003193601126101f757610fc96111ac565b91836024356001600160401b03811161023f57610fe990369085016112ba565b610ff49591956113ac565b611002600554821115611674565b6001600160a01b0391821690835b81811061101b578480f35b8285526006602081815287872061103384868d6116d9565b358852815285888820541691858852815287872061105284868d6116d9565b358852815287872080546001600160a01b031916905584875260078152878720828852905286862061108990610bd184868d6116d9565b5061109582848b6116d9565b3590843b156104765787516323b872dd60e01b8152308a82019081526001600160a01b0390921660208301526040820192909252869082908190606001038183885af180156110f357906110ee929161053557506116b4565b611010565b87513d88823e3d90fd5b509134610305576080366003190112610305576111186111ac565b506111216111c7565b50606435906001600160401b03821161030557506020926111449136910161129c565b5051630a85bd0160e11b8152f35b50503461023f57602036600319011261023f5760209160ff9082906001600160a01b0361117d6111ac565b1681526008855220541690519015158152f35b84903461023f578160031936011261023f576020906002548152f35b600435906001600160a01b03821682036111c257565b600080fd5b602435906001600160a01b03821682036111c257565b35906001600160a01b03821682036111c257565b6001600160401b03811161120457604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761120457604052565b90601f801991011681019081106001600160401b0382111761120457604052565b9291926001600160401b038211611204576040519161127f601f8201601f191660200184611235565b8294818452818301116111c2578281602093846000960137010152565b9080601f830112156111c2578160206112b793359101611256565b90565b9181601f840112156111c2578235916001600160401b0383116111c2576020808501948460051b0101116111c257565b359081151582036111c257565b6001600160401b03939284831161120457604090815195602092611320848760051b0189611235565b8388878152019260608097028601958187116111c257935b868510611349575050505050505050565b87858303126111c257825190888201908282108683111761139757899288928652873581526113798389016111dd565b838201526113888689016112ea565b86820152815201940193611338565b60246000634e487b7160e01b81526041600452fd5b6000546001600160a01b031633036113c057565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b906114469261143e917f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c6000206115ad565b929092611493565b6001600160a01b0390811691160361145a57565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606490fd5b600581101561159757806114a45750565b600181036114f15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6002810361153e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461154757565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b9060418151146000146115db576115d7916020820151906060604084015193015160001a906115e5565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116116685791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561165b5781516001600160a01b03811615611655579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b1561167b57565b60405162461bcd60e51b8152602060048201526011602482015270746f6b656e49647320746f6f206d616e7960781b6044820152606490fd5b60001981146116c35760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156116e95760051b0190565b634e487b7160e01b600052603260045260246000fd5b80548210156116e95760005260206000200190600090565b9190600183016000908282528060205260408220541560001461179b57845494680100000000000000008610156117875783611777611760886001604098999a018555846116ff565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b91908110156116e9576060020190565b356001600160a01b03811681036111c25790565b906001820190600092818452826020526040842054908115156000146118ae576000199180830181811161189a5782549084820191821161188657808203611851575b5050508054801561183d5782019161182083836116ff565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b61187161186161176093866116ff565b90549060031b1c928392866116ff565b90558652846020526040862055388080611808565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b80518210156116e95760209160051b010190565b9081519160005b8381106118e1575050016000815290565b80602080928401015181850152016118d0565b61192490611916611910949360405195869360208501906118c9565b906118c9565b03601f198101845283611235565b565b939092919496956040978851926bffffffffffffffffffffffff198095816060988160209b8b1b168b890152891b166034870152871b166048850152605c840152607c830152609c820152609c815260c081018181106001600160401b038211176112045787526000905b8551821015611a2757611a1b6119f36119cc611a21936119b1868b6118b5565b5151908c51918a8301528982526119c78261121a565b6118f4565b876119d7868b6118b5565b51015190868c5192891b1689830152601482526119c78261121a565b896119fe858a6118b5565b5101511515908a519160f81b88830152600182526119c78261121a565b916116b4565b90611991565b959650505050905081519101209056fea2646970667358221220f898f247cb28c15c0bdc399c4cb841b44e53fb166f1118be8c97cef25317ad5164736f6c63430008130033", - "devdoc": { - "events": { - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - } - }, - "kind": "dev", - "methods": { - "lock(address,address,uint256[])": { - "params": { - "nft": "nft address", - "to": "passport address for game", - "tokenIds": "nft token id list" - } - }, - "onERC721Received(address,address,uint256,bytes)": { - "details": "See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "unlockOrMint(address,(uint256,address,bool)[],uint256,uint256,bytes)": { - "details": "unlock or mint nft from passport only if tokenId not exists, mint it if exists and user is owner, unlock it" - }, - "unlockWithSvr(address,uint256[])": { - "details": "unlock nft from game svr only" - }, - "updateDuation(uint256)": { - "details": "Change duration value" - }, - "updateVerifier(address)": { - "details": "update verifier address" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "lock(address,address,uint256[])": { - "notice": "lock NFT from eoa only" - }, - "lockedNum(address,address)": { - "notice": "------get------- *" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 7, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 2486, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_usedSignatures", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes_memory_ptr,t_bool)" - }, - { - "astId": 3240, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "duration", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 3242, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "minDuration", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 130, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_paused", - "offset": 0, - "slot": "4", - "type": "t_bool" - }, - { - "astId": 2598, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "verifier", - "offset": 1, - "slot": "4", - "type": "t_address" - }, - { - "astId": 2601, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "maxBatch", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 2614, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "addressOriginal", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_address))" - }, - { - "astId": 2621, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "lockedRecords", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_mapping(t_address,t_struct(UintSet)2344_storage))" - }, - { - "astId": 2625, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "supportNftList", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_bytes_memory_ptr": { - "encoding": "bytes", - "label": "bytes", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_struct(UintSet)2344_storage))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => struct EnumerableSet.UintSet))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(UintSet)2344_storage)" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_address))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(uint256 => address))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_address)" - }, - "t_mapping(t_address,t_struct(UintSet)2344_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct EnumerableSet.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)2344_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes_memory_ptr,t_bool)": { - "encoding": "mapping", - "key": "t_bytes_memory_ptr", - "label": "mapping(bytes => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_struct(Set)1872_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 1867, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 1871, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)2344_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.UintSet", - "members": [ - { - "astId": 2343, - "contract": "contracts/game/NFTLockMain.sol:NFTLockMain", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)1872_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/sepolia_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json b/deployments/sepolia_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json new file mode 100644 index 0000000..92d3168 --- /dev/null +++ b/deployments/sepolia_test/solcInputs/1c04b3fecb15d8649fd77113581951ef.json @@ -0,0 +1,78 @@ +{ + "language": "Solidity", + "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" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\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 * CAUTION: See Security Considerations above.\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" + }, + "@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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (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. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\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" + }, + "@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" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n รท 2 + 1, and for v in (302): v โˆˆ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // โ†’ `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // โ†’ `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/core/HasSignature.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract HasSignature is Ownable {\n mapping(bytes signature => bool status) private _usedSignatures;\n\n function checkSigner(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) public pure {\n bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(hash);\n\n address recovered = ECDSA.recover(ethSignedMessageHash, signature);\n require(recovered == signer, \"invalid signature\");\n }\n\n modifier signatureValid(bytes calldata signature) {\n require(\n !_usedSignatures[signature],\n \"signature used. please send another transaction with new signature\"\n );\n _;\n }\n\n function _useSignature(bytes calldata signature) internal {\n if (!_usedSignatures[signature]) {\n _usedSignatures[signature] = true;\n }\n }\n}\n" + }, + "contracts/mall/GameItemMall.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {HasSignature} from \"../core/HasSignature.sol\";\nimport {TimeChecker} from \"../utils/TimeChecker.sol\";\nimport {MallBase} from \"./MallBase.sol\";\n\n/**\n * @title GameItemMall\n * @dev GameItemMall is a contract for managing centralized game items sale,\n * allowing users to buy item in game.\n */\ncontract GameItemMall is MallBase, ReentrancyGuard, HasSignature, TimeChecker {\n using SafeERC20 for IERC20;\n\n mapping(uint256 itemId => address user) public orderIdUsed;\n\n event ItemSoldOut(\n address indexed buyer,\n address indexed passport,\n uint256 indexed orderId,\n address currency,\n uint256 amount\n );\n\n constructor(address _currency, address _feeToAddress, address _verifier, uint256 _duration) \n TimeChecker(_duration)\n MallBase(_currency, _feeToAddress, _verifier){\n }\n\n function buy(\n address passport,\n uint256 orderId,\n address currency,\n uint256 amount,\n uint256 signTime,\n uint256 saltNonce,\n bytes calldata signature\n ) external nonReentrant signatureValid(signature) timeValid(signTime) {\n require(passport != address(0), \"passport address can not be zero\");\n // check if orderId is used\n require(orderIdUsed[orderId] == address(0), \"orderId is used\");\n // check if currency is supported\n require(erc20Supported[currency], \"currency is not supported\");\n // check if amount is valid\n require(amount > 0, \"amount is zero\");\n address buyer = _msgSender();\n bytes32 criteriaMessageHash = getMessageHash(\n buyer,\n passport,\n orderId,\n currency,\n amount,\n _CACHED_THIS,\n _CACHED_CHAIN_ID,\n signTime,\n saltNonce\n );\n checkSigner(verifier, criteriaMessageHash, signature);\n IERC20 paymentContract = IERC20(currency);\n _useSignature(signature);\n orderIdUsed[orderId] = buyer;\n paymentContract.safeTransferFrom(buyer, feeToAddress, amount);\n emit ItemSoldOut(buyer, passport, orderId, currency, amount);\n }\n\n function getMessageHash(\n address _buyer,\n address _passport,\n uint256 _orderId,\n address _currency,\n uint256 _amount,\n address _contract,\n uint256 _chainId,\n uint256 _signTime,\n uint256 _saltNonce\n ) public pure returns (bytes32) {\n bytes memory encoded = abi.encodePacked(\n _buyer,\n _passport,\n _orderId,\n _currency,\n _amount,\n _contract,\n _chainId,\n _signTime,\n _saltNonce\n );\n return keccak256(encoded);\n }\n}" + }, + "contracts/mall/MallBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\nabstract contract MallBase is Ownable {\n address public verifier;\n // Address to receive transaction fee\n address public feeToAddress;\n\n uint256 public immutable _CACHED_CHAIN_ID;\n address public immutable _CACHED_THIS;\n\n mapping(address token => bool status) public erc20Supported;\n event AddERC20Suppout(address erc20);\n event RemoveERC20Suppout(address erc20);\n event VerifierUpdated(address indexed verifier);\n event FeeToAddressUpdated(address indexed feeToAddress);\n\n constructor(address _currency, address _feeToAddress, address _verifier) {\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_THIS = address(this);\n verifier = _verifier;\n erc20Supported[_currency] = true;\n feeToAddress = _feeToAddress;\n }\n\n function addERC20Support(address erc20) external onlyOwner {\n require(erc20 != address(0), \"ERC20 address can not be zero\");\n erc20Supported[erc20] = true;\n emit AddERC20Suppout(erc20);\n }\n\n function removeERC20Support(address erc20) external onlyOwner {\n erc20Supported[erc20] = false;\n emit RemoveERC20Suppout(erc20);\n }\n\n /**\n * @dev update verifier address\n */\n function updateVerifier(address _verifier) external onlyOwner {\n require(_verifier != address(0), \"address can not be zero\");\n verifier = _verifier;\n emit VerifierUpdated(_verifier);\n }\n\n function setFeeToAddress(address _feeToAddress) external onlyOwner {\n require(\n _feeToAddress != address(0),\n \"fee received address can not be zero\"\n );\n feeToAddress = _feeToAddress;\n emit FeeToAddressUpdated(_feeToAddress);\n }\n}\n" + }, + "contracts/utils/TimeChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract TimeChecker is Ownable {\n uint256 public duration;\n uint256 public minDuration;\n\n event DurationUpdated(uint256 indexed duration);\n\n constructor(uint256 _duration) {\n duration = _duration;\n minDuration = 30 minutes;\n }\n\n /**\n * @dev Check if the time is valid\n */\n modifier timeValid(uint256 time) {\n require(\n time + duration >= block.timestamp,\n \"expired, please send another transaction with new signature\"\n );\n _;\n }\n\n\n /**\n * @dev Change duration value\n */\n function updateDuation(uint256 valNew) external onlyOwner {\n require(valNew > minDuration, \"duration too short\");\n duration = valNew;\n emit DurationUpdated(valNew);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index aaaa942..e0cd03b 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -48,10 +48,6 @@ const config: HardhatUserConfig = { tests: "./test", }, networks: { - sepolia: { - url: process.env.SEPOLIA_URL || "", - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, imtbl_test: { url: process.env.IMTBL_TEST_URL || "", accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], @@ -60,6 +56,14 @@ const config: HardhatUserConfig = { url: process.env.SEPOLIA_URL || "", accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], }, + bsc_test: { + url: process.env.BSC_TEST_URL || "", + accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], + }, + arb_sepolia: { + url: process.env.ARBITRUM_TEST_URL || "", + accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], + }, }, }; diff --git a/out/arb_sepolia_dev.json b/out/arb_sepolia_dev.json new file mode 100644 index 0000000..68959e9 --- /dev/null +++ b/out/arb_sepolia_dev.json @@ -0,0 +1,20 @@ +[ + { + "name": "BEUSDC", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0xafd1935c13eebc205998d870ef423658293e71bc" + }, + { + "name": "BEUSDT", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0x55bef0fc1423421c3ce1e070d9671e4b417db57c" + }, + { + "name": "GameItemMall", + "type": "logic", + "json": "assets/contracts/GameItemMall.json", + "address": "0xB3f4087F2dB4778E97CCB9D9F326e146B4561Eb7" + } +] \ No newline at end of file diff --git a/out/bsc_test_dev.json b/out/bsc_test_dev.json new file mode 100644 index 0000000..b5f4227 --- /dev/null +++ b/out/bsc_test_dev.json @@ -0,0 +1,20 @@ +[ + { + "name": "BEUSDC", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0x9895d4a938111a747c543cbe5e7479fad7306ff6" + }, + { + "name": "BEUSDT", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0x8f34a7b59841bc87f7d80f9858490cc1412d50fb" + }, + { + "name": "GameItemMall", + "type": "logic", + "json": "assets/contracts/GameItemMall.json", + "address": "0xaE08adb5278B107D2501e7c61907e41FEf3887D7" + } +] \ No newline at end of file diff --git a/out/imtbl_test_dev.json b/out/imtbl_test_dev.json index 77f29b4..4bbb25b 100644 --- a/out/imtbl_test_dev.json +++ b/out/imtbl_test_dev.json @@ -58,5 +58,11 @@ "type": "logic", "json": "assets/contracts/GameItemMall.json", "address": "0xAbE8CCCd52840cd4a77B0C46DaD46bC628f8018D" + }, + { + "name": "BEUSDC", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0x11440cE5a7d6a1e6fa1e9fd790EBa93476F0DeA0" } ] \ No newline at end of file diff --git a/out/sepolia_test_dev.json b/out/sepolia_test_dev.json index 9dbc5fd..56c0295 100644 --- a/out/sepolia_test_dev.json +++ b/out/sepolia_test_dev.json @@ -10,5 +10,23 @@ "type": "erc721", "json": "assets/contracts/BEBadgeV2.json", "address": "0x1304E6AA241eE3C9ea44Db9e593e85Ae76eC41F1" + }, + { + "name": "BEUSDC", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0xd95353ea0dd9d8a970e2b167b2c2bffef6222402" + }, + { + "name": "BEUSDT", + "type": "erc20", + "json": "assets/contracts/FT.json", + "address": "0xedd5e19f46b3f8fe5ed16808f885565e2980cee0" + }, + { + "name": "GameItemMall", + "type": "logic", + "json": "assets/contracts/GameItemMall.json", + "address": "0x45E2Eae3634a69Fb9242397A75dd5751aEa8041e" } -] +] \ No newline at end of file