diff --git a/DEPLOYMENTS.md b/DEPLOYMENTS.md index 4a37c59c..bdf9a5bf 100644 --- a/DEPLOYMENTS.md +++ b/DEPLOYMENTS.md @@ -22,9 +22,9 @@ | `EtherspotPaymaster` | `gnosis` | [0x373aBcF1EA9e5802778E32870e7f72C8A6a90349](https://gnosisscan.io/address/0x373aBcF1EA9e5802778E32870e7f72C8A6a90349) | [0x941e3dcc6bf164c2b83c93739d36e048cd17584074f6debb5099a413c7d45587](https://gnosisscan.io/tx/0x941e3dcc6bf164c2b83c93739d36e048cd17584074f6debb5099a413c7d45587) | | `EtherspotWalletFactory` | `gnosis` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://gnosisscan.io/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0x9e9ec096fb5eed8d1ebd8a475a4345e918fb6504256f8ed566239ddd46d533f2](https://gnosisscan.io/tx/0x9e9ec096fb5eed8d1ebd8a475a4345e918fb6504256f8ed566239ddd46d533f2) | | `EtherspotWallet` | `gnosis` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://gnosisscan.io/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0xe602e8df36c84b2dfcfd5577411772c066513b1767c3db5078f5b90672885c42](https://gnosisscan.io/tx/0xe602e8df36c84b2dfcfd5577411772c066513b1767c3db5078f5b90672885c42) | -| `EtherspotPaymaster` | `rootstock` | [0xe893A26dD53b325bFFaACdFA224692EFF4C448C4](https://explorer.rootstock.io/address/0xe893a26dd53b325bffaacdfa224692eff4c448c4) | [0x69acf729554e87b72930c0e2153b4e931c62878d2e245544b47cda1c82a8dd58](https://explorer.rootstock.io/tx/0x69acf729554e87b72930c0e2153b4e931c62878d2e245544b47cda1c82a8dd58) | -| `EtherspotWalletFactory` | `rootstock` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://explorer.rootstock.io/address/0x7f6d8f107fe8551160bd5351d5f1514a6ad5d40e) | [0x9bfa8f73b5ac4ad6bba49c04850951b5486252c328cb869a5c86f5d0b7c8fef3](https://explorer.rootstock.io/tx/0x9bfa8f73b5ac4ad6bba49c04850951b5486252c328cb869a5c86f5d0b7c8fef3) | -| `EtherspotWallet` | `rootstock` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://explorer.rootstock.io/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0x23d1701c36bd2f64a32b211a7241409b4f700e984e71698c64965aae3cdac511](https://explorer.rootstock.io/tx/0x23d1701c36bd2f64a32b211a7241409b4f700e984e71698c64965aae3cdac511) | +| `EtherspotPaymaster` | `rootstock` | [0xe893A26dD53b325bFFaACdFA224692EFF4C448C4](https://rootstock.blockscout.com/address/0xe893A26dD53b325bFFaACdFA224692EFF4C448C4) | [0x69acf729554e87b72930c0e2153b4e931c62878d2e245544b47cda1c82a8dd58](https://rootstock.blockscout.com/tx/0x69acf729554e87b72930c0e2153b4e931c62878d2e245544b47cda1c82a8dd58) | +| `EtherspotWalletFactory` | `rootstock` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://rootstock.blockscout.com/address/0x7f6d8F107fe8551160bd5351d5F1514a6AD5d40e) | [0x9bfa8f73b5ac4ad6bba49c04850951b5486252c328cb869a5c86f5d0b7c8fef3](https://rootstock.blockscout.com/tx/0x9bfa8f73b5ac4ad6bba49c04850951b5486252c328cb869a5c86f5d0b7c8fef3) | +| `EtherspotWallet` | `rootstock` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://rootstock.blockscout.com/address/0xFB32cEf50cfB0A0F9F6D37A05828b2f56Efdfe20) | [0x23d1701c36bd2f64a32b211a7241409b4f700e984e71698c64965aae3cdac511](https://rootstock.blockscout.com/tx/0x23d1701c36bd2f64a32b211a7241409b4f700e984e71698c64965aae3cdac511) | | `EtherspotPaymaster` | `mantle` | [0x8A41594e5c6Fe492e437414c24eA6f401186b8d2](https://explorer.mantle.xyz/address/0x8A41594e5c6Fe492e437414c24eA6f401186b8d2) | [0x6c6093861516bfc5325f1f67d96401dbc36e1beb01f6e771f841e88bdd33e014](https://explorer.mantle.xyz/tx/0x6c6093861516bfc5325f1f67d96401dbc36e1beb01f6e771f841e88bdd33e014) | | `EtherspotWalletFactory` | `mantle` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://explorer.mantle.xyz/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0xacd13eba31b54bb9c1b10b0e6a49192a3298756ea230673cd420d7e3e836d5a6](https://explorer.mantle.xyz/tx/0xacd13eba31b54bb9c1b10b0e6a49192a3298756ea230673cd420d7e3e836d5a6) | | `EtherspotWallet` | `mantle` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://explorer.mantle.xyz/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0x001d70892ab21ad3678d3b2092d363d7eb7d9f27ed96b4f6310d32a55638490c](https://explorer.mantle.xyz/tx/0x001d70892ab21ad3678d3b2092d363d7eb7d9f27ed96b4f6310d32a55638490c) | @@ -85,9 +85,9 @@ | `EtherspotPaymaster` | `chiado` | [0x898c530A5fA37720DcF1843AeCC34b6B0cBaEB8a](https://blockscout.chiadochain.net/address/0x898c530A5fA37720DcF1843AeCC34b6B0cBaEB8a) | [0x94f18bf16505e8064fbee8f58361576109171b3f7fe1ef5b81fb61b5fb722e1a](https://blockscout.chiadochain.net/tx/0x94f18bf16505e8064fbee8f58361576109171b3f7fe1ef5b81fb61b5fb722e1a) | | `EtherspotWalletFactory` | `chiado` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://blockscout.chiadochain.net/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0x3f11f840a1c379baf5a63d12edb3ffabf2a21d16cf55c51211c43fde01e47f2b](https://blockscout.chiadochain.net/tx/0x3f11f840a1c379baf5a63d12edb3ffabf2a21d16cf55c51211c43fde01e47f2b) | | `EtherspotWallet` | `chiado` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://blockscout.chiadochain.net/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0x6313bb56809aa3b51d9bf682d57ce4b39297bc897bced92af1bdadd902a7d221](https://blockscout.chiadochain.net/tx/0x6313bb56809aa3b51d9bf682d57ce4b39297bc897bced92af1bdadd902a7d221) | -| `EtherspotPaymaster` | `rootstockTestnet` | [0x898c530A5fA37720DcF1843AeCC34b6B0cBaEB8a](https://explorer.testnet.rsk.co/address/0x898c530A5fA37720DcF1843AeCC34b6B0cBaEB8a) | [0x46d1bb68df9450c81a9814ed95cd58ee87ae290c9f13e06752f5a362fb192508](https://explorer.testnet.rsk.co/tx/0x46d1bb68df9450c81a9814ed95cd58ee87ae290c9f13e06752f5a362fb192508) | -| `EtherspotWalletFactory` | `rootstockTestnet` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://explorer.testnet.rsk.co/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0xd7fa3c354aa1be48c009acd153aa7358cc45f30010d64cae4fda8a157ba51416](https://explorer.testnet.rsk.co/tx/0xd7fa3c354aa1be48c009acd153aa7358cc45f30010d64cae4fda8a157ba51416) | -| `EtherspotWallet` | `rootstockTestnet` | [0xDedf8D4315580bAB2E1096bBC556F6D6B75B7412](https://explorer.testnet.rsk.co/address/0xDedf8D4315580bAB2E1096bBC556F6D6B75B7412) | [0x8782d4841dee0ab84227eb7878cafef88e632687ffbbd03b48bc4ccfef9ea8c3](https://explorer.testnet.rsk.co/tx/0x8782d4841dee0ab84227eb7878cafef88e632687ffbbd03b48bc4ccfef9ea8c3) | +| `EtherspotPaymaster` | `rootstockTestnet` | [0xD302BE6e9D3fE0fBf8122a0C34611E31c0D0E792](https://rootstock-testnet.blockscout.com/address/0xd302BE6e9D3fe0fbF8122A0C34611e31C0D0e792) | [0x697e85f6370572b9f5d3902718e04555e0a374659a69af25c733b36841c33464](https://rootstock-testnet.blockscout.com/tx/0x697e85f6370572b9f5d3902718e04555e0a374659a69af25c733b36841c33464) | +| `EtherspotWalletFactory` | `rootstockTestnet` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://rootstock-testnet.blockscout.com/address/0x7f6d8f107fE8551160bd5351d5F1514A6AD5D40E) | [0xd7fa3c354aa1be48c009acd153aa7358cc45f30010d64cae4fda8a157ba51416](https://rootstock-testnet.blockscout.com/tx/0xd7fa3c354aa1be48c009acd153aa7358cc45f30010d64cae4fda8a157ba51416) | +| `EtherspotWallet` | `rootstockTestnet` | [0xDedf8D4315580bAB2E1096bBC556F6D6B75B7412](https://rootstock-testnet.blockscout.com/address/0xDeDf8D4315580BAb2e1096bBC556f6D6B75B7412) | [0x8782d4841dee0ab84227eb7878cafef88e632687ffbbd03b48bc4ccfef9ea8c3](https://rootstock-testnet.blockscout.com/tx/0x8782d4841dee0ab84227eb7878cafef88e632687ffbbd03b48bc4ccfef9ea8c3) | | `EtherspotPaymaster` | `kromaSepolia` | [0x810FA4C915015b703db0878CF2B9344bEB254a40](https://blockscout.sepolia.kroma.network/address/0x810FA4C915015b703db0878CF2B9344bEB254a40) | [0x4930f7756e309106f79769ff63e8b081a8f90f5b4924fe3f8c9013b39c0f2674](https://blockscout.sepolia.kroma.network/tx/0x4930f7756e309106f79769ff63e8b081a8f90f5b4924fe3f8c9013b39c0f2674) | | `EtherspotWalletFactory` | `kromaSepolia` | [0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E](https://blockscout.sepolia.kroma.network/address/0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E) | [0xdaea44e26147fc8b2770a414df8169c3e12ec68ca4167cd009456d5334b07ca7](https://blockscout.sepolia.kroma.network/tx/0xdaea44e26147fc8b2770a414df8169c3e12ec68ca4167cd009456d5334b07ca7) | | `EtherspotWallet` | `kromaSepolia` | [0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20](https://blockscout.sepolia.kroma.network/address/0xfB32cef50CfB0A0F9f6d37A05828b2F56EfdfE20) | [0x390796f252df109b20742e694a94305f2d54a2727028f2551739fe5666a093f9](https://blockscout.sepolia.kroma.network/tx/0x390796f252df109b20742e694a94305f2d54a2727028f2551739fe5666a093f9) | diff --git a/config/etherscan.ts b/config/etherscan.ts index b79f6b17..eaa8a76e 100644 --- a/config/etherscan.ts +++ b/config/etherscan.ts @@ -245,6 +245,22 @@ const etherscan: HardhatUserConfig['etherscan'] = { browserURL: 'https://amoy.polygonscan.com/', }, }, + { + network: 'rootstock', + chainId: 30, + urls: { + apiURL: 'https://rootstock.blockscout.com/api', + browserURL: 'https://rootstock.blockscout.com/', + }, + }, + { + network: 'rootstockTestnet', + chainId: 31, + urls: { + apiURL: 'https://rootstock-testnet.blockscout.com/api', + browserURL: 'https://rootstock-testnet.blockscout.com/', + }, + }, ], }; diff --git a/deployments/rootstockTestnet/EtherspotPaymaster.json b/deployments/rootstockTestnet/EtherspotPaymaster.json new file mode 100644 index 00000000..f01c6468 --- /dev/null +++ b/deployments/rootstockTestnet/EtherspotPaymaster.json @@ -0,0 +1,750 @@ +{ + "address": "0xD302BE6e9D3fE0fBf8122a0C34611E31c0D0E792", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEntryPoint", + "name": "_entryPoint", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": true, + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + } + ], + "name": "AddedBatchToWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddedToWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": true, + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + } + ], + "name": "RemovedBatchFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RemovedFromWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "paymaster", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "SponsorSuccessful", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_accounts", + "type": "address[]" + } + ], + "name": "addBatchToWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "addToWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "check", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositFunds", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct UserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "validAfter", + "type": "uint48" + } + ], + "name": "getHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sponsor", + "type": "address" + } + ], + "name": "getSponsorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + } + ], + "name": "parsePaymasterAndData", + "outputs": [ + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "validAfter", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IPaymaster.PostOpMode", + "name": "mode", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "context", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "actualGasCost", + "type": "uint256" + } + ], + "name": "postOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_accounts", + "type": "address[]" + } + ], + "name": "removeBatchFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "removeFromWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct UserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maxCost", + "type": "uint256" + } + ], + "name": "validatePaymasterUserOp", + "outputs": [ + { + "internalType": "bytes", + "name": "context", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "validationData", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x697e85f6370572b9f5d3902718e04555e0a374659a69af25c733b36841c33464", + "receipt": { + "to": null, + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": "0xD302BE6e9D3fE0fBf8122a0C34611E31c0D0E792", + "transactionIndex": 3, + "gasUsed": "1582725", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000001000000000000004000000000004000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000100000000000000000000000000000000000000000000000", + "blockHash": "0x8fb838477128c652bf1bfe2d881c4a1de77ef7dfaf65c10a9cab44024d269739", + "transactionHash": "0x697e85f6370572b9f5d3902718e04555e0a374659a69af25c733b36841c33464", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 5096999, + "transactionHash": "0x697e85f6370572b9f5d3902718e04555e0a374659a69af25c733b36841c33464", + "address": "0xD302BE6e9D3fE0fBf8122a0C34611E31c0D0E792", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x8fb838477128c652bf1bfe2d881c4a1de77ef7dfaf65c10a9cab44024d269739" + } + ], + "blockNumber": 5096999, + "cumulativeGasUsed": "1858864", + "status": 1, + "byzantium": true + }, + "args": [ + "0x48e60BBb664aEfAc9f14aDB42e5FB5b4a119EB66" + ], + "numDeployments": 1, + "solcInputHash": "2b951daa3c51585d3d2776ae7b8ae421", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"_entryPoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"AddedBatchToWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddedToWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"RemovedBatchFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"RemovedFromWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"paymaster\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SponsorSuccessful\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_accounts\",\"type\":\"address[]\"}],\"name\":\"addBatchToWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"unstakeDelaySec\",\"type\":\"uint32\"}],\"name\":\"addStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"addToWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"check\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositFunds\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"entryPoint\",\"outputs\":[{\"internalType\":\"contract IEntryPoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"callGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"verificationGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPriorityFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct UserOperation\",\"name\":\"userOp\",\"type\":\"tuple\"},{\"internalType\":\"uint48\",\"name\":\"validUntil\",\"type\":\"uint48\"},{\"internalType\":\"uint48\",\"name\":\"validAfter\",\"type\":\"uint48\"}],\"name\":\"getHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sponsor\",\"type\":\"address\"}],\"name\":\"getSponsorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"}],\"name\":\"parsePaymasterAndData\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"validUntil\",\"type\":\"uint48\"},{\"internalType\":\"uint48\",\"name\":\"validAfter\",\"type\":\"uint48\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IPaymaster.PostOpMode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"actualGasCost\",\"type\":\"uint256\"}],\"name\":\"postOp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_accounts\",\"type\":\"address[]\"}],\"name\":\"removeBatchFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"removeFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"callGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"verificationGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"preVerificationGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxPriorityFeePerGas\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"paymasterAndData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct UserOperation\",\"name\":\"userOp\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"userOpHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"maxCost\",\"type\":\"uint256\"}],\"name\":\"validatePaymasterUserOp\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validationData\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addStake(uint32)\":{\"params\":{\"unstakeDelaySec\":\"- the unstake delay for this paymaster. Can only be increased.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"postOp(uint8,bytes,uint256)\":{\"params\":{\"actualGasCost\":\"- actual gas used so far (without this postOp call).\",\"context\":\"- the context value returned by validatePaymasterUserOp\",\"mode\":\"enum with the following options: opSucceeded - user operation succeeded. opReverted - user op reverted. still has to pay for gas. postOpReverted - user op succeeded, but caused postOp (in mode=opSucceeded) to revert. Now this is the 2nd call, after user's op was deliberately reverted.\"}},\"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.\"},\"validatePaymasterUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)\":{\"params\":{\"maxCost\":\"the maximum cost of this transaction (based on maximum gas and gas price from userOp)\",\"userOp\":\"the user operation\",\"userOpHash\":\"hash of the user's request data.\"},\"returns\":{\"context\":\"value to send to a postOp zero length to signify postOp is not required.\",\"validationData\":\"signature and time-range of this operation, encoded the same as the return value of validateUserOperation <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, otherwise, an address of an \\\"authorizer\\\" contract. <6-byte> validUntil - last timestamp this operation is valid. 0 for \\\"indefinite\\\" <6-byte> validAfter - first timestamp this operation is valid Note that the validation code cannot use block.timestamp (or block.number) directly.\"}},\"withdrawStake(address)\":{\"params\":{\"withdrawAddress\":\"the address to send withdrawn value.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addStake(uint32)\":{\"notice\":\"add stake for this paymaster. This method can also carry eth value to add to the current stake.\"},\"getDeposit()\":{\"notice\":\"return current paymaster's deposit on the entryPoint.\"},\"getHash((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint48,uint48)\":{\"notice\":\"return the hash we're going to sign off-chain (and validate on-chain) this method is called by the off-chain service, to sign the request. it is called on-chain from the validatePaymasterUserOp, to validate the signature. note that this signature covers all fields of the UserOperation, except the \\\"paymasterAndData\\\", which will carry the signature itself.\"},\"postOp(uint8,bytes,uint256)\":{\"notice\":\"post-operation handler. Must verify sender is the entryPoint\"},\"unlockStake()\":{\"notice\":\"unlock the stake, in order to withdraw it. The paymaster can't serve requests once unlocked, until it calls addStake again\"},\"validatePaymasterUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)\":{\"notice\":\"payment validation: check if paymaster agrees to pay. Must verify sender is the entryPoint. Revert to reject this request. Note that bundlers will reject this method if it changes the state, unless the paymaster is trusted (whitelisted) The paymaster pre-pays using its deposit, and receive back a refund after the postOp method returns.\"},\"withdrawStake(address)\":{\"notice\":\"withdraw the entire paymaster's stake. stake must be unlocked first (and then wait for the unstakeDelay to be over)\"}},\"notice\":\"A sample paymaster that uses external service to decide whether to pay for the UserOp. The paymaster trusts an external signer to sign the transaction. The calling user must pass the UserOp to that external signer first, which performs whatever off-chain verification before signing the UserOp. Note that this signature is NOT a replacement for wallet signature: - the paymaster signs to agree to PAY for GAS. - the wallet signs to prove identity and account ownership.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/paymaster/EtherspotPaymaster.sol\":\"EtherspotPaymaster\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (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/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/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\"},\"account-abstraction/contracts/core/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n/* solhint-disable no-inline-assembly */\\n\\n/**\\n * returned data from validateUserOp.\\n * validateUserOp returns a uint256, with is created by `_packedValidationData` and parsed by `_parseValidationData`\\n * @param aggregator - address(0) - the account validated the signature by itself.\\n * address(1) - the account failed to validate the signature.\\n * otherwise - this is an address of a signature aggregator that must be used to validate the signature.\\n * @param validAfter - this UserOp is valid only after this timestamp.\\n * @param validaUntil - this UserOp is valid only up to this timestamp.\\n */\\n struct ValidationData {\\n address aggregator;\\n uint48 validAfter;\\n uint48 validUntil;\\n }\\n\\n//extract sigFailed, validAfter, validUntil.\\n// also convert zero validUntil to type(uint48).max\\n function _parseValidationData(uint validationData) pure returns (ValidationData memory data) {\\n address aggregator = address(uint160(validationData));\\n uint48 validUntil = uint48(validationData >> 160);\\n if (validUntil == 0) {\\n validUntil = type(uint48).max;\\n }\\n uint48 validAfter = uint48(validationData >> (48 + 160));\\n return ValidationData(aggregator, validAfter, validUntil);\\n }\\n\\n// intersect account and paymaster ranges.\\n function _intersectTimeRange(uint256 validationData, uint256 paymasterValidationData) pure returns (ValidationData memory) {\\n ValidationData memory accountValidationData = _parseValidationData(validationData);\\n ValidationData memory pmValidationData = _parseValidationData(paymasterValidationData);\\n address aggregator = accountValidationData.aggregator;\\n if (aggregator == address(0)) {\\n aggregator = pmValidationData.aggregator;\\n }\\n uint48 validAfter = accountValidationData.validAfter;\\n uint48 validUntil = accountValidationData.validUntil;\\n uint48 pmValidAfter = pmValidationData.validAfter;\\n uint48 pmValidUntil = pmValidationData.validUntil;\\n\\n if (validAfter < pmValidAfter) validAfter = pmValidAfter;\\n if (validUntil > pmValidUntil) validUntil = pmValidUntil;\\n return ValidationData(aggregator, validAfter, validUntil);\\n }\\n\\n/**\\n * helper to pack the return value for validateUserOp\\n * @param data - the ValidationData to pack\\n */\\n function _packValidationData(ValidationData memory data) pure returns (uint256) {\\n return uint160(data.aggregator) | (uint256(data.validUntil) << 160) | (uint256(data.validAfter) << (160 + 48));\\n }\\n\\n/**\\n * helper to pack the return value for validateUserOp, when not using an aggregator\\n * @param sigFailed - true for signature failure, false for success\\n * @param validUntil last timestamp this UserOperation is valid (or zero for infinite)\\n * @param validAfter first timestamp this UserOperation is valid\\n */\\n function _packValidationData(bool sigFailed, uint48 validUntil, uint48 validAfter) pure returns (uint256) {\\n return (sigFailed ? 1 : 0) | (uint256(validUntil) << 160) | (uint256(validAfter) << (160 + 48));\\n }\\n\\n/**\\n * keccak function over calldata.\\n * @dev copy calldata into memory, do keccak and drop allocated memory. Strangely, this is more efficient than letting solidity do it.\\n */\\n function calldataKeccak(bytes calldata data) pure returns (bytes32 ret) {\\n assembly {\\n let mem := mload(0x40)\\n let len := data.length\\n calldatacopy(mem, data.offset, len)\\n ret := keccak256(mem, len)\\n }\\n }\\n\\n\",\"keccak256\":\"0x591c87519f7155d1909210276b77925ab2722a99b7b5d5649aecc36ebbdb045a\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./UserOperation.sol\\\";\\n\\n/**\\n * Aggregated Signatures validator.\\n */\\ninterface IAggregator {\\n\\n /**\\n * validate aggregated signature.\\n * revert if the aggregated signature does not match the given list of operations.\\n */\\n function validateSignatures(UserOperation[] calldata userOps, bytes calldata signature) external view;\\n\\n /**\\n * validate signature of a single userOp\\n * This method is should be called by bundler after EntryPoint.simulateValidation() returns (reverts) with ValidationResultWithAggregation\\n * First it validates the signature over the userOp. Then it returns data to be used when creating the handleOps.\\n * @param userOp the userOperation received from the user.\\n * @return sigForUserOp the value to put into the signature field of the userOp when calling handleOps.\\n * (usually empty, unless account and aggregator support some kind of \\\"multisig\\\"\\n */\\n function validateUserOpSignature(UserOperation calldata userOp)\\n external view returns (bytes memory sigForUserOp);\\n\\n /**\\n * aggregate multiple signatures into a single value.\\n * This method is called off-chain to calculate the signature to pass with handleOps()\\n * bundler MAY use optimized custom code perform this aggregation\\n * @param userOps array of UserOperations to collect the signatures from.\\n * @return aggregatedSignature the aggregated signature\\n */\\n function aggregateSignatures(UserOperation[] calldata userOps) external view returns (bytes memory aggregatedSignature);\\n}\\n\",\"keccak256\":\"0x060e9ddb0152250c269ba0640dc5753834ac44cf182a2837d508c0c529cae26a\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IEntryPoint.sol\":{\"content\":\"/**\\n ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\\n ** Only one instance required on each chain.\\n **/\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n/* solhint-disable avoid-low-level-calls */\\n/* solhint-disable no-inline-assembly */\\n/* solhint-disable reason-string */\\n\\nimport \\\"./UserOperation.sol\\\";\\nimport \\\"./IStakeManager.sol\\\";\\nimport \\\"./IAggregator.sol\\\";\\nimport \\\"./INonceManager.sol\\\";\\n\\ninterface IEntryPoint is IStakeManager, INonceManager {\\n\\n /***\\n * An event emitted after each successful request\\n * @param userOpHash - unique identifier for the request (hash its entire content, except signature).\\n * @param sender - the account that generates this request.\\n * @param paymaster - if non-null, the paymaster that pays for this request.\\n * @param nonce - the nonce value from the request.\\n * @param success - true if the sender transaction succeeded, false if reverted.\\n * @param actualGasCost - actual amount paid (by account or paymaster) for this UserOperation.\\n * @param actualGasUsed - total gas used by this UserOperation (including preVerification, creation, validation and execution).\\n */\\n event UserOperationEvent(bytes32 indexed userOpHash, address indexed sender, address indexed paymaster, uint256 nonce, bool success, uint256 actualGasCost, uint256 actualGasUsed);\\n\\n /**\\n * account \\\"sender\\\" was deployed.\\n * @param userOpHash the userOp that deployed this account. UserOperationEvent will follow.\\n * @param sender the account that is deployed\\n * @param factory the factory used to deploy this account (in the initCode)\\n * @param paymaster the paymaster used by this UserOp\\n */\\n event AccountDeployed(bytes32 indexed userOpHash, address indexed sender, address factory, address paymaster);\\n\\n /**\\n * An event emitted if the UserOperation \\\"callData\\\" reverted with non-zero length\\n * @param userOpHash the request unique identifier.\\n * @param sender the sender of this request\\n * @param nonce the nonce used in the request\\n * @param revertReason - the return bytes from the (reverted) call to \\\"callData\\\".\\n */\\n event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason);\\n\\n /**\\n * an event emitted by handleOps(), before starting the execution loop.\\n * any event emitted before this event, is part of the validation.\\n */\\n event BeforeExecution();\\n\\n /**\\n * signature aggregator used by the following UserOperationEvents within this bundle.\\n */\\n event SignatureAggregatorChanged(address indexed aggregator);\\n\\n /**\\n * a custom revert error of handleOps, to identify the offending op.\\n * NOTE: if simulateValidation passes successfully, there should be no reason for handleOps to fail on it.\\n * @param opIndex - index into the array of ops to the failed one (in simulateValidation, this is always zero)\\n * @param reason - revert reason\\n * The string starts with a unique code \\\"AAmn\\\", where \\\"m\\\" is \\\"1\\\" for factory, \\\"2\\\" for account and \\\"3\\\" for paymaster issues,\\n * so a failure can be attributed to the correct entity.\\n * Should be caught in off-chain handleOps simulation and not happen on-chain.\\n * Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts.\\n */\\n error FailedOp(uint256 opIndex, string reason);\\n\\n /**\\n * error case when a signature aggregator fails to verify the aggregated signature it had created.\\n */\\n error SignatureValidationFailed(address aggregator);\\n\\n /**\\n * Successful result from simulateValidation.\\n * @param returnInfo gas and time-range returned values\\n * @param senderInfo stake information about the sender\\n * @param factoryInfo stake information about the factory (if any)\\n * @param paymasterInfo stake information about the paymaster (if any)\\n */\\n error ValidationResult(ReturnInfo returnInfo,\\n StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo);\\n\\n /**\\n * Successful result from simulateValidation, if the account returns a signature aggregator\\n * @param returnInfo gas and time-range returned values\\n * @param senderInfo stake information about the sender\\n * @param factoryInfo stake information about the factory (if any)\\n * @param paymasterInfo stake information about the paymaster (if any)\\n * @param aggregatorInfo signature aggregation info (if the account requires signature aggregator)\\n * bundler MUST use it to verify the signature, or reject the UserOperation\\n */\\n error ValidationResultWithAggregation(ReturnInfo returnInfo,\\n StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo,\\n AggregatorStakeInfo aggregatorInfo);\\n\\n /**\\n * return value of getSenderAddress\\n */\\n error SenderAddressResult(address sender);\\n\\n /**\\n * return value of simulateHandleOp\\n */\\n error ExecutionResult(uint256 preOpGas, uint256 paid, uint48 validAfter, uint48 validUntil, bool targetSuccess, bytes targetResult);\\n\\n //UserOps handled, per aggregator\\n struct UserOpsPerAggregator {\\n UserOperation[] userOps;\\n\\n // aggregator address\\n IAggregator aggregator;\\n // aggregated signature\\n bytes signature;\\n }\\n\\n /**\\n * Execute a batch of UserOperation.\\n * no signature aggregator is used.\\n * if any account requires an aggregator (that is, it returned an aggregator when\\n * performing simulateValidation), then handleAggregatedOps() must be used instead.\\n * @param ops the operations to execute\\n * @param beneficiary the address to receive the fees\\n */\\n function handleOps(UserOperation[] calldata ops, address payable beneficiary) external;\\n\\n /**\\n * Execute a batch of UserOperation with Aggregators\\n * @param opsPerAggregator the operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts)\\n * @param beneficiary the address to receive the fees\\n */\\n function handleAggregatedOps(\\n UserOpsPerAggregator[] calldata opsPerAggregator,\\n address payable beneficiary\\n ) external;\\n\\n /**\\n * generate a request Id - unique identifier for this request.\\n * the request ID is a hash over the content of the userOp (except the signature), the entrypoint and the chainid.\\n */\\n function getUserOpHash(UserOperation calldata userOp) external view returns (bytes32);\\n\\n /**\\n * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp.\\n * @dev this method always revert. Successful result is ValidationResult error. other errors are failures.\\n * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage outside the account's data.\\n * @param userOp the user operation to validate.\\n */\\n function simulateValidation(UserOperation calldata userOp) external;\\n\\n /**\\n * gas and return values during simulation\\n * @param preOpGas the gas used for validation (including preValidationGas)\\n * @param prefund the required prefund for this operation\\n * @param sigFailed validateUserOp's (or paymaster's) signature check failed\\n * @param validAfter - first timestamp this UserOp is valid (merging account and paymaster time-range)\\n * @param validUntil - last timestamp this UserOp is valid (merging account and paymaster time-range)\\n * @param paymasterContext returned by validatePaymasterUserOp (to be passed into postOp)\\n */\\n struct ReturnInfo {\\n uint256 preOpGas;\\n uint256 prefund;\\n bool sigFailed;\\n uint48 validAfter;\\n uint48 validUntil;\\n bytes paymasterContext;\\n }\\n\\n /**\\n * returned aggregated signature info.\\n * the aggregator returned by the account, and its current stake.\\n */\\n struct AggregatorStakeInfo {\\n address aggregator;\\n StakeInfo stakeInfo;\\n }\\n\\n /**\\n * Get counterfactual sender address.\\n * Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation.\\n * this method always revert, and returns the address in SenderAddressResult error\\n * @param initCode the constructor code to be passed into the UserOperation.\\n */\\n function getSenderAddress(bytes memory initCode) external;\\n\\n\\n /**\\n * simulate full execution of a UserOperation (including both validation and target execution)\\n * this method will always revert with \\\"ExecutionResult\\\".\\n * it performs full validation of the UserOperation, but ignores signature error.\\n * an optional target address is called after the userop succeeds, and its value is returned\\n * (before the entire call is reverted)\\n * Note that in order to collect the the success/failure of the target call, it must be executed\\n * with trace enabled to track the emitted events.\\n * @param op the UserOperation to simulate\\n * @param target if nonzero, a target address to call after userop simulation. If called, the targetSuccess and targetResult\\n * are set to the return from that call.\\n * @param targetCallData callData to pass to target address\\n */\\n function simulateHandleOp(UserOperation calldata op, address target, bytes calldata targetCallData) external;\\n}\\n\\n\",\"keccak256\":\"0x3a90bf308819ed125fa4202f880999caff8a8686633b8ddb79a30ca240d5b8f8\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/INonceManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\ninterface INonceManager {\\n\\n /**\\n * Return the next nonce for this sender.\\n * Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop)\\n * But UserOp with different keys can come with arbitrary order.\\n *\\n * @param sender the account address\\n * @param key the high 192 bit of the nonce\\n * @return nonce a full nonce to pass for next UserOp with this sender.\\n */\\n function getNonce(address sender, uint192 key)\\n external view returns (uint256 nonce);\\n\\n /**\\n * Manually increment the nonce of the sender.\\n * This method is exposed just for completeness..\\n * Account does NOT need to call it, neither during validation, nor elsewhere,\\n * as the EntryPoint will update the nonce regardless.\\n * Possible use-case is call it with various keys to \\\"initialize\\\" their nonces to one, so that future\\n * UserOperations will not pay extra for the first transaction with a given key.\\n */\\n function incrementNonce(uint192 key) external;\\n}\\n\",\"keccak256\":\"0x509871e6c63663cdcc3eba19920fe84e991f38b289b1377ac3c3a6d9f22d7e12\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./UserOperation.sol\\\";\\n\\n/**\\n * the interface exposed by a paymaster contract, who agrees to pay the gas for user's operations.\\n * a paymaster must hold a stake to cover the required entrypoint stake and also the gas for the transaction.\\n */\\ninterface IPaymaster {\\n\\n enum PostOpMode {\\n opSucceeded, // user op succeeded\\n opReverted, // user op reverted. still has to pay for gas.\\n postOpReverted //user op succeeded, but caused postOp to revert. Now it's a 2nd call, after user's op was deliberately reverted.\\n }\\n\\n /**\\n * payment validation: check if paymaster agrees to pay.\\n * Must verify sender is the entryPoint.\\n * Revert to reject this request.\\n * Note that bundlers will reject this method if it changes the state, unless the paymaster is trusted (whitelisted)\\n * The paymaster pre-pays using its deposit, and receive back a refund after the postOp method returns.\\n * @param userOp the user operation\\n * @param userOpHash hash of the user's request data.\\n * @param maxCost the maximum cost of this transaction (based on maximum gas and gas price from userOp)\\n * @return context value to send to a postOp\\n * zero length to signify postOp is not required.\\n * @return validationData signature and time-range of this operation, encoded the same as the return value of validateUserOperation\\n * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure,\\n * otherwise, an address of an \\\"authorizer\\\" contract.\\n * <6-byte> validUntil - last timestamp this operation is valid. 0 for \\\"indefinite\\\"\\n * <6-byte> validAfter - first timestamp this operation is valid\\n * Note that the validation code cannot use block.timestamp (or block.number) directly.\\n */\\n function validatePaymasterUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 maxCost)\\n external returns (bytes memory context, uint256 validationData);\\n\\n /**\\n * post-operation handler.\\n * Must verify sender is the entryPoint\\n * @param mode enum with the following options:\\n * opSucceeded - user operation succeeded.\\n * opReverted - user op reverted. still has to pay for gas.\\n * postOpReverted - user op succeeded, but caused postOp (in mode=opSucceeded) to revert.\\n * Now this is the 2nd call, after user's op was deliberately reverted.\\n * @param context - the context value returned by validatePaymasterUserOp\\n * @param actualGasCost - actual gas used so far (without this postOp call).\\n */\\n function postOp(PostOpMode mode, bytes calldata context, uint256 actualGasCost) external;\\n}\\n\",\"keccak256\":\"0x36858ba8685024974f533530420688da3454d29996ebc42e410673a1ed2ec456\",\"license\":\"GPL-3.0\"},\"account-abstraction/contracts/interfaces/IStakeManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.12;\\n\\n/**\\n * manage deposits and stakes.\\n * deposit is just a balance used to pay for UserOperations (either by a paymaster or an account)\\n * stake is value locked for at least \\\"unstakeDelay\\\" by the staked entity.\\n */\\ninterface IStakeManager {\\n\\n event Deposited(\\n address indexed account,\\n uint256 totalDeposit\\n );\\n\\n event Withdrawn(\\n address indexed account,\\n address withdrawAddress,\\n uint256 amount\\n );\\n\\n /// Emitted when stake or unstake delay are modified\\n event StakeLocked(\\n address indexed account,\\n uint256 totalStaked,\\n uint256 unstakeDelaySec\\n );\\n\\n /// Emitted once a stake is scheduled for withdrawal\\n event StakeUnlocked(\\n address indexed account,\\n uint256 withdrawTime\\n );\\n\\n event StakeWithdrawn(\\n address indexed account,\\n address withdrawAddress,\\n uint256 amount\\n );\\n\\n /**\\n * @param deposit the entity's deposit\\n * @param staked true if this entity is staked.\\n * @param stake actual amount of ether staked for this entity.\\n * @param unstakeDelaySec minimum delay to withdraw the stake.\\n * @param withdrawTime - first block timestamp where 'withdrawStake' will be callable, or zero if already locked\\n * @dev sizes were chosen so that (deposit,staked, stake) fit into one cell (used during handleOps)\\n * and the rest fit into a 2nd cell.\\n * 112 bit allows for 10^15 eth\\n * 48 bit for full timestamp\\n * 32 bit allows 150 years for unstake delay\\n */\\n struct DepositInfo {\\n uint112 deposit;\\n bool staked;\\n uint112 stake;\\n uint32 unstakeDelaySec;\\n uint48 withdrawTime;\\n }\\n\\n //API struct used by getStakeInfo and simulateValidation\\n struct StakeInfo {\\n uint256 stake;\\n uint256 unstakeDelaySec;\\n }\\n\\n /// @return info - full deposit information of given account\\n function getDepositInfo(address account) external view returns (DepositInfo memory info);\\n\\n /// @return the deposit (for gas payment) of the account\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * add to the deposit of the given account\\n */\\n function depositTo(address account) external payable;\\n\\n /**\\n * add to the account's stake - amount and delay\\n * any pending unstake is first cancelled.\\n * @param _unstakeDelaySec the new lock duration before the deposit can be withdrawn.\\n */\\n function addStake(uint32 _unstakeDelaySec) external payable;\\n\\n /**\\n * attempt to unlock the stake.\\n * the value can be withdrawn (using withdrawStake) after the unstake delay.\\n */\\n function unlockStake() external;\\n\\n /**\\n * withdraw from the (unlocked) stake.\\n * must first call unlockStake and wait for the unstakeDelay to pass\\n * @param withdrawAddress the address to send withdrawn value.\\n */\\n function withdrawStake(address payable withdrawAddress) external;\\n\\n /**\\n * withdraw from the deposit.\\n * @param withdrawAddress the address to send withdrawn value.\\n * @param withdrawAmount the amount to withdraw.\\n */\\n function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount) external;\\n}\\n\",\"keccak256\":\"0xd227b02888cd4ac68daebcdfd992ec00f9fff66fa3b3bb16f656cd582fa3480f\",\"license\":\"GPL-3.0-only\"},\"account-abstraction/contracts/interfaces/UserOperation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n/* solhint-disable no-inline-assembly */\\n\\nimport {calldataKeccak} from \\\"../core/Helpers.sol\\\";\\n\\n/**\\n * User Operation struct\\n * @param sender the sender account of this request.\\n * @param nonce unique value the sender uses to verify it is not a replay.\\n * @param initCode if set, the account contract will be created by this constructor/\\n * @param callData the method call to execute on this account.\\n * @param callGasLimit the gas limit passed to the callData method call.\\n * @param verificationGasLimit gas used for validateUserOp and validatePaymasterUserOp.\\n * @param preVerificationGas gas not calculated by the handleOps method, but added to the gas paid. Covers batch overhead.\\n * @param maxFeePerGas same as EIP-1559 gas parameter.\\n * @param maxPriorityFeePerGas same as EIP-1559 gas parameter.\\n * @param paymasterAndData if set, this field holds the paymaster address and paymaster-specific data. the paymaster will pay for the transaction instead of the sender.\\n * @param signature sender-verified signature over the entire request, the EntryPoint address and the chain ID.\\n */\\n struct UserOperation {\\n\\n address sender;\\n uint256 nonce;\\n bytes initCode;\\n bytes callData;\\n uint256 callGasLimit;\\n uint256 verificationGasLimit;\\n uint256 preVerificationGas;\\n uint256 maxFeePerGas;\\n uint256 maxPriorityFeePerGas;\\n bytes paymasterAndData;\\n bytes signature;\\n }\\n\\n/**\\n * Utility functions helpful when working with UserOperation structs.\\n */\\nlibrary UserOperationLib {\\n\\n function getSender(UserOperation calldata userOp) internal pure returns (address) {\\n address data;\\n //read sender from userOp, which is first userOp member (saves 800 gas...)\\n assembly {data := calldataload(userOp)}\\n return address(uint160(data));\\n }\\n\\n //relayer/block builder might submit the TX with higher priorityFee, but the user should not\\n // pay above what he signed for.\\n function gasPrice(UserOperation calldata userOp) internal view returns (uint256) {\\n unchecked {\\n uint256 maxFeePerGas = userOp.maxFeePerGas;\\n uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas;\\n if (maxFeePerGas == maxPriorityFeePerGas) {\\n //legacy mode (for networks that don't support basefee opcode)\\n return maxFeePerGas;\\n }\\n return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee);\\n }\\n }\\n\\n function pack(UserOperation calldata userOp) internal pure returns (bytes memory ret) {\\n address sender = getSender(userOp);\\n uint256 nonce = userOp.nonce;\\n bytes32 hashInitCode = calldataKeccak(userOp.initCode);\\n bytes32 hashCallData = calldataKeccak(userOp.callData);\\n uint256 callGasLimit = userOp.callGasLimit;\\n uint256 verificationGasLimit = userOp.verificationGasLimit;\\n uint256 preVerificationGas = userOp.preVerificationGas;\\n uint256 maxFeePerGas = userOp.maxFeePerGas;\\n uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas;\\n bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\\n\\n return abi.encode(\\n sender, nonce,\\n hashInitCode, hashCallData,\\n callGasLimit, verificationGasLimit, preVerificationGas,\\n maxFeePerGas, maxPriorityFeePerGas,\\n hashPaymasterAndData\\n );\\n }\\n\\n function hash(UserOperation calldata userOp) internal pure returns (bytes32) {\\n return keccak256(pack(userOp));\\n }\\n\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x61374003361059087fdcf17967a7bba052badeaf5c7f0ae689166f8aafd3a45c\",\"license\":\"GPL-3.0\"},\"src/interfaces/IWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\ninterface IWhitelist {\\n event AddedToWhitelist(address indexed paymaster, address indexed account);\\n event AddedBatchToWhitelist(\\n address indexed paymaster,\\n address[] indexed accounts\\n );\\n event RemovedFromWhitelist(\\n address indexed paymaster,\\n address indexed account\\n );\\n event RemovedBatchFromWhitelist(\\n address indexed paymaster,\\n address[] indexed accounts\\n );\\n\\n function check(\\n address _sponsor,\\n address _account\\n ) external view returns (bool);\\n\\n function addToWhitelist(address _account) external;\\n\\n function addBatchToWhitelist(address[] calldata _accounts) external;\\n\\n function removeFromWhitelist(address _account) external;\\n\\n function removeBatchFromWhitelist(address[] calldata _accounts) external;\\n}\\n\",\"keccak256\":\"0x978f08a658cd93e6004639d5b0834f8ff16ce748222403d14bb4b288b4d81223\",\"license\":\"GPL-3.0\"},\"src/paymaster/BasePaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../../account-abstraction/contracts/interfaces/IPaymaster.sol\\\";\\nimport \\\"../../account-abstraction/contracts/interfaces/IEntryPoint.sol\\\";\\nimport \\\"../../account-abstraction/contracts/core/Helpers.sol\\\";\\n\\n/**\\n * Helper class for creating a paymaster.\\n * provides helper methods for staking.\\n * validates that the postOp is called only by the entryPoint\\n */\\nabstract contract BasePaymaster is IPaymaster, Ownable {\\n IEntryPoint public immutable entryPoint;\\n\\n constructor(IEntryPoint _entryPoint) {\\n entryPoint = _entryPoint;\\n }\\n\\n /// @inheritdoc IPaymaster\\n function validatePaymasterUserOp(\\n UserOperation calldata userOp,\\n bytes32 userOpHash,\\n uint256 maxCost\\n ) external override returns (bytes memory context, uint256 validationData) {\\n _requireFromEntryPoint();\\n return _validatePaymasterUserOp(userOp, userOpHash, maxCost);\\n }\\n\\n function _validatePaymasterUserOp(\\n UserOperation calldata userOp,\\n bytes32 userOpHash,\\n uint256 maxCost\\n ) internal virtual returns (bytes memory context, uint256 validationData);\\n\\n /// @inheritdoc IPaymaster\\n function postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost\\n ) external override {\\n _requireFromEntryPoint();\\n _postOp(mode, context, actualGasCost);\\n }\\n\\n /**\\n * post-operation handler.\\n * (verified to be called only through the entryPoint)\\n * @dev if subclass returns a non-empty context from validatePaymasterUserOp, it must also implement this method.\\n * @param mode enum with the following options:\\n * opSucceeded - user operation succeeded.\\n * opReverted - user op reverted. still has to pay for gas.\\n * postOpReverted - user op succeeded, but caused postOp (in mode=opSucceeded) to revert.\\n * Now this is the 2nd call, after user's op was deliberately reverted.\\n * @param context - the context value returned by validatePaymasterUserOp\\n * @param actualGasCost - actual gas used so far (without this postOp call).\\n */\\n function _postOp(\\n PostOpMode mode,\\n bytes calldata context,\\n uint256 actualGasCost\\n ) internal virtual {\\n (mode, context, actualGasCost); // unused params\\n // subclass must override this method if validatePaymasterUserOp returns a context\\n revert(\\\"must override\\\");\\n }\\n\\n /**\\n * add stake for this paymaster.\\n * This method can also carry eth value to add to the current stake.\\n * @param unstakeDelaySec - the unstake delay for this paymaster. Can only be increased.\\n */\\n function addStake(uint32 unstakeDelaySec) external payable onlyOwner {\\n entryPoint.addStake{value: msg.value}(unstakeDelaySec);\\n }\\n\\n /**\\n * return current paymaster's deposit on the entryPoint.\\n */\\n function getDeposit() public view returns (uint256) {\\n return entryPoint.balanceOf(address(this));\\n }\\n\\n /**\\n * unlock the stake, in order to withdraw it.\\n * The paymaster can't serve requests once unlocked, until it calls addStake again\\n */\\n function unlockStake() external onlyOwner {\\n entryPoint.unlockStake();\\n }\\n\\n /**\\n * withdraw the entire paymaster's stake.\\n * stake must be unlocked first (and then wait for the unstakeDelay to be over)\\n * @param withdrawAddress the address to send withdrawn value.\\n */\\n function withdrawStake(address payable withdrawAddress) external onlyOwner {\\n entryPoint.withdrawStake(withdrawAddress);\\n }\\n\\n /// validate the call is made from a valid entrypoint\\n function _requireFromEntryPoint() internal virtual {\\n require(msg.sender == address(entryPoint), \\\"Sender not EntryPoint\\\");\\n }\\n}\\n\",\"keccak256\":\"0x3e3670c29ffe4c4409573df235da99611115db67778104ff76342d71ecba004b\",\"license\":\"GPL-3.0\"},\"src/paymaster/EtherspotPaymaster.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\n/* solhint-disable reason-string */\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"./BasePaymaster.sol\\\";\\nimport \\\"./Whitelist.sol\\\";\\n\\n/**\\n * A sample paymaster that uses external service to decide whether to pay for the UserOp.\\n * The paymaster trusts an external signer to sign the transaction.\\n * The calling user must pass the UserOp to that external signer first, which performs\\n * whatever off-chain verification before signing the UserOp.\\n * Note that this signature is NOT a replacement for wallet signature:\\n * - the paymaster signs to agree to PAY for GAS.\\n * - the wallet signs to prove identity and account ownership.\\n */\\ncontract EtherspotPaymaster is BasePaymaster, Whitelist, ReentrancyGuard {\\n using ECDSA for bytes32;\\n using UserOperationLib for UserOperation;\\n\\n uint256 private constant VALID_TIMESTAMP_OFFSET = 20;\\n uint256 private constant SIGNATURE_OFFSET = 84;\\n // calculated cost of the postOp\\n uint256 private constant COST_OF_POST = 40000;\\n\\n mapping(address => uint256) private _sponsorBalances;\\n\\n event SponsorSuccessful(address paymaster, address sender);\\n\\n constructor(IEntryPoint _entryPoint) BasePaymaster(_entryPoint) {}\\n\\n function depositFunds() external payable nonReentrant {\\n _creditSponsor(msg.sender, msg.value);\\n entryPoint.depositTo{value: msg.value}(address(this));\\n }\\n\\n function withdrawFunds(uint256 _amount) external nonReentrant {\\n require(\\n getSponsorBalance(msg.sender) >= _amount,\\n \\\"EtherspotPaymaster:: not enough deposited funds\\\"\\n );\\n _debitSponsor(msg.sender, _amount);\\n entryPoint.withdrawTo(payable(msg.sender), _amount);\\n }\\n\\n function getSponsorBalance(address _sponsor) public view returns (uint256) {\\n return _sponsorBalances[_sponsor];\\n }\\n\\n function _debitSponsor(address _sponsor, uint256 _amount) internal {\\n _sponsorBalances[_sponsor] -= _amount;\\n }\\n\\n function _creditSponsor(address _sponsor, uint256 _amount) internal {\\n _sponsorBalances[_sponsor] += _amount;\\n }\\n\\n function _pack(\\n UserOperation calldata userOp\\n ) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n userOp.getSender(),\\n userOp.nonce,\\n keccak256(userOp.initCode),\\n keccak256(userOp.callData),\\n userOp.callGasLimit,\\n userOp.verificationGasLimit,\\n userOp.preVerificationGas,\\n userOp.maxFeePerGas,\\n userOp.maxPriorityFeePerGas\\n )\\n );\\n }\\n\\n /**\\n * return the hash we're going to sign off-chain (and validate on-chain)\\n * this method is called by the off-chain service, to sign the request.\\n * it is called on-chain from the validatePaymasterUserOp, to validate the signature.\\n * note that this signature covers all fields of the UserOperation, except the \\\"paymasterAndData\\\",\\n * which will carry the signature itself.\\n */\\n function getHash(\\n UserOperation calldata userOp,\\n uint48 validUntil,\\n uint48 validAfter\\n ) public view returns (bytes32) {\\n //can't use userOp.hash(), since it contains also the paymasterAndData itself.\\n\\n return\\n keccak256(\\n abi.encode(\\n _pack(userOp),\\n block.chainid,\\n address(this),\\n validUntil,\\n validAfter\\n )\\n );\\n }\\n\\n /**\\n * verify our external signer signed this request.\\n * the \\\"paymasterAndData\\\" is expected to be the paymaster and a signature over the entire request params\\n * paymasterAndData[:20] : address(this)\\n * paymasterAndData[20:84] : abi.encode(validUntil, validAfter)\\n * paymasterAndData[84:] : signature\\n */\\n function _validatePaymasterUserOp(\\n UserOperation calldata userOp,\\n bytes32 /*userOpHash*/,\\n uint256 requiredPreFund\\n ) internal override returns (bytes memory context, uint256 validationData) {\\n (requiredPreFund);\\n\\n (\\n uint48 validUntil,\\n uint48 validAfter,\\n bytes calldata signature\\n ) = parsePaymasterAndData(userOp.paymasterAndData);\\n // ECDSA library supports both 64 and 65-byte long signatures.\\n // we only \\\"require\\\" it here so that the revert reason on invalid signature will be of \\\"EtherspotPaymaster\\\", and not \\\"ECDSA\\\"\\n require(\\n signature.length == 64 || signature.length == 65,\\n \\\"EtherspotPaymaster:: invalid signature length in paymasterAndData\\\"\\n );\\n bytes32 hash = ECDSA.toEthSignedMessageHash(\\n getHash(userOp, validUntil, validAfter)\\n );\\n address sig = userOp.getSender();\\n\\n // check for valid paymaster\\n address sponsorSig = ECDSA.recover(hash, signature);\\n\\n // don't revert on signature failure: return SIG_VALIDATION_FAILED\\n if (!_check(sponsorSig, sig)) {\\n return (\\\"\\\", _packValidationData(true, validUntil, validAfter));\\n }\\n\\n // check sponsor has enough funds deposited to pay for gas\\n require(\\n getSponsorBalance(sponsorSig) >= requiredPreFund,\\n \\\"EtherspotPaymaster:: Sponsor paymaster funds too low\\\"\\n );\\n\\n uint256 costOfPost = userOp.maxFeePerGas * COST_OF_POST;\\n uint256 totalPreFund = requiredPreFund + costOfPost;\\n\\n // debit requiredPreFund amount\\n _debitSponsor(sponsorSig, totalPreFund);\\n\\n // no need for other on-chain validation: entire UserOp should have been checked\\n // by the external service prior to signing it.\\n return (\\n abi.encode(sponsorSig, sig, totalPreFund, costOfPost),\\n _packValidationData(false, validUntil, validAfter)\\n );\\n }\\n\\n function parsePaymasterAndData(\\n bytes calldata paymasterAndData\\n )\\n public\\n pure\\n returns (uint48 validUntil, uint48 validAfter, bytes calldata signature)\\n {\\n (validUntil, validAfter) = abi.decode(\\n paymasterAndData[VALID_TIMESTAMP_OFFSET:SIGNATURE_OFFSET],\\n (uint48, uint48)\\n );\\n signature = paymasterAndData[SIGNATURE_OFFSET:];\\n }\\n\\n function _postOp(\\n PostOpMode,\\n bytes calldata context,\\n uint256 actualGasCost\\n ) internal override {\\n (\\n address paymaster,\\n address sender,\\n uint256 totalPrefund,\\n uint256 costOfPost\\n ) = abi.decode(context, (address, address, uint256, uint256));\\n _creditSponsor(paymaster, totalPrefund - (actualGasCost + costOfPost));\\n emit SponsorSuccessful(paymaster, sender);\\n }\\n}\\n\",\"keccak256\":\"0x89b888037a36802faa4fad80f0983d0193f6a828ee285809e58901929fe2ae0d\",\"license\":\"MIT\"},\"src/paymaster/Whitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport \\\"../interfaces/IWhitelist.sol\\\";\\n\\ncontract Whitelist is IWhitelist {\\n // Mappings\\n mapping(address => mapping(address => bool)) private whitelist;\\n\\n // External\\n function check(\\n address _sponsor,\\n address _account\\n ) external view returns (bool) {\\n return _check(_sponsor, _account);\\n }\\n\\n function addToWhitelist(address _account) external {\\n _add(_account);\\n emit AddedToWhitelist(msg.sender, _account);\\n }\\n\\n function addBatchToWhitelist(address[] calldata _accounts) external {\\n _addBatch(_accounts);\\n emit AddedBatchToWhitelist(msg.sender, _accounts);\\n }\\n\\n function removeFromWhitelist(address _account) external {\\n _remove(_account);\\n emit RemovedFromWhitelist(msg.sender, _account);\\n }\\n\\n function removeBatchFromWhitelist(address[] calldata _accounts) external {\\n _removeBatch(_accounts);\\n emit RemovedBatchFromWhitelist(msg.sender, _accounts);\\n }\\n\\n // Internal\\n function _check(\\n address _sponsor,\\n address _account\\n ) internal view returns (bool) {\\n return whitelist[_sponsor][_account];\\n }\\n\\n function _add(address _account) internal {\\n require(_account != address(0), \\\"Whitelist:: Zero address\\\");\\n require(\\n !_check(msg.sender, _account),\\n \\\"Whitelist:: Account is already whitelisted\\\"\\n );\\n whitelist[msg.sender][_account] = true;\\n }\\n\\n function _addBatch(address[] calldata _accounts) internal {\\n for (uint256 ii; ii < _accounts.length; ++ii) {\\n _add(_accounts[ii]);\\n }\\n }\\n\\n function _remove(address _account) internal {\\n require(_account != address(0), \\\"Whitelist:: Zero address\\\");\\n require(\\n _check(msg.sender, _account),\\n \\\"Whitelist:: Account is not whitelisted\\\"\\n );\\n whitelist[msg.sender][_account] = false;\\n }\\n\\n function _removeBatch(address[] calldata _accounts) internal {\\n for (uint256 ii; ii < _accounts.length; ++ii) {\\n _remove(_accounts[ii]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3e4f78251fe0a4e784fb2941ea85bf29096482ddf035f28933548e0be824d153\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b5060405162001c0238038062001c02833981016040819052610031916100a2565b8061003b33610052565b6001600160a01b03166080525060016002556100d2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100b457600080fd5b81516001600160a01b03811681146100cb57600080fd5b9392505050565b608051611ae36200011f60003960008181610295015281816103ff0152818161056201528181610749015281816107dd01528181610854015281816108f30152610dcb0152611ae36000f3fe60806040526004361061011f5760003560e01c8063b0d691fe116100a0578063de481f1711610064578063de481f1714610331578063e2c41dbc14610367578063e43252d71461036f578063f2fde38b1461038f578063f465c77e146103af57600080fd5b8063b0d691fe14610283578063b3154db0146102b7578063bb9fe6bf146102e7578063c23a5cea146102fc578063c399ec881461031c57600080fd5b80638da5cb5b116100e75780638da5cb5b146101ae57806394d4ad60146101e557806394e1fc1914610215578063a3d19d8c14610243578063a9a234091461026357600080fd5b80630396cb6014610124578063123a6a8214610139578063155dd5ee14610159578063715018a6146101795780638ab1d6811461018e575b600080fd5b610137610132366004611535565b6103dd565b005b34801561014557600080fd5b50610137610154366004611562565b610468565b34801561016557600080fd5b506101376101743660046115d7565b6104b8565b34801561018557600080fd5b506101376105d3565b34801561019a57600080fd5b506101376101a9366004611605565b6105e7565b3480156101ba57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101f157600080fd5b50610205610200366004611664565b610629565b6040516101dc94939291906116a6565b34801561022157600080fd5b50610235610230366004611726565b610666565b6040519081526020016101dc565b34801561024f57600080fd5b5061013761025e366004611562565b6106c0565b34801561026f57600080fd5b5061013761027e366004611784565b610710565b34801561028f57600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c357600080fd5b506102d76102d23660046117e4565b61072a565b60405190151581526020016101dc565b3480156102f357600080fd5b5061013761073f565b34801561030857600080fd5b50610137610317366004611605565b6107b6565b34801561032857600080fd5b5061023561083c565b34801561033d57600080fd5b5061023561034c366004611605565b6001600160a01b031660009081526003602052604090205490565b6101376108cc565b34801561037b57600080fd5b5061013761038a366004611605565b610963565b34801561039b57600080fd5b506101376103aa366004611605565b6109a5565b3480156103bb57600080fd5b506103cf6103ca36600461181d565b610a1b565b6040516101dc92919061186b565b6103e5610a3f565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561044c57600080fd5b505af1158015610460573d6000803e3d6000fd5b505050505050565b6104728282610a99565b81816040516104829291906118c0565b6040519081900381209033907f75dcdde27b71b9c529ae8b02072e1eeda244662d2d9c2effea5a1afb8fc913f390600090a35050565b6104c0610ae8565b3360009081526003602052604090205481111561053c5760405162461bcd60e51b815260206004820152602f60248201527f457468657273706f745061796d61737465723a3a206e6f7420656e6f7567682060448201526e6465706f73697465642066756e647360881b60648201526084015b60405180910390fd5b6105463382610b3f565b60405163040b850f60e31b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063205c287890604401600060405180830381600087803b1580156105ae57600080fd5b505af11580156105c2573d6000803e3d6000fd5b505050506105d06001600255565b50565b6105db610a3f565b6105e56000610b70565b565b6105f081610bc0565b6040516001600160a01b0382169033907fd288ab5da2e1f37cf384a1565a3f905ad289b092fbdd31950dbbfef148c04f8890600090a350565b600080368161063c605460148789611902565b810190610649919061192c565b909450925061065b8560548189611902565b949793965094505050565b600061067184610ca4565b604080516020810192909252469082015230606082015265ffffffffffff8085166080830152831660a082015260c0016040516020818303038152906040528051906020012090509392505050565b6106ca8282610d76565b81816040516106da9291906118c0565b6040519081900381209033907f6eabb183ad4385932735ae89018089a008c58e814451b618bc0dd0e7922f6d1390600090a35050565b610718610dc0565b61072484848484610e30565b50505050565b60006107368383610eb5565b90505b92915050565b610747610a3f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107a257600080fd5b505af1158015610724573d6000803e3d6000fd5b6107be610a3f565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b5050505050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156108a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c7919061195f565b905090565b6108d4610ae8565b6108de3334610ee3565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561094057600080fd5b505af1158015610954573d6000803e3d6000fd5b50505050506105e56001600255565b61096c81610f0b565b6040516001600160a01b0382169033907f0c4b48e75a1f7ab0a9a2f786b5d6c1f7789020403bff177fb54d46edb89ccc0090600090a350565b6109ad610a3f565b6001600160a01b038116610a125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610533565b6105d081610b70565b60606000610a27610dc0565b610a32858585610ff9565b915091505b935093915050565b6000546001600160a01b031633146105e55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610533565b60005b81811015610ae357610ad3838383818110610ab957610ab9611978565b9050602002016020810190610ace9190611605565b610bc0565b610adc816119a4565b9050610a9c565b505050565b6002805403610b395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610533565b60028055565b6001600160a01b03821660009081526003602052604081208054839290610b679084906119bd565b90915550505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116610c115760405162461bcd60e51b815260206004820152601860248201527757686974656c6973743a3a205a65726f206164647265737360401b6044820152606401610533565b610c1b3382610eb5565b610c765760405162461bcd60e51b815260206004820152602660248201527f57686974656c6973743a3a204163636f756e74206973206e6f742077686974656044820152651b1a5cdd195960d21b6064820152608401610533565b3360009081526001602090815260408083206001600160a01b0394909416835292905220805460ff19169055565b600081356020830135610cba60408501856119d0565b604051610cc8929190611a17565b604051908190039020610cde60608601866119d0565b604051610cec929190611a17565b604080519182900382206001600160a01b03909516602083015281019290925260608201526080808201929092529083013560a08083019190915283013560c08083019190915283013560e0808301919091528301356101008083019190915283013561012082015261014001604051602081830303815290604052805190602001209050919050565b60005b81811015610ae357610db0838383818110610d9657610d96611978565b9050602002016020810190610dab9190611605565b610f0b565b610db9816119a4565b9050610d79565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105e55760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610533565b6000808080610e4186880188611a27565b9350935093509350610e68848287610e599190611a6d565b610e6390856119bd565b610ee3565b604080516001600160a01b038087168252851660208201527f2c5d05f0498c9d2ef9ad6bec38fa7d6693827331e772b11b0864225ad20507f4910160405180910390a15050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6001600160a01b03821660009081526003602052604081208054839290610b67908490611a6d565b6001600160a01b038116610f5c5760405162461bcd60e51b815260206004820152601860248201527757686974656c6973743a3a205a65726f206164647265737360401b6044820152606401610533565b610f663382610eb5565b15610fc65760405162461bcd60e51b815260206004820152602a60248201527f57686974656c6973743a3a204163636f756e7420697320616c726561647920776044820152691a1a5d195b1a5cdd195960b21b6064820152608401610533565b3360009081526001602081815260408084206001600160a01b03959095168452939052919020805460ff19169091179055565b60606000808036816110126102006101208b018b6119d0565b92965090945092509050604081148061102b5750604181145b6110a75760405162461bcd60e51b815260206004820152604160248201527f457468657273706f745061796d61737465723a3a20696e76616c69642073696760448201527f6e6174757265206c656e67746820696e207061796d6173746572416e644461746064820152606160f81b608482015260a401610533565b60006110ea6110b78b8787610666565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b905060008a35905060006111348386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061128692505050565b90506111408183610eb5565b61117157611150600188886112aa565b60405180602001604052806000815250909850985050505050505050610a37565b89611191826001600160a01b031660009081526003602052604090205490565b10156111fc5760405162461bcd60e51b815260206004820152603460248201527f457468657273706f745061796d61737465723a3a2053706f6e736f72207061796044820152736d61737465722066756e647320746f6f206c6f7760601b6064820152608401610533565b600061120e619c4060e08f0135611a80565b9050600061121c828d611a6d565b90506112288382610b3f565b604080516001600160a01b038086166020830152861691810191909152606081018290526080810183905260a00160405160208183030381529060405261127160008b8b6112aa565b9a509a50505050505050505050935093915050565b600080600061129585856112e2565b915091506112a281611327565b509392505050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b856112d25760006112d5565b60015b60ff161717949350505050565b60008082516041036113185760208301516040840151606085015160001a61130c87828585611471565b94509450505050611320565b506000905060025b9250929050565b600081600481111561133b5761133b611a97565b036113435750565b600181600481111561135757611357611a97565b036113a45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610533565b60028160048111156113b8576113b8611a97565b036114055760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610533565b600381600481111561141957611419611a97565b036105d05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610533565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156114a8575060009050600361152c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114fc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166115255760006001925092505061152c565b9150600090505b94509492505050565b60006020828403121561154757600080fd5b813563ffffffff8116811461155b57600080fd5b9392505050565b6000806020838503121561157557600080fd5b823567ffffffffffffffff8082111561158d57600080fd5b818501915085601f8301126115a157600080fd5b8135818111156115b057600080fd5b8660208260051b85010111156115c557600080fd5b60209290920196919550909350505050565b6000602082840312156115e957600080fd5b5035919050565b6001600160a01b03811681146105d057600080fd5b60006020828403121561161757600080fd5b813561155b816115f0565b60008083601f84011261163457600080fd5b50813567ffffffffffffffff81111561164c57600080fd5b60208301915083602082850101111561132057600080fd5b6000806020838503121561167757600080fd5b823567ffffffffffffffff81111561168e57600080fd5b61169a85828601611622565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000610160828403121561170557600080fd5b50919050565b803565ffffffffffff8116811461172157600080fd5b919050565b60008060006060848603121561173b57600080fd5b833567ffffffffffffffff81111561175257600080fd5b61175e868287016116f2565b93505061176d6020850161170b565b915061177b6040850161170b565b90509250925092565b6000806000806060858703121561179a57600080fd5b8435600381106117a957600080fd5b9350602085013567ffffffffffffffff8111156117c557600080fd5b6117d187828801611622565b9598909750949560400135949350505050565b600080604083850312156117f757600080fd5b8235611802816115f0565b91506020830135611812816115f0565b809150509250929050565b60008060006060848603121561183257600080fd5b833567ffffffffffffffff81111561184957600080fd5b611855868287016116f2565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015611899576020818701810151606086840101520161187c565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b60008184825b858110156118f75781356118d9816115f0565b6001600160a01b0316835260209283019291909101906001016118c6565b509095945050505050565b6000808585111561191257600080fd5b8386111561191f57600080fd5b5050820193919092039150565b6000806040838503121561193f57600080fd5b6119488361170b565b91506119566020840161170b565b90509250929050565b60006020828403121561197157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016119b6576119b661198e565b5060010190565b818103818111156107395761073961198e565b6000808335601e198436030181126119e757600080fd5b83018035915067ffffffffffffffff821115611a0257600080fd5b60200191503681900382131561132057600080fd5b8183823760009101908152919050565b60008060008060808587031215611a3d57600080fd5b8435611a48816115f0565b93506020850135611a58816115f0565b93969395505050506040820135916060013590565b808201808211156107395761073961198e565b80820281158282048414176107395761073961198e565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e33770b234d9384439dee97a441ad9dcd354a50fc13ef2a0646c8ad75aafc53164736f6c63430008110033", + "deployedBytecode": "0x60806040526004361061011f5760003560e01c8063b0d691fe116100a0578063de481f1711610064578063de481f1714610331578063e2c41dbc14610367578063e43252d71461036f578063f2fde38b1461038f578063f465c77e146103af57600080fd5b8063b0d691fe14610283578063b3154db0146102b7578063bb9fe6bf146102e7578063c23a5cea146102fc578063c399ec881461031c57600080fd5b80638da5cb5b116100e75780638da5cb5b146101ae57806394d4ad60146101e557806394e1fc1914610215578063a3d19d8c14610243578063a9a234091461026357600080fd5b80630396cb6014610124578063123a6a8214610139578063155dd5ee14610159578063715018a6146101795780638ab1d6811461018e575b600080fd5b610137610132366004611535565b6103dd565b005b34801561014557600080fd5b50610137610154366004611562565b610468565b34801561016557600080fd5b506101376101743660046115d7565b6104b8565b34801561018557600080fd5b506101376105d3565b34801561019a57600080fd5b506101376101a9366004611605565b6105e7565b3480156101ba57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101f157600080fd5b50610205610200366004611664565b610629565b6040516101dc94939291906116a6565b34801561022157600080fd5b50610235610230366004611726565b610666565b6040519081526020016101dc565b34801561024f57600080fd5b5061013761025e366004611562565b6106c0565b34801561026f57600080fd5b5061013761027e366004611784565b610710565b34801561028f57600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c357600080fd5b506102d76102d23660046117e4565b61072a565b60405190151581526020016101dc565b3480156102f357600080fd5b5061013761073f565b34801561030857600080fd5b50610137610317366004611605565b6107b6565b34801561032857600080fd5b5061023561083c565b34801561033d57600080fd5b5061023561034c366004611605565b6001600160a01b031660009081526003602052604090205490565b6101376108cc565b34801561037b57600080fd5b5061013761038a366004611605565b610963565b34801561039b57600080fd5b506101376103aa366004611605565b6109a5565b3480156103bb57600080fd5b506103cf6103ca36600461181d565b610a1b565b6040516101dc92919061186b565b6103e5610a3f565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561044c57600080fd5b505af1158015610460573d6000803e3d6000fd5b505050505050565b6104728282610a99565b81816040516104829291906118c0565b6040519081900381209033907f75dcdde27b71b9c529ae8b02072e1eeda244662d2d9c2effea5a1afb8fc913f390600090a35050565b6104c0610ae8565b3360009081526003602052604090205481111561053c5760405162461bcd60e51b815260206004820152602f60248201527f457468657273706f745061796d61737465723a3a206e6f7420656e6f7567682060448201526e6465706f73697465642066756e647360881b60648201526084015b60405180910390fd5b6105463382610b3f565b60405163040b850f60e31b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063205c287890604401600060405180830381600087803b1580156105ae57600080fd5b505af11580156105c2573d6000803e3d6000fd5b505050506105d06001600255565b50565b6105db610a3f565b6105e56000610b70565b565b6105f081610bc0565b6040516001600160a01b0382169033907fd288ab5da2e1f37cf384a1565a3f905ad289b092fbdd31950dbbfef148c04f8890600090a350565b600080368161063c605460148789611902565b810190610649919061192c565b909450925061065b8560548189611902565b949793965094505050565b600061067184610ca4565b604080516020810192909252469082015230606082015265ffffffffffff8085166080830152831660a082015260c0016040516020818303038152906040528051906020012090509392505050565b6106ca8282610d76565b81816040516106da9291906118c0565b6040519081900381209033907f6eabb183ad4385932735ae89018089a008c58e814451b618bc0dd0e7922f6d1390600090a35050565b610718610dc0565b61072484848484610e30565b50505050565b60006107368383610eb5565b90505b92915050565b610747610a3f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107a257600080fd5b505af1158015610724573d6000803e3d6000fd5b6107be610a3f565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b5050505050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156108a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c7919061195f565b905090565b6108d4610ae8565b6108de3334610ee3565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561094057600080fd5b505af1158015610954573d6000803e3d6000fd5b50505050506105e56001600255565b61096c81610f0b565b6040516001600160a01b0382169033907f0c4b48e75a1f7ab0a9a2f786b5d6c1f7789020403bff177fb54d46edb89ccc0090600090a350565b6109ad610a3f565b6001600160a01b038116610a125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610533565b6105d081610b70565b60606000610a27610dc0565b610a32858585610ff9565b915091505b935093915050565b6000546001600160a01b031633146105e55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610533565b60005b81811015610ae357610ad3838383818110610ab957610ab9611978565b9050602002016020810190610ace9190611605565b610bc0565b610adc816119a4565b9050610a9c565b505050565b6002805403610b395760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610533565b60028055565b6001600160a01b03821660009081526003602052604081208054839290610b679084906119bd565b90915550505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116610c115760405162461bcd60e51b815260206004820152601860248201527757686974656c6973743a3a205a65726f206164647265737360401b6044820152606401610533565b610c1b3382610eb5565b610c765760405162461bcd60e51b815260206004820152602660248201527f57686974656c6973743a3a204163636f756e74206973206e6f742077686974656044820152651b1a5cdd195960d21b6064820152608401610533565b3360009081526001602090815260408083206001600160a01b0394909416835292905220805460ff19169055565b600081356020830135610cba60408501856119d0565b604051610cc8929190611a17565b604051908190039020610cde60608601866119d0565b604051610cec929190611a17565b604080519182900382206001600160a01b03909516602083015281019290925260608201526080808201929092529083013560a08083019190915283013560c08083019190915283013560e0808301919091528301356101008083019190915283013561012082015261014001604051602081830303815290604052805190602001209050919050565b60005b81811015610ae357610db0838383818110610d9657610d96611978565b9050602002016020810190610dab9190611605565b610f0b565b610db9816119a4565b9050610d79565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105e55760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b6044820152606401610533565b6000808080610e4186880188611a27565b9350935093509350610e68848287610e599190611a6d565b610e6390856119bd565b610ee3565b604080516001600160a01b038087168252851660208201527f2c5d05f0498c9d2ef9ad6bec38fa7d6693827331e772b11b0864225ad20507f4910160405180910390a15050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6001600160a01b03821660009081526003602052604081208054839290610b67908490611a6d565b6001600160a01b038116610f5c5760405162461bcd60e51b815260206004820152601860248201527757686974656c6973743a3a205a65726f206164647265737360401b6044820152606401610533565b610f663382610eb5565b15610fc65760405162461bcd60e51b815260206004820152602a60248201527f57686974656c6973743a3a204163636f756e7420697320616c726561647920776044820152691a1a5d195b1a5cdd195960b21b6064820152608401610533565b3360009081526001602081815260408084206001600160a01b03959095168452939052919020805460ff19169091179055565b60606000808036816110126102006101208b018b6119d0565b92965090945092509050604081148061102b5750604181145b6110a75760405162461bcd60e51b815260206004820152604160248201527f457468657273706f745061796d61737465723a3a20696e76616c69642073696760448201527f6e6174757265206c656e67746820696e207061796d6173746572416e644461746064820152606160f81b608482015260a401610533565b60006110ea6110b78b8787610666565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b905060008a35905060006111348386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061128692505050565b90506111408183610eb5565b61117157611150600188886112aa565b60405180602001604052806000815250909850985050505050505050610a37565b89611191826001600160a01b031660009081526003602052604090205490565b10156111fc5760405162461bcd60e51b815260206004820152603460248201527f457468657273706f745061796d61737465723a3a2053706f6e736f72207061796044820152736d61737465722066756e647320746f6f206c6f7760601b6064820152608401610533565b600061120e619c4060e08f0135611a80565b9050600061121c828d611a6d565b90506112288382610b3f565b604080516001600160a01b038086166020830152861691810191909152606081018290526080810183905260a00160405160208183030381529060405261127160008b8b6112aa565b9a509a50505050505050505050935093915050565b600080600061129585856112e2565b915091506112a281611327565b509392505050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b856112d25760006112d5565b60015b60ff161717949350505050565b60008082516041036113185760208301516040840151606085015160001a61130c87828585611471565b94509450505050611320565b506000905060025b9250929050565b600081600481111561133b5761133b611a97565b036113435750565b600181600481111561135757611357611a97565b036113a45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610533565b60028160048111156113b8576113b8611a97565b036114055760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610533565b600381600481111561141957611419611a97565b036105d05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610533565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156114a8575060009050600361152c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114fc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166115255760006001925092505061152c565b9150600090505b94509492505050565b60006020828403121561154757600080fd5b813563ffffffff8116811461155b57600080fd5b9392505050565b6000806020838503121561157557600080fd5b823567ffffffffffffffff8082111561158d57600080fd5b818501915085601f8301126115a157600080fd5b8135818111156115b057600080fd5b8660208260051b85010111156115c557600080fd5b60209290920196919550909350505050565b6000602082840312156115e957600080fd5b5035919050565b6001600160a01b03811681146105d057600080fd5b60006020828403121561161757600080fd5b813561155b816115f0565b60008083601f84011261163457600080fd5b50813567ffffffffffffffff81111561164c57600080fd5b60208301915083602082850101111561132057600080fd5b6000806020838503121561167757600080fd5b823567ffffffffffffffff81111561168e57600080fd5b61169a85828601611622565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b6000610160828403121561170557600080fd5b50919050565b803565ffffffffffff8116811461172157600080fd5b919050565b60008060006060848603121561173b57600080fd5b833567ffffffffffffffff81111561175257600080fd5b61175e868287016116f2565b93505061176d6020850161170b565b915061177b6040850161170b565b90509250925092565b6000806000806060858703121561179a57600080fd5b8435600381106117a957600080fd5b9350602085013567ffffffffffffffff8111156117c557600080fd5b6117d187828801611622565b9598909750949560400135949350505050565b600080604083850312156117f757600080fd5b8235611802816115f0565b91506020830135611812816115f0565b809150509250929050565b60008060006060848603121561183257600080fd5b833567ffffffffffffffff81111561184957600080fd5b611855868287016116f2565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015611899576020818701810151606086840101520161187c565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b60008184825b858110156118f75781356118d9816115f0565b6001600160a01b0316835260209283019291909101906001016118c6565b509095945050505050565b6000808585111561191257600080fd5b8386111561191f57600080fd5b5050820193919092039150565b6000806040838503121561193f57600080fd5b6119488361170b565b91506119566020840161170b565b90509250929050565b60006020828403121561197157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016119b6576119b661198e565b5060010190565b818103818111156107395761073961198e565b6000808335601e198436030181126119e757600080fd5b83018035915067ffffffffffffffff821115611a0257600080fd5b60200191503681900382131561132057600080fd5b8183823760009101908152919050565b60008060008060808587031215611a3d57600080fd5b8435611a48816115f0565b93506020850135611a58816115f0565b93969395505050506040820135916060013590565b808201808211156107395761073961198e565b80820281158282048414176107395761073961198e565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e33770b234d9384439dee97a441ad9dcd354a50fc13ef2a0646c8ad75aafc53164736f6c63430008110033", + "devdoc": { + "kind": "dev", + "methods": { + "addStake(uint32)": { + "params": { + "unstakeDelaySec": "- the unstake delay for this paymaster. Can only be increased." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "postOp(uint8,bytes,uint256)": { + "params": { + "actualGasCost": "- actual gas used so far (without this postOp call).", + "context": "- the context value returned by validatePaymasterUserOp", + "mode": "enum with the following options: opSucceeded - user operation succeeded. opReverted - user op reverted. still has to pay for gas. postOpReverted - user op succeeded, but caused postOp (in mode=opSucceeded) to revert. Now this is the 2nd call, after user's op was deliberately reverted." + } + }, + "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." + }, + "validatePaymasterUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": { + "params": { + "maxCost": "the maximum cost of this transaction (based on maximum gas and gas price from userOp)", + "userOp": "the user operation", + "userOpHash": "hash of the user's request data." + }, + "returns": { + "context": "value to send to a postOp zero length to signify postOp is not required.", + "validationData": "signature and time-range of this operation, encoded the same as the return value of validateUserOperation <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, otherwise, an address of an \"authorizer\" contract. <6-byte> validUntil - last timestamp this operation is valid. 0 for \"indefinite\" <6-byte> validAfter - first timestamp this operation is valid Note that the validation code cannot use block.timestamp (or block.number) directly." + } + }, + "withdrawStake(address)": { + "params": { + "withdrawAddress": "the address to send withdrawn value." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addStake(uint32)": { + "notice": "add stake for this paymaster. This method can also carry eth value to add to the current stake." + }, + "getDeposit()": { + "notice": "return current paymaster's deposit on the entryPoint." + }, + "getHash((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint48,uint48)": { + "notice": "return the hash we're going to sign off-chain (and validate on-chain) this method is called by the off-chain service, to sign the request. it is called on-chain from the validatePaymasterUserOp, to validate the signature. note that this signature covers all fields of the UserOperation, except the \"paymasterAndData\", which will carry the signature itself." + }, + "postOp(uint8,bytes,uint256)": { + "notice": "post-operation handler. Must verify sender is the entryPoint" + }, + "unlockStake()": { + "notice": "unlock the stake, in order to withdraw it. The paymaster can't serve requests once unlocked, until it calls addStake again" + }, + "validatePaymasterUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": { + "notice": "payment validation: check if paymaster agrees to pay. Must verify sender is the entryPoint. Revert to reject this request. Note that bundlers will reject this method if it changes the state, unless the paymaster is trusted (whitelisted) The paymaster pre-pays using its deposit, and receive back a refund after the postOp method returns." + }, + "withdrawStake(address)": { + "notice": "withdraw the entire paymaster's stake. stake must be unlocked first (and then wait for the unstakeDelay to be over)" + } + }, + "notice": "A sample paymaster that uses external service to decide whether to pay for the UserOp. The paymaster trusts an external signer to sign the transaction. The calling user must pass the UserOp to that external signer first, which performs whatever off-chain verification before signing the UserOp. Note that this signature is NOT a replacement for wallet signature: - the paymaster signs to agree to PAY for GAS. - the wallet signs to prove identity and account ownership.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "src/paymaster/EtherspotPaymaster.sol:EtherspotPaymaster", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7293, + "contract": "src/paymaster/EtherspotPaymaster.sol:EtherspotPaymaster", + "label": "whitelist", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 753, + "contract": "src/paymaster/EtherspotPaymaster.sol:EtherspotPaymaster", + "label": "_status", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 6887, + "contract": "src/paymaster/EtherspotPaymaster.sol:EtherspotPaymaster", + "label": "_sponsorBalances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "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_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file